diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
commit | f15cbe6f1a4b4d9df59142fc8e4abb973302cf44 (patch) | |
tree | 774d7b11abaaf33561ab8268bf51ddd9ceb79025 /include/asm-sh/kexec.h | |
parent | 25326277d8d1393d1c66240e6255aca780f9e3eb (diff) |
sh: migrate to arch/sh/include/
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac.
Most of the moving about was done with Sam's directions at:
http://marc.info/?l=linux-sh&m=121724823706062&w=2
with subsequent hacking and fixups entirely my fault.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/kexec.h')
-rw-r--r-- | include/asm-sh/kexec.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/include/asm-sh/kexec.h b/include/asm-sh/kexec.h deleted file mode 100644 index 00f4260ef09b..000000000000 --- a/include/asm-sh/kexec.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #ifndef __ASM_SH_KEXEC_H | ||
2 | #define __ASM_SH_KEXEC_H | ||
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | #include <asm/string.h> | ||
6 | |||
7 | /* | ||
8 | * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. | ||
9 | * I.e. Maximum page that is mapped directly into kernel memory, | ||
10 | * and kmap is not required. | ||
11 | * | ||
12 | * Someone correct me if FIXADDR_START - PAGEOFFSET is not the correct | ||
13 | * calculation for the amount of memory directly mappable into the | ||
14 | * kernel memory space. | ||
15 | */ | ||
16 | |||
17 | /* Maximum physical address we can use pages from */ | ||
18 | #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) | ||
19 | /* Maximum address we can reach in physical address mode */ | ||
20 | #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) | ||
21 | /* Maximum address we can use for the control code buffer */ | ||
22 | #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE | ||
23 | |||
24 | #define KEXEC_CONTROL_CODE_SIZE 4096 | ||
25 | |||
26 | /* The native architecture */ | ||
27 | #define KEXEC_ARCH KEXEC_ARCH_SH | ||
28 | |||
29 | static inline void crash_setup_regs(struct pt_regs *newregs, | ||
30 | struct pt_regs *oldregs) | ||
31 | { | ||
32 | if (oldregs) | ||
33 | memcpy(newregs, oldregs, sizeof(*newregs)); | ||
34 | else { | ||
35 | __asm__ __volatile__ ("mov r0, %0" : "=r" (newregs->regs[0])); | ||
36 | __asm__ __volatile__ ("mov r1, %0" : "=r" (newregs->regs[1])); | ||
37 | __asm__ __volatile__ ("mov r2, %0" : "=r" (newregs->regs[2])); | ||
38 | __asm__ __volatile__ ("mov r3, %0" : "=r" (newregs->regs[3])); | ||
39 | __asm__ __volatile__ ("mov r4, %0" : "=r" (newregs->regs[4])); | ||
40 | __asm__ __volatile__ ("mov r5, %0" : "=r" (newregs->regs[5])); | ||
41 | __asm__ __volatile__ ("mov r6, %0" : "=r" (newregs->regs[6])); | ||
42 | __asm__ __volatile__ ("mov r7, %0" : "=r" (newregs->regs[7])); | ||
43 | __asm__ __volatile__ ("mov r8, %0" : "=r" (newregs->regs[8])); | ||
44 | __asm__ __volatile__ ("mov r9, %0" : "=r" (newregs->regs[9])); | ||
45 | __asm__ __volatile__ ("mov r10, %0" : "=r" (newregs->regs[10])); | ||
46 | __asm__ __volatile__ ("mov r11, %0" : "=r" (newregs->regs[11])); | ||
47 | __asm__ __volatile__ ("mov r12, %0" : "=r" (newregs->regs[12])); | ||
48 | __asm__ __volatile__ ("mov r13, %0" : "=r" (newregs->regs[13])); | ||
49 | __asm__ __volatile__ ("mov r14, %0" : "=r" (newregs->regs[14])); | ||
50 | __asm__ __volatile__ ("mov r15, %0" : "=r" (newregs->regs[15])); | ||
51 | |||
52 | __asm__ __volatile__ ("sts pr, %0" : "=r" (newregs->pr)); | ||
53 | __asm__ __volatile__ ("sts macl, %0" : "=r" (newregs->macl)); | ||
54 | __asm__ __volatile__ ("sts mach, %0" : "=r" (newregs->mach)); | ||
55 | |||
56 | __asm__ __volatile__ ("stc gbr, %0" : "=r" (newregs->gbr)); | ||
57 | __asm__ __volatile__ ("stc sr, %0" : "=r" (newregs->sr)); | ||
58 | |||
59 | newregs->pc = (unsigned long)current_text_addr(); | ||
60 | } | ||
61 | } | ||
62 | #endif /* __ASM_SH_KEXEC_H */ | ||