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
93d5e82
Documentation
LICENSES
arch
alpha
arc
arm
arm64
csky
abiv1
abiv2
boot
configs
include
asm
vdso
Kbuild
addrspace.h
asid.h
atomic.h
barrier.h
bitops.h
bug.h
cache.h
cacheflush.h
checksum.h
clocksource.h
cmpxchg.h
elf.h
fixmap.h
ftrace.h
futex.h
highmem.h
io.h
irq_work.h
irqflags.h
jump_label.h
kprobes.h
memory.h
mmu.h
mmu_context.h
page.h
pci.h
perf_event.h
pgalloc.h
pgtable.h
probes.h
processor.h
ptrace.h
reg_ops.h
seccomp.h
sections.h
shmparam.h
smp.h
spinlock.h
spinlock_types.h
stackprotector.h
string.h
switch_to.h
syscall.h
syscalls.h
tcm.h
thread_info.h
tlb.h
tlbflush.h
traps.h
uaccess.h
unistd.h
uprobes.h
vdso.h
vmalloc.h
uapi
kernel
lib
mm
Kbuild
Kconfig
Kconfig.debug
Kconfig.platforms
Makefile
hexagon
ia64
loongarch
m68k
microblaze
mips
nios2
openrisc
parisc
powerpc
riscv
s390
sh
sparc
um
x86
xtensa
.gitignore
Kconfig
block
certs
crypto
drivers
fs
include
init
io_uring
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
/
csky
/
include
/
asm
/
processor.h
Blame
Blame
Latest commit
History
History
87 lines (68 loc) · 2.28 KB
Breadcrumbs
linux
/
arch
/
csky
/
include
/
asm
/
processor.h
Top
File metadata and controls
Code
Blame
87 lines (68 loc) · 2.28 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_CSKY_PROCESSOR_H #define __ASM_CSKY_PROCESSOR_H #include <linux/bitops.h> #include <linux/cache.h> #include <asm/ptrace.h> #include <asm/current.h> #include <abi/reg_ops.h> #include <abi/regdef.h> #include <abi/switch_context.h> #ifdef CONFIG_CPU_HAS_FPU #include <abi/fpu.h> #endif struct cpuinfo_csky { unsigned long asid_cache; } __aligned(SMP_CACHE_BYTES); extern struct cpuinfo_csky cpu_data[]; /* * User space process size: 2GB. This is hardcoded into a few places, * so don't change it unless you know what you are doing. TASK_SIZE * for a 64 bit kernel expandable to 8192EB, of which the current CSKY * implementations will "only" be able to use 1TB ... */ #define TASK_SIZE (PAGE_OFFSET - (PAGE_SIZE * 8)) #ifdef __KERNEL__ #define STACK_TOP TASK_SIZE #define STACK_TOP_MAX STACK_TOP #endif /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) struct thread_struct { unsigned long sp; /* kernel stack pointer */ unsigned long trap_no; /* saved status register */ /* FPU regs */ struct user_fp __aligned(16) user_fp; }; #define INIT_THREAD { \ .sp = sizeof(init_stack) + (unsigned long) &init_stack, \ } /* * Do necessary setup to start up a newly executed thread. * * pass the data segment into user programs if it exists, * it can't hurt anything as far as I can tell */ #define start_thread(_regs, _pc, _usp) \ do { \ (_regs)->pc = (_pc); \ (_regs)->regs[1] = 0; /* ABIV1 is R7, uClibc_main rtdl arg */ \ (_regs)->regs[2] = 0; \ (_regs)->regs[3] = 0; /* ABIV2 is R7, use it? */ \ (_regs)->sr &= ~PS_S; \ (_regs)->usp = (_usp); \ } while (0) /* Forward declaration, a strange C thing */ struct task_struct; /* Prepare to copy thread state - unlazy all lazy status */ #define prepare_to_copy(tsk) do { } while (0) extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); unsigned long __get_wchan(struct task_struct *p); #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc) #define KSTK_ESP(tsk) (task_pt_regs(tsk)->usp) #define task_pt_regs(p) \ ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1) #define cpu_relax() barrier() #endif /* __ASM_CSKY_PROCESSOR_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
You can’t perform that action at this time.