~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/include/asm/kexec.h

Version: ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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_PAGE_SIZE 4096
 25 
 26 /* The native architecture */
 27 #define KEXEC_ARCH KEXEC_ARCH_SH
 28 
 29 #ifdef CONFIG_KEXEC
 30 /* arch/sh/kernel/machine_kexec.c */
 31 void reserve_crashkernel(void);
 32 
 33 static inline void crash_setup_regs(struct pt_regs *newregs,
 34                                     struct pt_regs *oldregs)
 35 {
 36         if (oldregs)
 37                 memcpy(newregs, oldregs, sizeof(*newregs));
 38         else {
 39                 __asm__ __volatile__ ("mov r0, %0" : "=r" (newregs->regs[0]));
 40                 __asm__ __volatile__ ("mov r1, %0" : "=r" (newregs->regs[1]));
 41                 __asm__ __volatile__ ("mov r2, %0" : "=r" (newregs->regs[2]));
 42                 __asm__ __volatile__ ("mov r3, %0" : "=r" (newregs->regs[3]));
 43                 __asm__ __volatile__ ("mov r4, %0" : "=r" (newregs->regs[4]));
 44                 __asm__ __volatile__ ("mov r5, %0" : "=r" (newregs->regs[5]));
 45                 __asm__ __volatile__ ("mov r6, %0" : "=r" (newregs->regs[6]));
 46                 __asm__ __volatile__ ("mov r7, %0" : "=r" (newregs->regs[7]));
 47                 __asm__ __volatile__ ("mov r8, %0" : "=r" (newregs->regs[8]));
 48                 __asm__ __volatile__ ("mov r9, %0" : "=r" (newregs->regs[9]));
 49                 __asm__ __volatile__ ("mov r10, %0" : "=r" (newregs->regs[10]));
 50                 __asm__ __volatile__ ("mov r11, %0" : "=r" (newregs->regs[11]));
 51                 __asm__ __volatile__ ("mov r12, %0" : "=r" (newregs->regs[12]));
 52                 __asm__ __volatile__ ("mov r13, %0" : "=r" (newregs->regs[13]));
 53                 __asm__ __volatile__ ("mov r14, %0" : "=r" (newregs->regs[14]));
 54                 __asm__ __volatile__ ("mov r15, %0" : "=r" (newregs->regs[15]));
 55 
 56                 __asm__ __volatile__ ("sts pr, %0" : "=r" (newregs->pr));
 57                 __asm__ __volatile__ ("sts macl, %0" : "=r" (newregs->macl));
 58                 __asm__ __volatile__ ("sts mach, %0" : "=r" (newregs->mach));
 59 
 60                 __asm__ __volatile__ ("stc gbr, %0" : "=r" (newregs->gbr));
 61                 __asm__ __volatile__ ("stc sr, %0" : "=r" (newregs->sr));
 62 
 63                 newregs->pc = (unsigned long)current_text_addr();
 64         }
 65 }
 66 #else
 67 static inline void reserve_crashkernel(void) { }
 68 #endif /* CONFIG_KEXEC */
 69 
 70 #endif /* __ASM_SH_KEXEC_H */
 71 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp