hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/kernel/asm-offsets_64.c
....@@ -5,15 +5,6 @@
55
66 #include <asm/ia32.h>
77
8
-#define __SYSCALL_64(nr, sym, qual) [nr] = 1,
9
-static char syscalls_64[] = {
10
-#include <asm/syscalls_64.h>
11
-};
12
-#define __SYSCALL_I386(nr, sym, qual) [nr] = 1,
13
-static char syscalls_ia32[] = {
14
-#include <asm/syscalls_32.h>
15
-};
16
-
178 #if defined(CONFIG_KVM_GUEST) && defined(CONFIG_PARAVIRT_SPINLOCKS)
189 #include <asm/kvm_para.h>
1910 #endif
....@@ -21,10 +12,12 @@
2112 int main(void)
2213 {
2314 #ifdef CONFIG_PARAVIRT
24
- OFFSET(PV_CPU_usergs_sysret64, pv_cpu_ops, usergs_sysret64);
25
- OFFSET(PV_CPU_swapgs, pv_cpu_ops, swapgs);
15
+#ifdef CONFIG_PARAVIRT_XXL
16
+ OFFSET(PV_CPU_usergs_sysret64, paravirt_patch_template,
17
+ cpu.usergs_sysret64);
2618 #ifdef CONFIG_DEBUG_ENTRY
27
- OFFSET(PV_IRQ_save_fl, pv_irq_ops, save_fl);
19
+ OFFSET(PV_IRQ_save_fl, paravirt_patch_template, irq.save_fl);
20
+#endif
2821 #endif
2922 BLANK();
3023 #endif
....@@ -59,24 +52,15 @@
5952 ENTRY(cr2);
6053 ENTRY(cr3);
6154 ENTRY(cr4);
62
- ENTRY(cr8);
6355 ENTRY(gdt_desc);
6456 BLANK();
6557 #undef ENTRY
6658
67
- OFFSET(TSS_ist, tss_struct, x86_tss.ist);
6859 BLANK();
6960
7061 #ifdef CONFIG_STACKPROTECTOR
71
- DEFINE(stack_canary_offset, offsetof(union irq_stack_union, stack_canary));
62
+ DEFINE(stack_canary_offset, offsetof(struct fixed_percpu_data, stack_canary));
7263 BLANK();
7364 #endif
74
-
75
- DEFINE(__NR_syscall_max, sizeof(syscalls_64) - 1);
76
- DEFINE(NR_syscalls, sizeof(syscalls_64));
77
-
78
- DEFINE(__NR_syscall_compat_max, sizeof(syscalls_ia32) - 1);
79
- DEFINE(IA32_NR_syscalls, sizeof(syscalls_ia32));
80
-
8165 return 0;
8266 }