File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ struct gdt_page {
4646} __attribute__((aligned (PAGE_SIZE )));
4747
4848DECLARE_PER_CPU_PAGE_ALIGNED (struct gdt_page , gdt_page );
49+ DECLARE_INIT_PER_CPU (gdt_page );
4950
5051/* Provide the original GDT */
5152static inline struct desc_struct * get_cpu_gdt_rw (unsigned int cpu )
Original file line number Diff line number Diff line change @@ -68,15 +68,6 @@ unsigned long vmemmap_base __ro_after_init = __VMEMMAP_BASE_L4;
6868EXPORT_SYMBOL (vmemmap_base );
6969#endif
7070
71- /*
72- * GDT used on the boot CPU before switching to virtual addresses.
73- */
74- static struct desc_struct startup_gdt [GDT_ENTRIES ] __initdata = {
75- [GDT_ENTRY_KERNEL32_CS ] = GDT_ENTRY_INIT (DESC_CODE32 , 0 , 0xfffff ),
76- [GDT_ENTRY_KERNEL_CS ] = GDT_ENTRY_INIT (DESC_CODE64 , 0 , 0xfffff ),
77- [GDT_ENTRY_KERNEL_DS ] = GDT_ENTRY_INIT (DESC_DATA64 , 0 , 0xfffff ),
78- };
79-
8071#ifdef CONFIG_X86_5LEVEL
8172static void __head * fixup_pointer (void * ptr , unsigned long physaddr )
8273{
@@ -589,8 +580,8 @@ void __head startup_64_setup_gdt_idt(void)
589580 void * handler = NULL ;
590581
591582 struct desc_ptr startup_gdt_descr = {
592- .address = (unsigned long )& RIP_REL_REF (startup_gdt ),
593- .size = sizeof ( startup_gdt ) - 1 ,
583+ .address = (unsigned long )& RIP_REL_REF (init_per_cpu_var ( gdt_page . gdt ) ),
584+ .size = GDT_SIZE - 1 ,
594585 };
595586
596587 /* Load GDT */
You can’t perform that action at this time.
0 commit comments