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
e8f023c
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
h8300
hexagon
ia64
m68k
microblaze
mips
nds32
nios2
openrisc
parisc
powerpc
riscv
s390
sh
sparc
boot
configs
crypto
include
asm
Kbuild
adi.h
adi_64.h
agp.h
apb.h
asm-offsets.h
asm-prototypes.h
asm.h
asmmacro.h
atomic.h
atomic_32.h
atomic_64.h
auxio.h
auxio_32.h
auxio_64.h
backoff.h
barrier.h
barrier_32.h
barrier_64.h
bbc.h
bitext.h
bitops.h
bitops_32.h
bitops_64.h
btext.h
bug.h
bugs.h
cache.h
cacheflush.h
cacheflush_32.h
cacheflush_64.h
cachetlb_32.h
chafsr.h
checksum.h
checksum_32.h
checksum_64.h
chmctrl.h
clock.h
clocksource.h
cmpxchg.h
cmpxchg_32.h
cmpxchg_64.h
compat.h
compat_signal.h
contregs.h
cpu_type.h
cpudata.h
cpudata_32.h
cpudata_64.h
current.h
dcr.h
dcu.h
delay.h
delay_32.h
delay_64.h
device.h
dma-mapping.h
dma.h
ebus_dma.h
ecc.h
eeprom.h
elf.h
elf_32.h
elf_64.h
estate.h
extable.h
fb.h
fbio.h
fhc.h
floppy.h
floppy_32.h
floppy_64.h
fpumacro.h
ftrace.h
futex.h
futex_32.h
futex_64.h
hardirq.h
hardirq_32.h
hardirq_64.h
head.h
head_32.h
head_64.h
hibernate.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
ioctls.h
iommu-common.h
iommu.h
iommu_32.h
iommu_64.h
irq.h
irq_32.h
irq_64.h
irqflags.h
irqflags_32.h
irqflags_64.h
jump_label.h
kdebug.h
kdebug_32.h
kdebug_64.h
kgdb.h
kprobes.h
ldc.h
leon.h
leon_amba.h
leon_pci.h
lsu.h
machines.h
mbus.h
mc146818rtc.h
mc146818rtc_32.h
mc146818rtc_64.h
mdesc.h
memctrl.h
mman.h
mmu.h
mmu_32.h
mmu_64.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmzone.h
mxcc.h
nmi.h
ns87303.h
obio.h
openprom.h
oplib.h
oplib_32.h
oplib_64.h
page.h
page_32.h
page_64.h
parport.h
pbm.h
pci.h
pcic.h
pcr.h
percpu.h
percpu_32.h
percpu_64.h
perf_event.h
pgalloc.h
pgalloc_32.h
pgalloc_64.h
pgtable.h
pgtable_32.h
pgtable_64.h
pgtsrmmu.h
pil.h
processor.h
processor_32.h
processor_64.h
prom.h
psr.h
ptrace.h
qrwlock.h
qspinlock.h
ross.h
sbi.h
scratchpad.h
seccomp.h
sections.h
setup.h
sfafsr.h
sfp-machine.h
sfp-machine_32.h
sfp-machine_64.h
shmparam.h
shmparam_32.h
shmparam_64.h
sigcontext.h
signal.h
smp.h
smp_32.h
smp_64.h
sparsemem.h
spinlock.h
spinlock_32.h
spinlock_64.h
spinlock_types.h
spitfire.h
stacktrace.h
starfire.h
string.h
string_32.h
string_64.h
sunbpp.h
swift.h
switch_to.h
switch_to_32.h
switch_to_64.h
syscall.h
syscalls.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
trap_block.h
traps.h
tsb.h
tsunami.h
ttable.h
turbosparc.h
uaccess.h
uaccess_32.h
uaccess_64.h
unistd.h
upa.h
uprobes.h
user.h
vaddrs.h
vdso.h
vga.h
viking.h
vio.h
visasm.h
vmalloc.h
vvar.h
winmacro.h
xor.h
xor_32.h
xor_64.h
uapi
kernel
lib
math-emu
mm
net
power
prom
vdso
Kbuild
Kconfig
Kconfig.debug
Makefile
um
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
syscall.h
Blame
Blame
Latest commit
History
History
132 lines (115 loc) · 3.17 KB
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
syscall.h
Top
File metadata and controls
Code
Blame
132 lines (115 loc) · 3.17 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_SPARC_SYSCALL_H #define __ASM_SPARC_SYSCALL_H #include <uapi/linux/audit.h> #include <linux/kernel.h> #include <linux/compat.h> #include <linux/sched.h> #include <asm/ptrace.h> #include <asm/thread_info.h> /* * The syscall table always contains 32 bit pointers since we know that the * address of the function to be called is (way) below 4GB. So the "int" * type here is what we want [need] for both 32 bit and 64 bit systems. */ extern const unsigned int sys_call_table[]; /* The system call number is given by the user in %g1 */ static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { int syscall_p = pt_regs_is_syscall(regs); return (syscall_p ? regs->u_regs[UREG_G1] : -1L); } static inline void syscall_rollback(struct task_struct *task, struct pt_regs *regs) { /* XXX This needs some thought. On Sparc we don't * XXX save away the original %o0 value somewhere. * XXX Instead we hold it in register %l5 at the top * XXX level trap frame and pass this down to the signal * XXX dispatch code which is the only place that value * XXX ever was needed. */ } #ifdef CONFIG_SPARC32 static inline bool syscall_has_error(struct pt_regs *regs) { return (regs->psr & PSR_C) ? true : false; } static inline void syscall_set_error(struct pt_regs *regs) { regs->psr |= PSR_C; } static inline void syscall_clear_error(struct pt_regs *regs) { regs->psr &= ~PSR_C; } #else static inline bool syscall_has_error(struct pt_regs *regs) { return (regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY)) ? true : false; } static inline void syscall_set_error(struct pt_regs *regs) { regs->tstate |= (TSTATE_XCARRY | TSTATE_ICARRY); } static inline void syscall_clear_error(struct pt_regs *regs) { regs->tstate &= ~(TSTATE_XCARRY | TSTATE_ICARRY); } #endif static inline long syscall_get_error(struct task_struct *task, struct pt_regs *regs) { long val = regs->u_regs[UREG_I0]; return (syscall_has_error(regs) ? -val : 0); } static inline long syscall_get_return_value(struct task_struct *task, struct pt_regs *regs) { long val = regs->u_regs[UREG_I0]; return val; } static inline void syscall_set_return_value(struct task_struct *task, struct pt_regs *regs, int error, long val) { if (error) { syscall_set_error(regs); regs->u_regs[UREG_I0] = -error; } else { syscall_clear_error(regs); regs->u_regs[UREG_I0] = val; } } static inline void syscall_get_arguments(struct task_struct *task, struct pt_regs *regs, unsigned long *args) { int zero_extend = 0; unsigned int j; unsigned int n = 6; #ifdef CONFIG_SPARC64 if (test_tsk_thread_flag(task, TIF_32BIT)) zero_extend = 1; #endif for (j = 0; j < n; j++) { unsigned long val = regs->u_regs[UREG_I0 + j]; if (zero_extend) args[j] = (u32) val; else args[j] = val; } } static inline int syscall_get_arch(struct task_struct *task) { #if defined(CONFIG_SPARC64) && defined(CONFIG_COMPAT) return test_tsk_thread_flag(task, TIF_32BIT) ? AUDIT_ARCH_SPARC : AUDIT_ARCH_SPARC64; #elif defined(CONFIG_SPARC64) return AUDIT_ARCH_SPARC64; #else return AUDIT_ARCH_SPARC; #endif } #endif /* __ASM_SPARC_SYSCALL_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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
You can’t perform that action at this time.