aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/Makefile10
-rw-r--r--arch/x86/kernel/acpi/boot.c3
-rw-r--r--arch/x86/kernel/acpi/cstate.c2
-rw-r--r--arch/x86/kernel/asm-offsets_32.c6
-rw-r--r--arch/x86/kernel/cpu/bugs.c8
-rw-r--r--arch/x86/kernel/efi.c16
-rw-r--r--arch/x86/kernel/efi_32.c1
-rw-r--r--arch/x86/kernel/efi_64.c32
-rw-r--r--arch/x86/kernel/entry_32.S2
-rw-r--r--arch/x86/kernel/entry_64.S2
-rw-r--r--arch/x86/kernel/head64.c3
-rw-r--r--arch/x86/kernel/head_32.S2
-rw-r--r--arch/x86/kernel/head_64.S9
-rw-r--r--arch/x86/kernel/i387.c2
-rw-r--r--arch/x86/kernel/i8253.c2
-rw-r--r--arch/x86/kernel/i8259_32.c25
-rw-r--r--arch/x86/kernel/io_delay.c1
-rw-r--r--arch/x86/kernel/kprobes.c4
-rw-r--r--arch/x86/kernel/nmi_32.c21
-rw-r--r--arch/x86/kernel/nmi_64.c21
-rw-r--r--arch/x86/kernel/pci-gart_64.c9
-rw-r--r--arch/x86/kernel/ptrace.c4
-rw-r--r--arch/x86/kernel/reboot.c46
-rw-r--r--arch/x86/kernel/setup_32.c1
-rw-r--r--arch/x86/kernel/setup_64.c6
-rw-r--r--arch/x86/kernel/test_rodata.c2
-rw-r--r--arch/x86/kernel/topology.c2
-rw-r--r--arch/x86/kernel/traps_64.c4
-rw-r--r--arch/x86/kernel/vmlinux_32.lds.S26
-rw-r--r--arch/x86/kernel/vmlinux_64.lds.S30
30 files changed, 161 insertions, 141 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
6extra-$(CONFIG_X86_64) += head64.o 6extra-$(CONFIG_X86_64) += head64.o
7 7
8CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) 8CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
9CFLAGS_vsyscall_64.o := $(PROFILING) -g0 9
10#
11# vsyscalls (which work on the user stack) should have
12# no stack-protector checks:
13#
14nostackp := $(call cc-option, -fno-stack-protector)
15CFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp)
16CFLAGS_hpet.o := $(nostackp)
17CFLAGS_tsc_64.o := $(nostackp)
10 18
11obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o 19obj-y := process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
12obj-y += traps_$(BITS).o irq_$(BITS).o 20obj-y += traps_$(BITS).o irq_$(BITS).o
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 680b7300a489..2cdc9de9371d 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -72,7 +72,8 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return
72#define PREFIX "ACPI: " 72#define PREFIX "ACPI: "
73 73
74int acpi_noirq; /* skip ACPI IRQ initialization */ 74int acpi_noirq; /* skip ACPI IRQ initialization */
75int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ 75int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */
76EXPORT_SYMBOL(acpi_pci_disabled);
76int acpi_ht __initdata = 1; /* enable HT */ 77int acpi_ht __initdata = 1; /* enable HT */
77 78
78int acpi_lapic; 79int acpi_lapic;
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 10b67170b133..8ca3557a6d59 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -126,6 +126,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
126 printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d " 126 printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d "
127 "state\n", cx->type); 127 "state\n", cx->type);
128 } 128 }
129 snprintf(cx->desc, ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
130 cx->address);
129 131
130out: 132out:
131 set_cpus_allowed(current, saved_mask); 133 set_cpus_allowed(current, saved_mask);
diff --git a/arch/x86/kernel/asm-offsets_32.c b/arch/x86/kernel/asm-offsets_32.c
index afd84463b712..a33d53017997 100644
--- a/arch/x86/kernel/asm-offsets_32.c
+++ b/arch/x86/kernel/asm-offsets_32.c
@@ -20,10 +20,8 @@
20 20
21#include <xen/interface/xen.h> 21#include <xen/interface/xen.h>
22 22
23#ifdef CONFIG_LGUEST_GUEST
24#include <linux/lguest.h> 23#include <linux/lguest.h>
25#include "../../../drivers/lguest/lg.h" 24#include "../../../drivers/lguest/lg.h"
26#endif
27 25
28#define DEFINE(sym, val) \ 26#define DEFINE(sym, val) \
29 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 27 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -134,6 +132,10 @@ void foo(void)
134 BLANK(); 132 BLANK();
135 OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled); 133 OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
136 OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir); 134 OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir);
135#endif
136
137#ifdef CONFIG_LGUEST
138 BLANK();
137 OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc); 139 OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
138 OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc); 140 OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
139 OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3); 141 OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
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
28static int __init mca_pentium(char *s)
29{
30 mca_pentium_flag = 1;
31 return 1;
32}
33
34__setup("mca-pentium", mca_pentium);
35
36static int __init no_387(char *s) 28static 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 32dd62b36ff7..759e02bec070 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(efi);
54 54
55struct efi_memory_map memmap; 55struct efi_memory_map memmap;
56 56
57struct efi efi_phys __initdata; 57static struct efi efi_phys __initdata;
58static efi_system_table_t efi_systab __initdata; 58static efi_system_table_t efi_systab __initdata;
59 59
60static int __init setup_noefi(char *arg) 60static int __init setup_noefi(char *arg)
@@ -384,9 +384,6 @@ static void __init runtime_code_page_mkexec(void)
384 efi_memory_desc_t *md; 384 efi_memory_desc_t *md;
385 void *p; 385 void *p;
386 386
387 if (!(__supported_pte_mask & _PAGE_NX))
388 return;
389
390 /* Make EFI runtime service code area executable */ 387 /* Make EFI runtime service code area executable */
391 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { 388 for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
392 md = p; 389 md = p;
@@ -394,7 +391,7 @@ static void __init runtime_code_page_mkexec(void)
394 if (md->type != EFI_RUNTIME_SERVICES_CODE) 391 if (md->type != EFI_RUNTIME_SERVICES_CODE)
395 continue; 392 continue;
396 393
397 set_memory_x(md->virt_addr, md->num_pages << EFI_PAGE_SHIFT); 394 set_memory_x(md->virt_addr, md->num_pages);
398 } 395 }
399} 396}
400 397
@@ -428,9 +425,6 @@ void __init efi_enter_virtual_mode(void)
428 else 425 else
429 va = efi_ioremap(md->phys_addr, size); 426 va = efi_ioremap(md->phys_addr, size);
430 427
431 if (md->attribute & EFI_MEMORY_WB)
432 set_memory_uc(md->virt_addr, size);
433
434 md->virt_addr = (u64) (unsigned long) va; 428 md->virt_addr = (u64) (unsigned long) va;
435 429
436 if (!va) { 430 if (!va) {
@@ -439,6 +433,9 @@ void __init efi_enter_virtual_mode(void)
439 continue; 433 continue;
440 } 434 }
441 435
436 if (!(md->attribute & EFI_MEMORY_WB))
437 set_memory_uc(md->virt_addr, md->num_pages);
438
442 systab = (u64) (unsigned long) efi_phys.systab; 439 systab = (u64) (unsigned long) efi_phys.systab;
443 if (md->phys_addr <= systab && systab < end) { 440 if (md->phys_addr <= systab && systab < end) {
444 systab += md->virt_addr - md->phys_addr; 441 systab += md->virt_addr - md->phys_addr;
@@ -476,7 +473,8 @@ void __init efi_enter_virtual_mode(void)
476 efi.get_next_high_mono_count = virt_efi_get_next_high_mono_count; 473 efi.get_next_high_mono_count = virt_efi_get_next_high_mono_count;
477 efi.reset_system = virt_efi_reset_system; 474 efi.reset_system = virt_efi_reset_system;
478 efi.set_virtual_address_map = virt_efi_set_virtual_address_map; 475 efi.set_virtual_address_map = virt_efi_set_virtual_address_map;
479 runtime_code_page_mkexec(); 476 if (__supported_pte_mask & _PAGE_NX)
477 runtime_code_page_mkexec();
480 early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size); 478 early_iounmap(memmap.map, memmap.nr_map * memmap.desc_size);
481 memmap.map = NULL; 479 memmap.map = NULL;
482} 480}
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/efi_64.c b/arch/x86/kernel/efi_64.c
index 09d5c2330934..d143a1e76b30 100644
--- a/arch/x86/kernel/efi_64.c
+++ b/arch/x86/kernel/efi_64.c
@@ -35,6 +35,7 @@
35#include <asm/tlbflush.h> 35#include <asm/tlbflush.h>
36#include <asm/proto.h> 36#include <asm/proto.h>
37#include <asm/efi.h> 37#include <asm/efi.h>
38#include <asm/cacheflush.h>
38 39
39static pgd_t save_pgd __initdata; 40static pgd_t save_pgd __initdata;
40static unsigned long efi_flags __initdata; 41static unsigned long efi_flags __initdata;
@@ -43,22 +44,15 @@ static void __init early_mapping_set_exec(unsigned long start,
43 unsigned long end, 44 unsigned long end,
44 int executable) 45 int executable)
45{ 46{
46 pte_t *kpte; 47 unsigned long num_pages;
47 unsigned int level; 48
48 49 start &= PMD_MASK;
49 while (start < end) { 50 end = (end + PMD_SIZE - 1) & PMD_MASK;
50 kpte = lookup_address((unsigned long)__va(start), &level); 51 num_pages = (end - start) >> PAGE_SHIFT;
51 BUG_ON(!kpte); 52 if (executable)
52 if (executable) 53 set_memory_x((unsigned long)__va(start), num_pages);
53 set_pte(kpte, pte_mkexec(*kpte)); 54 else
54 else 55 set_memory_nx((unsigned long)__va(start), num_pages);
55 set_pte(kpte, __pte((pte_val(*kpte) | _PAGE_NX) & \
56 __supported_pte_mask));
57 if (level == PG_LEVEL_4K)
58 start = (start + PAGE_SIZE) & PAGE_MASK;
59 else
60 start = (start + PMD_SIZE) & PMD_MASK;
61 }
62} 56}
63 57
64static void __init early_runtime_code_mapping_set_exec(int executable) 58static void __init early_runtime_code_mapping_set_exec(int executable)
@@ -74,7 +68,7 @@ static void __init early_runtime_code_mapping_set_exec(int executable)
74 md = p; 68 md = p;
75 if (md->type == EFI_RUNTIME_SERVICES_CODE) { 69 if (md->type == EFI_RUNTIME_SERVICES_CODE) {
76 unsigned long end; 70 unsigned long end;
77 end = md->phys_addr + (md->num_pages << PAGE_SHIFT); 71 end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT);
78 early_mapping_set_exec(md->phys_addr, end, executable); 72 early_mapping_set_exec(md->phys_addr, end, executable);
79 } 73 }
80 } 74 }
@@ -84,8 +78,8 @@ void __init efi_call_phys_prelog(void)
84{ 78{
85 unsigned long vaddress; 79 unsigned long vaddress;
86 80
87 local_irq_save(efi_flags);
88 early_runtime_code_mapping_set_exec(1); 81 early_runtime_code_mapping_set_exec(1);
82 local_irq_save(efi_flags);
89 vaddress = (unsigned long)__va(0x0UL); 83 vaddress = (unsigned long)__va(0x0UL);
90 save_pgd = *pgd_offset_k(0x0UL); 84 save_pgd = *pgd_offset_k(0x0UL);
91 set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress)); 85 set_pgd(pgd_offset_k(0x0UL), *pgd_offset_k(vaddress));
@@ -98,9 +92,9 @@ void __init efi_call_phys_epilog(void)
98 * After the lock is released, the original page table is restored. 92 * After the lock is released, the original page table is restored.
99 */ 93 */
100 set_pgd(pgd_offset_k(0x0UL), save_pgd); 94 set_pgd(pgd_offset_k(0x0UL), save_pgd);
101 early_runtime_code_mapping_set_exec(0);
102 __flush_tlb_all(); 95 __flush_tlb_all();
103 local_irq_restore(efi_flags); 96 local_irq_restore(efi_flags);
97 early_runtime_code_mapping_set_exec(0);
104} 98}
105 99
106void __init efi_reserve_bootmem(void) 100void __init efi_reserve_bootmem(void)
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
412ENTRY(irq_return) 412irq_return:
413 INTERRUPT_RETURN 413 INTERRUPT_RETURN
414.section .fixup,"ax" 414.section .fixup,"ax"
415iret_exc: 415iret_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 */
583restore_args: 583restore_args:
584 RESTORE_ARGS 0,8,0 584 RESTORE_ARGS 0,8,0
585 585
586ENTRY(irq_return) 586irq_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/head64.c b/arch/x86/kernel/head64.c
index 24dbf56928d7..ad2440832de0 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -88,6 +88,9 @@ void __init x86_64_start_kernel(char * real_mode_data)
88 /* Make NULL pointers segfault */ 88 /* Make NULL pointers segfault */
89 zap_identity_mappings(); 89 zap_identity_mappings();
90 90
91 /* Cleanup the over mapped high alias */
92 cleanup_highmap();
93
91 for (i = 0; i < IDT_ENTRIES; i++) { 94 for (i = 0; i < IDT_ENTRIES; i++) {
92#ifdef CONFIG_EARLY_PRINTK 95#ifdef CONFIG_EARLY_PRINTK
93 set_intr_gate(i, &early_idt_handlers[i]); 96 set_intr_gate(i, &early_idt_handlers[i]);
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)
612ENTRY(swapper_pg_dir) 612ENTRY(swapper_pg_dir)
613 .fill 1024,4,0 613 .fill 1024,4,0
614#endif 614#endif
615ENTRY(swapper_pg_fixmap) 615swapper_pg_fixmap:
616 .fill 1024,4,0 616 .fill 1024,4,0
617ENTRY(empty_zero_page) 617ENTRY(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 09b38d539b09..eb415043a929 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -107,8 +107,13 @@ startup_64:
107 movq %rdx, 0(%rbx, %rax, 8) 107 movq %rdx, 0(%rbx, %rax, 8)
108ident_complete: 108ident_complete:
109 109
110 /* Fixup the kernel text+data virtual addresses 110 /*
111 * Fixup the kernel text+data virtual addresses. Note that
112 * we might write invalid pmds, when the kernel is relocated
113 * cleanup_highmap() fixes this up along with the mappings
114 * beyond _end.
111 */ 115 */
116
112 leaq level2_kernel_pgt(%rip), %rdi 117 leaq level2_kernel_pgt(%rip), %rdi
113 leaq 4096(%rdi), %r8 118 leaq 4096(%rdi), %r8
114 /* See if it is a valid page table entry */ 119 /* See if it is a valid page table entry */
@@ -250,7 +255,7 @@ ENTRY(secondary_startup_64)
250 lretq 255 lretq
251 256
252 /* SMP bootup changes these two */ 257 /* SMP bootup changes these two */
253 __CPUINITDATA 258 __REFDATA
254 .align 8 259 .align 8
255 ENTRY(initial_code) 260 ENTRY(initial_code)
256 .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
42unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; 42static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu;
43 43
44void mxcsr_feature_mask_init(void) 44void mxcsr_feature_mask_init(void)
45{ 45{
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c
index ef62b07b2b48..8540abe86ade 100644
--- a/arch/x86/kernel/i8253.c
+++ b/arch/x86/kernel/i8253.c
@@ -95,7 +95,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
95 * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - 95 * registered. This mechanism replaces the previous #ifdef LOCAL_APIC -
96 * !using_apic_timer decisions in do_timer_interrupt_hook() 96 * !using_apic_timer decisions in do_timer_interrupt_hook()
97 */ 97 */
98struct clock_event_device pit_clockevent = { 98static struct clock_event_device pit_clockevent = {
99 .name = "pit", 99 .name = "pit",
100 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 100 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
101 .set_mode = init_pit_timer, 101 .set_mode = init_pit_timer,
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
33static int i8259A_auto_eoi; 31static 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
15int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; 15int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE;
16EXPORT_SYMBOL_GPL(io_delay_type);
17 16
18static int __initdata io_delay_override; 17static 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 */
584void __kprobes kretprobe_trampoline_holder(void) 584static 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 */
676void * __kprobes trampoline_handler(struct pt_regs *regs) 676static __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
47static DEFINE_PER_CPU(short, wd_enabled); 47static DEFINE_PER_CPU(short, wd_enabled);
48 48
49/* local prototypes */
50static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu);
51
52static int endflag __initdata = 0; 49static 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
394int 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
405static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) 393static 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
444int 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
456void __trigger_all_cpu_backtrace(void) 453void __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
47static DEFINE_PER_CPU(short, wd_enabled); 47static DEFINE_PER_CPU(short, wd_enabled);
48 48
49/* local prototypes */
50static 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 */
53void nmi_watchdog_default(void) 50void 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
397int 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
406void stop_nmi(void) 394void 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
455int 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
467void __trigger_all_cpu_backtrace(void) 464void __trigger_all_cpu_backtrace(void)
468{ 465{
469 int i; 466 int i;
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 65f6acb025c8..faf3229f8fb3 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -749,6 +749,15 @@ void __init gart_iommu_init(void)
749 */ 749 */
750 set_memory_np((unsigned long)__va(iommu_bus_base), 750 set_memory_np((unsigned long)__va(iommu_bus_base),
751 iommu_size >> PAGE_SHIFT); 751 iommu_size >> PAGE_SHIFT);
752 /*
753 * Tricky. The GART table remaps the physical memory range,
754 * so the CPU wont notice potential aliases and if the memory
755 * is remapped to UC later on, we might surprise the PCI devices
756 * with a stray writeout of a cacheline. So play it sure and
757 * do an explicit, full-scale wbinvd() _after_ having marked all
758 * the pages as Not-Present:
759 */
760 wbinvd();
752 761
753 /* 762 /*
754 * Try to workaround a bug (thanks to BenH) 763 * Try to workaround a bug (thanks to BenH)
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 702c33efea84..d862e396b099 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1160,7 +1160,7 @@ static int genregs32_set(struct task_struct *target,
1160 if (kbuf) { 1160 if (kbuf) {
1161 const compat_ulong_t *k = kbuf; 1161 const compat_ulong_t *k = kbuf;
1162 while (count > 0 && !ret) { 1162 while (count > 0 && !ret) {
1163 ret = putreg(target, pos, *k++); 1163 ret = putreg32(target, pos, *k++);
1164 count -= sizeof(*k); 1164 count -= sizeof(*k);
1165 pos += sizeof(*k); 1165 pos += sizeof(*k);
1166 } 1166 }
@@ -1171,7 +1171,7 @@ static int genregs32_set(struct task_struct *target,
1171 ret = __get_user(word, u++); 1171 ret = __get_user(word, u++);
1172 if (ret) 1172 if (ret)
1173 break; 1173 break;
1174 ret = putreg(target, pos, word); 1174 ret = putreg32(target, pos, word);
1175 count -= sizeof(*u); 1175 count -= sizeof(*u);
1176 pos += sizeof(*u); 1176 pos += sizeof(*u);
1177 } 1177 }
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 5818dc28167d..7fd6ac43e4a1 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -326,7 +326,7 @@ static inline void kb_wait(void)
326 } 326 }
327} 327}
328 328
329void machine_emergency_restart(void) 329static void native_machine_emergency_restart(void)
330{ 330{
331 int i; 331 int i;
332 332
@@ -376,7 +376,7 @@ void machine_emergency_restart(void)
376 } 376 }
377} 377}
378 378
379void machine_shutdown(void) 379static void native_machine_shutdown(void)
380{ 380{
381 /* Stop the cpus and apics */ 381 /* Stop the cpus and apics */
382#ifdef CONFIG_SMP 382#ifdef CONFIG_SMP
@@ -420,7 +420,7 @@ void machine_shutdown(void)
420#endif 420#endif
421} 421}
422 422
423void machine_restart(char *__unused) 423static void native_machine_restart(char *__unused)
424{ 424{
425 printk("machine restart\n"); 425 printk("machine restart\n");
426 426
@@ -429,11 +429,11 @@ void machine_restart(char *__unused)
429 machine_emergency_restart(); 429 machine_emergency_restart();
430} 430}
431 431
432void machine_halt(void) 432static void native_machine_halt(void)
433{ 433{
434} 434}
435 435
436void machine_power_off(void) 436static void native_machine_power_off(void)
437{ 437{
438 if (pm_power_off) { 438 if (pm_power_off) {
439 if (!reboot_force) 439 if (!reboot_force)
@@ -443,9 +443,35 @@ void machine_power_off(void)
443} 443}
444 444
445struct machine_ops machine_ops = { 445struct machine_ops machine_ops = {
446 .power_off = machine_power_off, 446 .power_off = native_machine_power_off,
447 .shutdown = machine_shutdown, 447 .shutdown = native_machine_shutdown,
448 .emergency_restart = machine_emergency_restart, 448 .emergency_restart = native_machine_emergency_restart,
449 .restart = machine_restart, 449 .restart = native_machine_restart,
450 .halt = machine_halt 450 .halt = native_machine_halt
451}; 451};
452
453void machine_power_off(void)
454{
455 machine_ops.power_off();
456}
457
458void machine_shutdown(void)
459{
460 machine_ops.shutdown();
461}
462
463void machine_emergency_restart(void)
464{
465 machine_ops.emergency_restart();
466}
467
468void machine_restart(char *cmd)
469{
470 machine_ops.restart(cmd);
471}
472
473void machine_halt(void)
474{
475 machine_ops.halt();
476}
477
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;
164unsigned int machine_id; 164unsigned int machine_id;
165unsigned int machine_submodel_id; 165unsigned int machine_submodel_id;
166unsigned int BIOS_revision; 166unsigned int BIOS_revision;
167unsigned 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 */
170int bootloader_type; 169int 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
521static int nearby_node(int apicid) 521static 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
794static void srat_detect_node(void) 794static 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);
1046void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) 1046void __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/test_rodata.c b/arch/x86/kernel/test_rodata.c
index 4c163772000e..c29e235792af 100644
--- a/arch/x86/kernel/test_rodata.c
+++ b/arch/x86/kernel/test_rodata.c
@@ -10,8 +10,8 @@
10 * of the License. 10 * of the License.
11 */ 11 */
12#include <linux/module.h> 12#include <linux/module.h>
13#include <asm/cacheflush.h>
13#include <asm/sections.h> 14#include <asm/sections.h>
14extern int rodata_test_data;
15 15
16int rodata_test(void) 16int rodata_test(void)
17{ 17{
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 @@
34static DEFINE_PER_CPU(struct x86_cpu, cpu_devices); 34static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
35 35
36#ifdef CONFIG_HOTPLUG_CPU 36#ifdef CONFIG_HOTPLUG_CPU
37int arch_register_cpu(int num) 37int __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/traps_64.c b/arch/x86/kernel/traps_64.c
index efc66df728b6..045466681911 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -84,7 +84,7 @@ static inline void conditional_sti(struct pt_regs *regs)
84 84
85static inline void preempt_conditional_sti(struct pt_regs *regs) 85static inline void preempt_conditional_sti(struct pt_regs *regs)
86{ 86{
87 preempt_disable(); 87 inc_preempt_count();
88 if (regs->flags & X86_EFLAGS_IF) 88 if (regs->flags & X86_EFLAGS_IF)
89 local_irq_enable(); 89 local_irq_enable();
90} 90}
@@ -95,7 +95,7 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
95 local_irq_disable(); 95 local_irq_disable();
96 /* Make sure to not schedule here because we could be running 96 /* Make sure to not schedule here because we could be running
97 on an exception stack. */ 97 on an exception stack. */
98 preempt_enable_no_resched(); 98 dec_preempt_count();
99} 99}
100 100
101int kstack_depth_to_print = 12; 101int kstack_depth_to_print = 12;
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 */