aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 922c5e0cea4c..fa95bb8829ce 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -13,6 +13,7 @@
13#include <linux/kgdb.h> 13#include <linux/kgdb.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/syscore_ops.h>
16 17
17#include <asm/stackprotector.h> 18#include <asm/stackprotector.h>
18#include <asm/perf_event.h> 19#include <asm/perf_event.h>
@@ -1488,3 +1489,20 @@ inline bool __static_cpu_has_safe(u16 bit)
1488 return boot_cpu_has(bit); 1489 return boot_cpu_has(bit);
1489} 1490}
1490EXPORT_SYMBOL_GPL(__static_cpu_has_safe); 1491EXPORT_SYMBOL_GPL(__static_cpu_has_safe);
1492
1493static void bsp_resume(void)
1494{
1495 if (this_cpu->c_bsp_resume)
1496 this_cpu->c_bsp_resume(&boot_cpu_data);
1497}
1498
1499static struct syscore_ops cpu_syscore_ops = {
1500 .resume = bsp_resume,
1501};
1502
1503static int __init init_cpu_syscore(void)
1504{
1505 register_syscore_ops(&cpu_syscore_ops);
1506 return 0;
1507}
1508core_initcall(init_cpu_syscore);