OLD | NEW |
1 #include <linux/bootmem.h> | 1 #include <linux/bootmem.h> |
2 #include <linux/linkage.h> | 2 #include <linux/linkage.h> |
3 #include <linux/bitops.h> | 3 #include <linux/bitops.h> |
4 #include <linux/kernel.h> | 4 #include <linux/kernel.h> |
5 #include <linux/export.h> | 5 #include <linux/export.h> |
6 #include <linux/percpu.h> | 6 #include <linux/percpu.h> |
7 #include <linux/string.h> | 7 #include <linux/string.h> |
8 #include <linux/ctype.h> | 8 #include <linux/ctype.h> |
9 #include <linux/delay.h> | 9 #include <linux/delay.h> |
10 #include <linux/sched/mm.h> | 10 #include <linux/sched/mm.h> |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 * Special IST stacks which the CPU switches to when it calls | 1321 * Special IST stacks which the CPU switches to when it calls |
1322 * an IST-marked descriptor entry. Up to 7 stacks (hardware | 1322 * an IST-marked descriptor entry. Up to 7 stacks (hardware |
1323 * limit), all of them are 4K, except the debug stack which | 1323 * limit), all of them are 4K, except the debug stack which |
1324 * is 8K. | 1324 * is 8K. |
1325 */ | 1325 */ |
1326 static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = { | 1326 static const unsigned int exception_stack_sizes[N_EXCEPTION_STACKS] = { |
1327 [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ, | 1327 [0 ... N_EXCEPTION_STACKS - 1] = EXCEPTION_STKSZ, |
1328 [DEBUG_STACK - 1] = DEBUG_STKSZ | 1328 [DEBUG_STACK - 1] = DEBUG_STKSZ |
1329 }; | 1329 }; |
1330 | 1330 |
1331 static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks | 1331 DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks |
1332 » [(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]); | 1332 » [EXCEPTION_STKSZ_TOTAL]); |
1333 | 1333 |
1334 /* May not be marked __init: used by software suspend */ | 1334 /* May not be marked __init: used by software suspend */ |
1335 void syscall_init(void) | 1335 void syscall_init(void) |
1336 { | 1336 { |
1337 wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); | 1337 wrmsr(MSR_STAR, 0, (__USER32_CS << 16) | __KERNEL_CS); |
1338 wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); | 1338 wrmsrl(MSR_LSTAR, (unsigned long)entry_SYSCALL_64); |
1339 | 1339 |
1340 #ifdef CONFIG_IA32_EMULATION | 1340 #ifdef CONFIG_IA32_EMULATION |
1341 wrmsrl(MSR_CSTAR, (unsigned long)entry_SYSCALL_compat); | 1341 wrmsrl(MSR_CSTAR, (unsigned long)entry_SYSCALL_compat); |
1342 /* | 1342 /* |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 static struct syscore_ops cpu_syscore_ops = { | 1639 static struct syscore_ops cpu_syscore_ops = { |
1640 .resume = bsp_resume, | 1640 .resume = bsp_resume, |
1641 }; | 1641 }; |
1642 | 1642 |
1643 static int __init init_cpu_syscore(void) | 1643 static int __init init_cpu_syscore(void) |
1644 { | 1644 { |
1645 register_syscore_ops(&cpu_syscore_ops); | 1645 register_syscore_ops(&cpu_syscore_ops); |
1646 return 0; | 1646 return 0; |
1647 } | 1647 } |
1648 core_initcall(init_cpu_syscore); | 1648 core_initcall(init_cpu_syscore); |
OLD | NEW |