diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/Makefile | 10 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/bugs.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/efi.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/efi_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/head_32.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/head_64.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/i387.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/i8259_32.c | 25 | ||||
-rw-r--r-- | arch/x86/kernel/io_delay.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/kprobes.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_32.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_64.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/setup_32.c | 1 | ||||
-rw-r--r-- | arch/x86/kernel/setup_64.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/topology.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_32.lds.S | 26 | ||||
-rw-r--r-- | arch/x86/kernel/vmlinux_64.lds.S | 30 |
19 files changed, 74 insertions, 94 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 76ec0f8f138a..4eb5ce841106 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -6,7 +6,15 @@ extra-y := head_$(BITS).o init_task.o vmlinux.lds | |||
6 | extra-$(CONFIG_X86_64) += head64.o | 6 | extra-$(CONFIG_X86_64) += head64.o |
7 | 7 | ||
8 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) | 8 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) |
9 | CFLAGS_vsyscall_64.o := $(PROFILING) -g0 | 9 | |
10 | # | ||
11 | # vsyscalls (which work on the user stack) should have | ||
12 | # no stack-protector checks: | ||
13 | # | ||
14 | nostackp := $(call cc-option, -fno-stack-protector) | ||
15 | CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp) | ||
16 | CFLAGS_hpet.o := $(nostackp) | ||
17 | CFLAGS_tsc_64.o := $(nostackp) | ||
10 | 18 | ||
11 | obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o | 19 | obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o |
12 | obj-y += traps_$(BITS).o irq_$(BITS).o | 20 | obj-y += traps_$(BITS).o irq_$(BITS).o |
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 9b95edcfc6ae..027e5c003b16 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
@@ -25,14 +25,6 @@ static int __init no_halt(char *s) | |||
25 | 25 | ||
26 | __setup("no-hlt", no_halt); | 26 | __setup("no-hlt", no_halt); |
27 | 27 | ||
28 | static int __init mca_pentium(char *s) | ||
29 | { | ||
30 | mca_pentium_flag = 1; | ||
31 | return 1; | ||
32 | } | ||
33 | |||
34 | __setup("mca-pentium", mca_pentium); | ||
35 | |||
36 | static int __init no_387(char *s) | 28 | static int __init no_387(char *s) |
37 | { | 29 | { |
38 | boot_cpu_data.hard_math = 0; | 30 | boot_cpu_data.hard_math = 0; |
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 0c0eeb163d90..759e02bec070 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c | |||
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(efi); | |||
54 | 54 | ||
55 | struct efi_memory_map memmap; | 55 | struct efi_memory_map memmap; |
56 | 56 | ||
57 | struct efi efi_phys __initdata; | 57 | static struct efi efi_phys __initdata; |
58 | static efi_system_table_t efi_systab __initdata; | 58 | static efi_system_table_t efi_systab __initdata; |
59 | 59 | ||
60 | static int __init setup_noefi(char *arg) | 60 | static int __init setup_noefi(char *arg) |
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c index cb91f985b4a1..5d23d85624d4 100644 --- a/arch/x86/kernel/efi_32.c +++ b/arch/x86/kernel/efi_32.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/page.h> | 28 | #include <asm/page.h> |
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable.h> |
30 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
31 | #include <asm/efi.h> | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * To make EFI call EFI runtime service in physical addressing mode we need | 34 | * To make EFI call EFI runtime service in physical addressing mode we need |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 824e21b80aad..4b87c32b639f 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -409,7 +409,7 @@ restore_nocheck_notrace: | |||
409 | RESTORE_REGS | 409 | RESTORE_REGS |
410 | addl $4, %esp # skip orig_eax/error_code | 410 | addl $4, %esp # skip orig_eax/error_code |
411 | CFI_ADJUST_CFA_OFFSET -4 | 411 | CFI_ADJUST_CFA_OFFSET -4 |
412 | ENTRY(irq_return) | 412 | irq_return: |
413 | INTERRUPT_RETURN | 413 | INTERRUPT_RETURN |
414 | .section .fixup,"ax" | 414 | .section .fixup,"ax" |
415 | iret_exc: | 415 | iret_exc: |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 6be39a387c5a..2ad9a1bc6a73 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -583,7 +583,7 @@ retint_restore_args: /* return to kernel space */ | |||
583 | restore_args: | 583 | restore_args: |
584 | RESTORE_ARGS 0,8,0 | 584 | RESTORE_ARGS 0,8,0 |
585 | 585 | ||
586 | ENTRY(irq_return) | 586 | irq_return: |
587 | INTERRUPT_RETURN | 587 | INTERRUPT_RETURN |
588 | 588 | ||
589 | .section __ex_table, "a" | 589 | .section __ex_table, "a" |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 74ef4a41f224..25eb98540a41 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -612,7 +612,7 @@ ENTRY(swapper_pg_pmd) | |||
612 | ENTRY(swapper_pg_dir) | 612 | ENTRY(swapper_pg_dir) |
613 | .fill 1024,4,0 | 613 | .fill 1024,4,0 |
614 | #endif | 614 | #endif |
615 | ENTRY(swapper_pg_fixmap) | 615 | swapper_pg_fixmap: |
616 | .fill 1024,4,0 | 616 | .fill 1024,4,0 |
617 | ENTRY(empty_zero_page) | 617 | ENTRY(empty_zero_page) |
618 | .fill 4096,1,0 | 618 | .fill 4096,1,0 |
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 53e5820d6054..eb415043a929 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -255,7 +255,7 @@ ENTRY(secondary_startup_64) | |||
255 | lretq | 255 | lretq |
256 | 256 | ||
257 | /* SMP bootup changes these two */ | 257 | /* SMP bootup changes these two */ |
258 | __CPUINITDATA | 258 | __REFDATA |
259 | .align 8 | 259 | .align 8 |
260 | ENTRY(initial_code) | 260 | ENTRY(initial_code) |
261 | .quad x86_64_start_kernel | 261 | .quad x86_64_start_kernel |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index 26719bd2c77c..763dfc407232 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #define HAVE_HWFP 1 | 39 | #define HAVE_HWFP 1 |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; | 42 | static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; |
43 | 43 | ||
44 | void mxcsr_feature_mask_init(void) | 44 | void mxcsr_feature_mask_init(void) |
45 | { | 45 | { |
diff --git a/arch/x86/kernel/i8259_32.c b/arch/x86/kernel/i8259_32.c index 2d25b77102fe..fe631967d625 100644 --- a/arch/x86/kernel/i8259_32.c +++ b/arch/x86/kernel/i8259_32.c | |||
@@ -26,8 +26,6 @@ | |||
26 | * present in the majority of PC/AT boxes. | 26 | * present in the majority of PC/AT boxes. |
27 | * plus some generic x86 specific things if generic specifics makes | 27 | * plus some generic x86 specific things if generic specifics makes |
28 | * any sense at all. | 28 | * any sense at all. |
29 | * this file should become arch/i386/kernel/irq.c when the old irq.c | ||
30 | * moves to arch independent land | ||
31 | */ | 29 | */ |
32 | 30 | ||
33 | static int i8259A_auto_eoi; | 31 | static int i8259A_auto_eoi; |
@@ -362,23 +360,12 @@ void __init init_ISA_irqs (void) | |||
362 | #endif | 360 | #endif |
363 | init_8259A(0); | 361 | init_8259A(0); |
364 | 362 | ||
365 | for (i = 0; i < NR_IRQS; i++) { | 363 | /* |
366 | irq_desc[i].status = IRQ_DISABLED; | 364 | * 16 old-style INTA-cycle interrupts: |
367 | irq_desc[i].action = NULL; | 365 | */ |
368 | irq_desc[i].depth = 1; | 366 | for (i = 0; i < 16; i++) { |
369 | 367 | set_irq_chip_and_handler_name(i, &i8259A_chip, | |
370 | if (i < 16) { | 368 | handle_level_irq, "XT"); |
371 | /* | ||
372 | * 16 old-style INTA-cycle interrupts: | ||
373 | */ | ||
374 | set_irq_chip_and_handler_name(i, &i8259A_chip, | ||
375 | handle_level_irq, "XT"); | ||
376 | } else { | ||
377 | /* | ||
378 | * 'high' PCI IRQs filled in on demand | ||
379 | */ | ||
380 | irq_desc[i].chip = &no_irq_chip; | ||
381 | } | ||
382 | } | 369 | } |
383 | } | 370 | } |
384 | 371 | ||
diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c index bd49321034db..c706a3061553 100644 --- a/arch/x86/kernel/io_delay.c +++ b/arch/x86/kernel/io_delay.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | 14 | ||
15 | int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; | 15 | int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; |
16 | EXPORT_SYMBOL_GPL(io_delay_type); | ||
17 | 16 | ||
18 | static int __initdata io_delay_override; | 17 | static int __initdata io_delay_override; |
19 | 18 | ||
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index a99e764fd66a..34a591283f5d 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -581,7 +581,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs) | |||
581 | * When a retprobed function returns, this code saves registers and | 581 | * When a retprobed function returns, this code saves registers and |
582 | * calls trampoline_handler() runs, which calls the kretprobe's handler. | 582 | * calls trampoline_handler() runs, which calls the kretprobe's handler. |
583 | */ | 583 | */ |
584 | void __kprobes kretprobe_trampoline_holder(void) | 584 | static void __used __kprobes kretprobe_trampoline_holder(void) |
585 | { | 585 | { |
586 | asm volatile ( | 586 | asm volatile ( |
587 | ".global kretprobe_trampoline\n" | 587 | ".global kretprobe_trampoline\n" |
@@ -673,7 +673,7 @@ void __kprobes kretprobe_trampoline_holder(void) | |||
673 | /* | 673 | /* |
674 | * Called from kretprobe_trampoline | 674 | * Called from kretprobe_trampoline |
675 | */ | 675 | */ |
676 | void * __kprobes trampoline_handler(struct pt_regs *regs) | 676 | static __used __kprobes void *trampoline_handler(struct pt_regs *regs) |
677 | { | 677 | { |
678 | struct kretprobe_instance *ri = NULL; | 678 | struct kretprobe_instance *ri = NULL; |
679 | struct hlist_head *head, empty_rp; | 679 | struct hlist_head *head, empty_rp; |
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index edd413650b3b..6a0aa7038685 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ; | |||
46 | 46 | ||
47 | static DEFINE_PER_CPU(short, wd_enabled); | 47 | static DEFINE_PER_CPU(short, wd_enabled); |
48 | 48 | ||
49 | /* local prototypes */ | ||
50 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); | ||
51 | |||
52 | static int endflag __initdata = 0; | 49 | static int endflag __initdata = 0; |
53 | 50 | ||
54 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
@@ -391,15 +388,6 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) | |||
391 | return rc; | 388 | return rc; |
392 | } | 389 | } |
393 | 390 | ||
394 | int do_nmi_callback(struct pt_regs * regs, int cpu) | ||
395 | { | ||
396 | #ifdef CONFIG_SYSCTL | ||
397 | if (unknown_nmi_panic) | ||
398 | return unknown_nmi_panic_callback(regs, cpu); | ||
399 | #endif | ||
400 | return 0; | ||
401 | } | ||
402 | |||
403 | #ifdef CONFIG_SYSCTL | 391 | #ifdef CONFIG_SYSCTL |
404 | 392 | ||
405 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | 393 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) |
@@ -453,6 +441,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
453 | 441 | ||
454 | #endif | 442 | #endif |
455 | 443 | ||
444 | int do_nmi_callback(struct pt_regs *regs, int cpu) | ||
445 | { | ||
446 | #ifdef CONFIG_SYSCTL | ||
447 | if (unknown_nmi_panic) | ||
448 | return unknown_nmi_panic_callback(regs, cpu); | ||
449 | #endif | ||
450 | return 0; | ||
451 | } | ||
452 | |||
456 | void __trigger_all_cpu_backtrace(void) | 453 | void __trigger_all_cpu_backtrace(void) |
457 | { | 454 | { |
458 | int i; | 455 | int i; |
diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c index fb99484d21cf..9a4fde74bee1 100644 --- a/arch/x86/kernel/nmi_64.c +++ b/arch/x86/kernel/nmi_64.c | |||
@@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ; | |||
46 | 46 | ||
47 | static DEFINE_PER_CPU(short, wd_enabled); | 47 | static DEFINE_PER_CPU(short, wd_enabled); |
48 | 48 | ||
49 | /* local prototypes */ | ||
50 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); | ||
51 | |||
52 | /* Run after command line and cpu_init init, but before all other checks */ | 49 | /* Run after command line and cpu_init init, but before all other checks */ |
53 | void nmi_watchdog_default(void) | 50 | void nmi_watchdog_default(void) |
54 | { | 51 | { |
@@ -394,15 +391,6 @@ asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) | |||
394 | nmi_exit(); | 391 | nmi_exit(); |
395 | } | 392 | } |
396 | 393 | ||
397 | int do_nmi_callback(struct pt_regs * regs, int cpu) | ||
398 | { | ||
399 | #ifdef CONFIG_SYSCTL | ||
400 | if (unknown_nmi_panic) | ||
401 | return unknown_nmi_panic_callback(regs, cpu); | ||
402 | #endif | ||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | void stop_nmi(void) | 394 | void stop_nmi(void) |
407 | { | 395 | { |
408 | acpi_nmi_disable(); | 396 | acpi_nmi_disable(); |
@@ -464,6 +452,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
464 | 452 | ||
465 | #endif | 453 | #endif |
466 | 454 | ||
455 | int do_nmi_callback(struct pt_regs *regs, int cpu) | ||
456 | { | ||
457 | #ifdef CONFIG_SYSCTL | ||
458 | if (unknown_nmi_panic) | ||
459 | return unknown_nmi_panic_callback(regs, cpu); | ||
460 | #endif | ||
461 | return 0; | ||
462 | } | ||
463 | |||
467 | void __trigger_all_cpu_backtrace(void) | 464 | void __trigger_all_cpu_backtrace(void) |
468 | { | 465 | { |
469 | int i; | 466 | int i; |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 691ab4cb167b..a1d7071a51c9 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -164,7 +164,6 @@ unsigned long mmu_cr4_features = X86_CR4_PAE; | |||
164 | unsigned int machine_id; | 164 | unsigned int machine_id; |
165 | unsigned int machine_submodel_id; | 165 | unsigned int machine_submodel_id; |
166 | unsigned int BIOS_revision; | 166 | unsigned int BIOS_revision; |
167 | unsigned int mca_pentium_flag; | ||
168 | 167 | ||
169 | /* Boot loader ID as an integer, for the benefit of proc_dointvec */ | 168 | /* Boot loader ID as an integer, for the benefit of proc_dointvec */ |
170 | int bootloader_type; | 169 | int bootloader_type; |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index c0d8208af12a..6fd804f07821 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -518,7 +518,7 @@ static void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) | |||
518 | } | 518 | } |
519 | 519 | ||
520 | #ifdef CONFIG_NUMA | 520 | #ifdef CONFIG_NUMA |
521 | static int nearby_node(int apicid) | 521 | static int __cpuinit nearby_node(int apicid) |
522 | { | 522 | { |
523 | int i, node; | 523 | int i, node; |
524 | 524 | ||
@@ -791,7 +791,7 @@ static int __cpuinit intel_num_cpu_cores(struct cpuinfo_x86 *c) | |||
791 | return 1; | 791 | return 1; |
792 | } | 792 | } |
793 | 793 | ||
794 | static void srat_detect_node(void) | 794 | static void __cpuinit srat_detect_node(void) |
795 | { | 795 | { |
796 | #ifdef CONFIG_NUMA | 796 | #ifdef CONFIG_NUMA |
797 | unsigned node; | 797 | unsigned node; |
@@ -1046,7 +1046,7 @@ __setup("noclflush", setup_noclflush); | |||
1046 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | 1046 | void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) |
1047 | { | 1047 | { |
1048 | if (c->x86_model_id[0]) | 1048 | if (c->x86_model_id[0]) |
1049 | printk(KERN_INFO "%s", c->x86_model_id); | 1049 | printk(KERN_CONT "%s", c->x86_model_id); |
1050 | 1050 | ||
1051 | if (c->x86_mask || c->cpuid_level >= 0) | 1051 | if (c->x86_mask || c->cpuid_level >= 0) |
1052 | printk(KERN_CONT " stepping %02x\n", c->x86_mask); | 1052 | printk(KERN_CONT " stepping %02x\n", c->x86_mask); |
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c index a40051b71d9b..0fcc95a354f7 100644 --- a/arch/x86/kernel/topology.c +++ b/arch/x86/kernel/topology.c | |||
@@ -34,7 +34,7 @@ | |||
34 | static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); | 34 | static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); |
35 | 35 | ||
36 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
37 | int arch_register_cpu(int num) | 37 | int __ref arch_register_cpu(int num) |
38 | { | 38 | { |
39 | /* | 39 | /* |
40 | * CPU0 cannot be offlined due to several | 40 | * CPU0 cannot be offlined due to several |
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S index f1148ac8abe3..2ffa9656fe7a 100644 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ b/arch/x86/kernel/vmlinux_32.lds.S | |||
@@ -38,7 +38,7 @@ SECTIONS | |||
38 | 38 | ||
39 | /* read-only */ | 39 | /* read-only */ |
40 | .text : AT(ADDR(.text) - LOAD_OFFSET) { | 40 | .text : AT(ADDR(.text) - LOAD_OFFSET) { |
41 | . = ALIGN(4096); /* not really needed, already page aligned */ | 41 | . = ALIGN(PAGE_SIZE); /* not really needed, already page aligned */ |
42 | *(.text.page_aligned) | 42 | *(.text.page_aligned) |
43 | TEXT_TEXT | 43 | TEXT_TEXT |
44 | SCHED_TEXT | 44 | SCHED_TEXT |
@@ -70,21 +70,21 @@ SECTIONS | |||
70 | RODATA | 70 | RODATA |
71 | 71 | ||
72 | /* writeable */ | 72 | /* writeable */ |
73 | . = ALIGN(4096); | 73 | . = ALIGN(PAGE_SIZE); |
74 | .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ | 74 | .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ |
75 | DATA_DATA | 75 | DATA_DATA |
76 | CONSTRUCTORS | 76 | CONSTRUCTORS |
77 | } :data | 77 | } :data |
78 | 78 | ||
79 | . = ALIGN(4096); | 79 | . = ALIGN(PAGE_SIZE); |
80 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { | 80 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { |
81 | __nosave_begin = .; | 81 | __nosave_begin = .; |
82 | *(.data.nosave) | 82 | *(.data.nosave) |
83 | . = ALIGN(4096); | 83 | . = ALIGN(PAGE_SIZE); |
84 | __nosave_end = .; | 84 | __nosave_end = .; |
85 | } | 85 | } |
86 | 86 | ||
87 | . = ALIGN(4096); | 87 | . = ALIGN(PAGE_SIZE); |
88 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { | 88 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { |
89 | *(.data.page_aligned) | 89 | *(.data.page_aligned) |
90 | *(.data.idt) | 90 | *(.data.idt) |
@@ -108,7 +108,7 @@ SECTIONS | |||
108 | } | 108 | } |
109 | 109 | ||
110 | /* might get freed after init */ | 110 | /* might get freed after init */ |
111 | . = ALIGN(4096); | 111 | . = ALIGN(PAGE_SIZE); |
112 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | 112 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { |
113 | __smp_locks = .; | 113 | __smp_locks = .; |
114 | *(.smp_locks) | 114 | *(.smp_locks) |
@@ -120,10 +120,10 @@ SECTIONS | |||
120 | * after boot. Always make sure that ALIGN() directive is present after | 120 | * after boot. Always make sure that ALIGN() directive is present after |
121 | * the section which contains __smp_alt_end. | 121 | * the section which contains __smp_alt_end. |
122 | */ | 122 | */ |
123 | . = ALIGN(4096); | 123 | . = ALIGN(PAGE_SIZE); |
124 | 124 | ||
125 | /* will be freed after init */ | 125 | /* will be freed after init */ |
126 | . = ALIGN(4096); /* Init code and data */ | 126 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
127 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 127 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { |
128 | __init_begin = .; | 128 | __init_begin = .; |
129 | _sinittext = .; | 129 | _sinittext = .; |
@@ -174,23 +174,23 @@ SECTIONS | |||
174 | EXIT_DATA | 174 | EXIT_DATA |
175 | } | 175 | } |
176 | #if defined(CONFIG_BLK_DEV_INITRD) | 176 | #if defined(CONFIG_BLK_DEV_INITRD) |
177 | . = ALIGN(4096); | 177 | . = ALIGN(PAGE_SIZE); |
178 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { | 178 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { |
179 | __initramfs_start = .; | 179 | __initramfs_start = .; |
180 | *(.init.ramfs) | 180 | *(.init.ramfs) |
181 | __initramfs_end = .; | 181 | __initramfs_end = .; |
182 | } | 182 | } |
183 | #endif | 183 | #endif |
184 | . = ALIGN(4096); | 184 | . = ALIGN(PAGE_SIZE); |
185 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { | 185 | .data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { |
186 | __per_cpu_start = .; | 186 | __per_cpu_start = .; |
187 | *(.data.percpu) | 187 | *(.data.percpu) |
188 | *(.data.percpu.shared_aligned) | 188 | *(.data.percpu.shared_aligned) |
189 | __per_cpu_end = .; | 189 | __per_cpu_end = .; |
190 | } | 190 | } |
191 | . = ALIGN(4096); | 191 | . = ALIGN(PAGE_SIZE); |
192 | /* freed after init ends here */ | 192 | /* freed after init ends here */ |
193 | 193 | ||
194 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { | 194 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { |
195 | __init_end = .; | 195 | __init_end = .; |
196 | __bss_start = .; /* BSS */ | 196 | __bss_start = .; /* BSS */ |
@@ -200,7 +200,7 @@ SECTIONS | |||
200 | __bss_stop = .; | 200 | __bss_stop = .; |
201 | _end = . ; | 201 | _end = . ; |
202 | /* This is where the kernel creates the early boot page tables */ | 202 | /* This is where the kernel creates the early boot page tables */ |
203 | . = ALIGN(4096); | 203 | . = ALIGN(PAGE_SIZE); |
204 | pg0 = . ; | 204 | pg0 = . ; |
205 | } | 205 | } |
206 | 206 | ||
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S index 0992b9946c6f..fab132299735 100644 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ b/arch/x86/kernel/vmlinux_64.lds.S | |||
@@ -37,7 +37,7 @@ SECTIONS | |||
37 | KPROBES_TEXT | 37 | KPROBES_TEXT |
38 | *(.fixup) | 38 | *(.fixup) |
39 | *(.gnu.warning) | 39 | *(.gnu.warning) |
40 | _etext = .; /* End of text section */ | 40 | _etext = .; /* End of text section */ |
41 | } :text = 0x9090 | 41 | } :text = 0x9090 |
42 | 42 | ||
43 | . = ALIGN(16); /* Exception table */ | 43 | . = ALIGN(16); /* Exception table */ |
@@ -60,7 +60,7 @@ SECTIONS | |||
60 | __tracedata_end = .; | 60 | __tracedata_end = .; |
61 | } | 61 | } |
62 | 62 | ||
63 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ | 63 | . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ |
64 | /* Data */ | 64 | /* Data */ |
65 | .data : AT(ADDR(.data) - LOAD_OFFSET) { | 65 | .data : AT(ADDR(.data) - LOAD_OFFSET) { |
66 | DATA_DATA | 66 | DATA_DATA |
@@ -119,7 +119,7 @@ SECTIONS | |||
119 | .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) | 119 | .vsyscall_3 ADDR(.vsyscall_0) + 3072: AT(VLOAD(.vsyscall_3)) |
120 | { *(.vsyscall_3) } | 120 | { *(.vsyscall_3) } |
121 | 121 | ||
122 | . = VSYSCALL_VIRT_ADDR + 4096; | 122 | . = VSYSCALL_VIRT_ADDR + PAGE_SIZE; |
123 | 123 | ||
124 | #undef VSYSCALL_ADDR | 124 | #undef VSYSCALL_ADDR |
125 | #undef VSYSCALL_PHYS_ADDR | 125 | #undef VSYSCALL_PHYS_ADDR |
@@ -129,28 +129,28 @@ SECTIONS | |||
129 | #undef VVIRT_OFFSET | 129 | #undef VVIRT_OFFSET |
130 | #undef VVIRT | 130 | #undef VVIRT |
131 | 131 | ||
132 | . = ALIGN(8192); /* init_task */ | 132 | . = ALIGN(THREAD_SIZE); /* init_task */ |
133 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { | 133 | .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { |
134 | *(.data.init_task) | 134 | *(.data.init_task) |
135 | }:data.init | 135 | }:data.init |
136 | 136 | ||
137 | . = ALIGN(4096); | 137 | . = ALIGN(PAGE_SIZE); |
138 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { | 138 | .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { |
139 | *(.data.page_aligned) | 139 | *(.data.page_aligned) |
140 | } | 140 | } |
141 | 141 | ||
142 | /* might get freed after init */ | 142 | /* might get freed after init */ |
143 | . = ALIGN(4096); | 143 | . = ALIGN(PAGE_SIZE); |
144 | __smp_alt_begin = .; | 144 | __smp_alt_begin = .; |
145 | __smp_locks = .; | 145 | __smp_locks = .; |
146 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { | 146 | .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { |
147 | *(.smp_locks) | 147 | *(.smp_locks) |
148 | } | 148 | } |
149 | __smp_locks_end = .; | 149 | __smp_locks_end = .; |
150 | . = ALIGN(4096); | 150 | . = ALIGN(PAGE_SIZE); |
151 | __smp_alt_end = .; | 151 | __smp_alt_end = .; |
152 | 152 | ||
153 | . = ALIGN(4096); /* Init code and data */ | 153 | . = ALIGN(PAGE_SIZE); /* Init code and data */ |
154 | __init_begin = .; | 154 | __init_begin = .; |
155 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { | 155 | .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { |
156 | _sinittext = .; | 156 | _sinittext = .; |
@@ -191,7 +191,7 @@ SECTIONS | |||
191 | .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { | 191 | .altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) { |
192 | *(.altinstructions) | 192 | *(.altinstructions) |
193 | } | 193 | } |
194 | __alt_instructions_end = .; | 194 | __alt_instructions_end = .; |
195 | .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { | 195 | .altinstr_replacement : AT(ADDR(.altinstr_replacement) - LOAD_OFFSET) { |
196 | *(.altinstr_replacement) | 196 | *(.altinstr_replacement) |
197 | } | 197 | } |
@@ -207,25 +207,25 @@ SECTIONS | |||
207 | /* vdso blob that is mapped into user space */ | 207 | /* vdso blob that is mapped into user space */ |
208 | vdso_start = . ; | 208 | vdso_start = . ; |
209 | .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) } | 209 | .vdso : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) } |
210 | . = ALIGN(4096); | 210 | . = ALIGN(PAGE_SIZE); |
211 | vdso_end = .; | 211 | vdso_end = .; |
212 | 212 | ||
213 | #ifdef CONFIG_BLK_DEV_INITRD | 213 | #ifdef CONFIG_BLK_DEV_INITRD |
214 | . = ALIGN(4096); | 214 | . = ALIGN(PAGE_SIZE); |
215 | __initramfs_start = .; | 215 | __initramfs_start = .; |
216 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } | 216 | .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) } |
217 | __initramfs_end = .; | 217 | __initramfs_end = .; |
218 | #endif | 218 | #endif |
219 | 219 | ||
220 | PERCPU(4096) | 220 | PERCPU(PAGE_SIZE) |
221 | 221 | ||
222 | . = ALIGN(4096); | 222 | . = ALIGN(PAGE_SIZE); |
223 | __init_end = .; | 223 | __init_end = .; |
224 | 224 | ||
225 | . = ALIGN(4096); | 225 | . = ALIGN(PAGE_SIZE); |
226 | __nosave_begin = .; | 226 | __nosave_begin = .; |
227 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) } | 227 | .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { *(.data.nosave) } |
228 | . = ALIGN(4096); | 228 | . = ALIGN(PAGE_SIZE); |
229 | __nosave_end = .; | 229 | __nosave_end = .; |
230 | 230 | ||
231 | __bss_start = .; /* BSS */ | 231 | __bss_start = .; /* BSS */ |