Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
5b10174
Documentation
arch
alpha
arm
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
m68knommu
mips
mn10300
parisc
powerpc
s390
sh
sparc
boot
configs
include/asm
Kbuild
agp.h
apb.h
apc.h
asi.h
asm.h
asmmacro.h
atomic.h
atomic_32.h
atomic_64.h
auxio.h
auxio_32.h
auxio_64.h
auxvec.h
backoff.h
bbc.h
bitext.h
bitops.h
bitops_32.h
bitops_64.h
btfixup.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cacheflush_32.h
cacheflush_64.h
chafsr.h
checksum.h
checksum_32.h
checksum_64.h
chmctrl.h
clock.h
cmt.h
compat.h
compat_signal.h
contregs.h
cpudata.h
cpudata_32.h
cpudata_64.h
cputime.h
current.h
cypress.h
dcr.h
dcu.h
delay.h
delay_32.h
delay_64.h
device.h
display7seg.h
div64.h
dma-mapping.h
dma-mapping_32.h
dma-mapping_64.h
dma.h
ebus_dma.h
ecc.h
eeprom.h
elf.h
elf_32.h
elf_64.h
emergency-restart.h
envctrl.h
errno.h
estate.h
fb.h
fbio.h
fcntl.h
fhc.h
fixmap.h
floppy.h
floppy_32.h
floppy_64.h
fpumacro.h
ftrace.h
futex.h
futex_32.h
futex_64.h
gpio.h
hardirq.h
hardirq_32.h
hardirq_64.h
head.h
head_32.h
head_64.h
highmem.h
hugetlb.h
hvtramp.h
hw_irq.h
hypervisor.h
ide.h
idprom.h
intr_queue.h
io-unit.h
io.h
io_32.h
io_64.h
ioctl.h
ioctls.h
iommu.h
iommu_32.h
iommu_64.h
ipcbuf.h
irq.h
irq_32.h
irq_64.h
irq_regs.h
irqflags.h
irqflags_32.h
irqflags_64.h
jsflash.h
kdebug.h
kdebug_32.h
kdebug_64.h
kgdb.h
kmap_types.h
kprobes.h
ldc.h
linkage.h
lmb.h
local.h
lsu.h
machines.h
mbus.h
mc146818rtc.h
mc146818rtc_32.h
mc146818rtc_64.h
mdesc.h
memctrl.h
memreg.h
mman.h
mmu.h
mmu_32.h
mmu_64.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmzone.h
module.h
mpmbox.h
msgbuf.h
msi.h
mutex.h
mxcc.h
nmi.h
ns87303.h
obio.h
of_device.h
of_platform.h
openprom.h
openpromio.h
oplib.h
oplib_32.h
oplib_64.h
page.h
page_32.h
page_64.h
param.h
parport.h
pbm.h
pci.h
pci_32.h
pci_64.h
pcic.h
pcr.h
percpu.h
percpu_32.h
percpu_64.h
perfctr.h
pgalloc.h
pgalloc_32.h
pgalloc_64.h
pgtable.h
pgtable_32.h
pgtable_64.h
pgtsrmmu.h
pgtsun4.h
pgtsun4c.h
pil.h
poll.h
posix_types.h
processor.h
processor_32.h
processor_64.h
prom.h
psr.h
psrcompat.h
pstate.h
ptrace.h
resource.h
ross.h
rwsem-const.h
rwsem.h
sbi.h
scatterlist.h
scratchpad.h
seccomp.h
sections.h
sembuf.h
serial.h
setup.h
sfafsr.h
sfp-machine.h
sfp-machine_32.h
sfp-machine_64.h
shmbuf.h
shmparam.h
shmparam_32.h
shmparam_64.h
sigcontext.h
siginfo.h
signal.h
smp.h
smp_32.h
smp_64.h
smpprim.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_32.h
spinlock_64.h
spinlock_types.h
spitfire.h
stacktrace.h
starfire.h
stat.h
statfs.h
string.h
string_32.h
string_64.h
sunbpp.h
swab.h
swift.h
syscall.h
syscalls.h
sysen.h
system.h
system_32.h
system_64.h
termbits.h
termios.h
thread_info.h
thread_info_32.h
thread_info_64.h
timer.h
timer_32.h
timer_64.h
timex.h
timex_32.h
timex_64.h
tlb.h
tlb_32.h
tlb_64.h
tlbflush.h
tlbflush_32.h
tlbflush_64.h
topology.h
topology_32.h
topology_64.h
traps.h
tsb.h
tsunami.h
ttable.h
turbosparc.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
uctx.h
unaligned.h
unistd.h
upa.h
user.h
utrap.h
vac-ops.h
vaddrs.h
vga.h
viking.h
vio.h
visasm.h
watchdog.h
winmacro.h
xor.h
xor_32.h
xor_64.h
kernel
lib
math-emu
mm
oprofile
prom
Kconfig
Kconfig.debug
Makefile
um
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
compat.h
Copy path
Blame
Blame
Latest commit
History
History
248 lines (208 loc) · 4.96 KB
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
compat.h
Top
File metadata and controls
Code
Blame
248 lines (208 loc) · 4.96 KB
Raw
#ifndef _ASM_SPARC64_COMPAT_H #define _ASM_SPARC64_COMPAT_H /* * Architecture specific compatibility types */ #include <linux/types.h> #define COMPAT_USER_HZ 100 typedef u32 compat_size_t; typedef s32 compat_ssize_t; typedef s32 compat_time_t; typedef s32 compat_clock_t; typedef s32 compat_pid_t; typedef u16 __compat_uid_t; typedef u16 __compat_gid_t; typedef u32 __compat_uid32_t; typedef u32 __compat_gid32_t; typedef u16 compat_mode_t; typedef u32 compat_ino_t; typedef u16 compat_dev_t; typedef s32 compat_off_t; typedef s64 compat_loff_t; typedef s16 compat_nlink_t; typedef u16 compat_ipc_pid_t; typedef s32 compat_daddr_t; typedef u32 compat_caddr_t; typedef __kernel_fsid_t compat_fsid_t; typedef s32 compat_key_t; typedef s32 compat_timer_t; typedef s32 compat_int_t; typedef s32 compat_long_t; typedef s64 compat_s64; typedef u32 compat_uint_t; typedef u32 compat_ulong_t; typedef u64 compat_u64; struct compat_timespec { compat_time_t tv_sec; s32 tv_nsec; }; struct compat_timeval { compat_time_t tv_sec; s32 tv_usec; }; struct compat_stat { compat_dev_t st_dev; compat_ino_t st_ino; compat_mode_t st_mode; compat_nlink_t st_nlink; __compat_uid_t st_uid; __compat_gid_t st_gid; compat_dev_t st_rdev; compat_off_t st_size; compat_time_t st_atime; compat_ulong_t st_atime_nsec; compat_time_t st_mtime; compat_ulong_t st_mtime_nsec; compat_time_t st_ctime; compat_ulong_t st_ctime_nsec; compat_off_t st_blksize; compat_off_t st_blocks; u32 __unused4[2]; }; struct compat_stat64 { unsigned long long st_dev; unsigned long long st_ino; unsigned int st_mode; unsigned int st_nlink; unsigned int st_uid; unsigned int st_gid; unsigned long long st_rdev; unsigned char __pad3[8]; long long st_size; unsigned int st_blksize; unsigned char __pad4[8]; unsigned int st_blocks; unsigned int st_atime; unsigned int st_atime_nsec; unsigned int st_mtime; unsigned int st_mtime_nsec; unsigned int st_ctime; unsigned int st_ctime_nsec; unsigned int __unused4; unsigned int __unused5; }; struct compat_flock { short l_type; short l_whence; compat_off_t l_start; compat_off_t l_len; compat_pid_t l_pid; short __unused; }; #define F_GETLK64 12 #define F_SETLK64 13 #define F_SETLKW64 14 struct compat_flock64 { short l_type; short l_whence; compat_loff_t l_start; compat_loff_t l_len; compat_pid_t l_pid; short __unused; }; struct compat_statfs { int f_type; int f_bsize; int f_blocks; int f_bfree; int f_bavail; int f_files; int f_ffree; compat_fsid_t f_fsid; int f_namelen; /* SunOS ignores this field. */ int f_frsize; int f_spare[5]; }; #define COMPAT_RLIM_INFINITY 0x7fffffff typedef u32 compat_old_sigset_t; #define _COMPAT_NSIG 64 #define _COMPAT_NSIG_BPW 32 typedef u32 compat_sigset_word; #define COMPAT_OFF_T_MAX 0x7fffffff #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL /* * A pointer passed in from user mode. This should not * be used for syscall parameters, just declare them * as pointers because the syscall entry code will have * appropriately converted them already. */ typedef u32 compat_uptr_t; static inline void __user *compat_ptr(compat_uptr_t uptr) { return (void __user *)(unsigned long)uptr; } static inline compat_uptr_t ptr_to_compat(void __user *uptr) { return (u32)(unsigned long)uptr; } static inline void __user *compat_alloc_user_space(long len) { struct pt_regs *regs = current_thread_info()->kregs; unsigned long usp = regs->u_regs[UREG_I6]; if (!(test_thread_flag(TIF_32BIT))) usp += STACK_BIAS; else usp &= 0xffffffffUL; usp -= len; usp &= ~0x7UL; return (void __user *) usp; } struct compat_ipc64_perm { compat_key_t key; __compat_uid32_t uid; __compat_gid32_t gid; __compat_uid32_t cuid; __compat_gid32_t cgid; unsigned short __pad1; compat_mode_t mode; unsigned short __pad2; unsigned short seq; unsigned long __unused1; /* yes they really are 64bit pads */ unsigned long __unused2; }; struct compat_semid64_ds { struct compat_ipc64_perm sem_perm; unsigned int __pad1; compat_time_t sem_otime; unsigned int __pad2; compat_time_t sem_ctime; u32 sem_nsems; u32 __unused1; u32 __unused2; }; struct compat_msqid64_ds { struct compat_ipc64_perm msg_perm; unsigned int __pad1; compat_time_t msg_stime; unsigned int __pad2; compat_time_t msg_rtime; unsigned int __pad3; compat_time_t msg_ctime; unsigned int msg_cbytes; unsigned int msg_qnum; unsigned int msg_qbytes; compat_pid_t msg_lspid; compat_pid_t msg_lrpid; unsigned int __unused1; unsigned int __unused2; }; struct compat_shmid64_ds { struct compat_ipc64_perm shm_perm; unsigned int __pad1; compat_time_t shm_atime; unsigned int __pad2; compat_time_t shm_dtime; unsigned int __pad3; compat_time_t shm_ctime; compat_size_t shm_segsz; compat_pid_t shm_cpid; compat_pid_t shm_lpid; unsigned int shm_nattch; unsigned int __unused1; unsigned int __unused2; }; static inline int is_compat_task(void) { return test_thread_flag(TIF_32BIT); } #endif /* _ASM_SPARC64_COMPAT_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
You can’t perform that action at this time.