scripts/kernel-doc: Add support for named variable macro arguments
[qemu/ar7.git] / linux-user / sparc / target_syscall.h
blobd8ea04ea837ae88332f61d5e2728cb8394fca61c
1 #ifndef SPARC_TARGET_SYSCALL_H
2 #define SPARC_TARGET_SYSCALL_H
4 #include "target_errno.h"
6 struct target_pt_regs {
7 abi_ulong psr;
8 abi_ulong pc;
9 abi_ulong npc;
10 abi_ulong y;
11 abi_ulong u_regs[16];
14 #define UNAME_MACHINE "sparc"
15 #define UNAME_MINIMUM_RELEASE "2.6.32"
17 /* SPARC kernels don't define this in their Kconfig, but they have the
18 * same ABI as if they did, implemented by sparc-specific code which fishes
19 * directly in the u_regs() struct for half the parameters in sparc_do_fork()
20 * and copy_thread().
22 #define TARGET_CLONE_BACKWARDS
23 #define TARGET_MINSIGSTKSZ 4096
24 #define TARGET_MCL_CURRENT 0x2000
25 #define TARGET_MCL_FUTURE 0x4000
26 #define TARGET_MCL_ONFAULT 0x8000
28 /* For SPARC SHMLBA is determined at runtime in the kernel, and
29 * libc has to runtime-detect it using the hwcaps (see glibc
30 * sysdeps/unix/sysv/linux/sparc/getshmlba; we follow the same
31 * logic here, though we know we're not the sparc v9 64-bit case).
33 #define TARGET_FORCE_SHMLBA
35 static inline abi_ulong target_shmlba(CPUSPARCState *env)
37 if (!(env->def.features & CPU_FEATURE_FLUSH)) {
38 return 64 * 1024;
39 } else {
40 return 256 * 1024;
44 #endif /* SPARC_TARGET_SYSCALL_H */