diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/time.c | 15 | ||||
-rw-r--r-- | arch/blackfin/kernel/time.c | 8 | ||||
-rw-r--r-- | arch/frv/kernel/time.c | 6 | ||||
-rw-r--r-- | arch/frv/kernel/vmlinux.lds.S | 4 | ||||
-rw-r--r-- | arch/ia64/Kconfig | 7 | ||||
-rw-r--r-- | arch/m68knommu/kernel/time.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/sputrace.c | 31 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-cmt.c | 9 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-mtu2.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/efi.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/efi_64.c | 32 | ||||
-rw-r--r-- | arch/x86/kernel/i8253.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/quirks.c | 9 | ||||
-rw-r--r-- | arch/x86/kernel/reboot.c | 46 | ||||
-rw-r--r-- | arch/x86/mm/ioremap.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/pageattr-test.c | 7 | ||||
-rw-r--r-- | arch/x86/mm/pageattr.c | 4 | ||||
-rw-r--r-- | arch/x86/vdso/Makefile | 22 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 4 |
21 files changed, 129 insertions, 116 deletions
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c index 1dd50d07693c..75480cab0893 100644 --- a/arch/alpha/kernel/time.c +++ b/arch/alpha/kernel/time.c | |||
@@ -119,13 +119,8 @@ irqreturn_t timer_interrupt(int irq, void *dev) | |||
119 | state.partial_tick = delta & ((1UL << FIX_SHIFT) - 1); | 119 | state.partial_tick = delta & ((1UL << FIX_SHIFT) - 1); |
120 | nticks = delta >> FIX_SHIFT; | 120 | nticks = delta >> FIX_SHIFT; |
121 | 121 | ||
122 | while (nticks > 0) { | 122 | if (nticks) |
123 | do_timer(1); | 123 | do_timer(nticks); |
124 | #ifndef CONFIG_SMP | ||
125 | update_process_times(user_mode(get_irq_regs())); | ||
126 | #endif | ||
127 | nticks--; | ||
128 | } | ||
129 | 124 | ||
130 | /* | 125 | /* |
131 | * If we have an externally synchronized Linux clock, then update | 126 | * If we have an externally synchronized Linux clock, then update |
@@ -141,6 +136,12 @@ irqreturn_t timer_interrupt(int irq, void *dev) | |||
141 | } | 136 | } |
142 | 137 | ||
143 | write_sequnlock(&xtime_lock); | 138 | write_sequnlock(&xtime_lock); |
139 | |||
140 | #ifndef CONFIG_SMP | ||
141 | while (nticks--) | ||
142 | update_process_times(user_mode(get_irq_regs())); | ||
143 | #endif | ||
144 | |||
144 | return IRQ_HANDLED; | 145 | return IRQ_HANDLED; |
145 | } | 146 | } |
146 | 147 | ||
diff --git a/arch/blackfin/kernel/time.c b/arch/blackfin/kernel/time.c index 5bd64e341df3..9bdc8f99183a 100644 --- a/arch/blackfin/kernel/time.c +++ b/arch/blackfin/kernel/time.c | |||
@@ -137,9 +137,6 @@ irqreturn_t timer_interrupt(int irq, void *dummy) | |||
137 | 137 | ||
138 | do_timer(1); | 138 | do_timer(1); |
139 | 139 | ||
140 | #ifndef CONFIG_SMP | ||
141 | update_process_times(user_mode(get_irq_regs())); | ||
142 | #endif | ||
143 | profile_tick(CPU_PROFILING); | 140 | profile_tick(CPU_PROFILING); |
144 | 141 | ||
145 | /* | 142 | /* |
@@ -161,6 +158,11 @@ irqreturn_t timer_interrupt(int irq, void *dummy) | |||
161 | last_rtc_update = xtime.tv_sec - 600; | 158 | last_rtc_update = xtime.tv_sec - 600; |
162 | } | 159 | } |
163 | write_sequnlock(&xtime_lock); | 160 | write_sequnlock(&xtime_lock); |
161 | |||
162 | #ifndef CONFIG_SMP | ||
163 | update_process_times(user_mode(get_irq_regs())); | ||
164 | #endif | ||
165 | |||
164 | return IRQ_HANDLED; | 166 | return IRQ_HANDLED; |
165 | } | 167 | } |
166 | 168 | ||
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index 925fb0199a0f..69f6a4ef5d61 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -63,6 +63,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
63 | /* last time the cmos clock got updated */ | 63 | /* last time the cmos clock got updated */ |
64 | static long last_rtc_update = 0; | 64 | static long last_rtc_update = 0; |
65 | 65 | ||
66 | profile_tick(CPU_PROFILING); | ||
66 | /* | 67 | /* |
67 | * Here we are in the timer irq handler. We just have irqs locally | 68 | * Here we are in the timer irq handler. We just have irqs locally |
68 | * disabled but we don't know if the timer_bh is running on the other | 69 | * disabled but we don't know if the timer_bh is running on the other |
@@ -73,8 +74,6 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
73 | write_seqlock(&xtime_lock); | 74 | write_seqlock(&xtime_lock); |
74 | 75 | ||
75 | do_timer(1); | 76 | do_timer(1); |
76 | update_process_times(user_mode(get_irq_regs())); | ||
77 | profile_tick(CPU_PROFILING); | ||
78 | 77 | ||
79 | /* | 78 | /* |
80 | * If we have an externally synchronized Linux clock, then update | 79 | * If we have an externally synchronized Linux clock, then update |
@@ -99,6 +98,9 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
99 | #endif /* CONFIG_HEARTBEAT */ | 98 | #endif /* CONFIG_HEARTBEAT */ |
100 | 99 | ||
101 | write_sequnlock(&xtime_lock); | 100 | write_sequnlock(&xtime_lock); |
101 | |||
102 | update_process_times(user_mode(get_irq_regs())); | ||
103 | |||
102 | return IRQ_HANDLED; | 104 | return IRQ_HANDLED; |
103 | } | 105 | } |
104 | 106 | ||
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S index ef7527b8b0c7..17725a55aed8 100644 --- a/arch/frv/kernel/vmlinux.lds.S +++ b/arch/frv/kernel/vmlinux.lds.S | |||
@@ -105,11 +105,9 @@ SECTIONS | |||
105 | SCHED_TEXT | 105 | SCHED_TEXT |
106 | LOCK_TEXT | 106 | LOCK_TEXT |
107 | #ifdef CONFIG_DEBUG_INFO | 107 | #ifdef CONFIG_DEBUG_INFO |
108 | *( | ||
109 | INIT_TEXT | 108 | INIT_TEXT |
110 | EXIT_TEXT | 109 | EXIT_TEXT |
111 | .exitcall.exit | 110 | *(.exitcall.exit) |
112 | ) | ||
113 | #endif | 111 | #endif |
114 | *(.fixup) | 112 | *(.fixup) |
115 | *(.gnu.warning) | 113 | *(.gnu.warning) |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 2d4fcd01bc91..dff9edfc7465 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -232,7 +232,14 @@ config PGTABLE_4 | |||
232 | 232 | ||
233 | endchoice | 233 | endchoice |
234 | 234 | ||
235 | if IA64_HP_SIM | ||
236 | config HZ | ||
237 | default 32 | ||
238 | endif | ||
239 | |||
240 | if !IA64_HP_SIM | ||
235 | source kernel/Kconfig.hz | 241 | source kernel/Kconfig.hz |
242 | endif | ||
236 | 243 | ||
237 | config IA64_BRL_EMU | 244 | config IA64_BRL_EMU |
238 | bool | 245 | bool |
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c index 89cdbcaeb45f..0ccfb2ad6380 100644 --- a/arch/m68knommu/kernel/time.c +++ b/arch/m68knommu/kernel/time.c | |||
@@ -42,14 +42,12 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
42 | /* last time the cmos clock got updated */ | 42 | /* last time the cmos clock got updated */ |
43 | static long last_rtc_update=0; | 43 | static long last_rtc_update=0; |
44 | 44 | ||
45 | if (current->pid) | ||
46 | profile_tick(CPU_PROFILING); | ||
47 | |||
45 | write_seqlock(&xtime_lock); | 48 | write_seqlock(&xtime_lock); |
46 | 49 | ||
47 | do_timer(1); | 50 | do_timer(1); |
48 | #ifndef CONFIG_SMP | ||
49 | update_process_times(user_mode(get_irq_regs())); | ||
50 | #endif | ||
51 | if (current->pid) | ||
52 | profile_tick(CPU_PROFILING); | ||
53 | 51 | ||
54 | /* | 52 | /* |
55 | * If we have an externally synchronized Linux clock, then update | 53 | * If we have an externally synchronized Linux clock, then update |
@@ -67,6 +65,10 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy) | |||
67 | } | 65 | } |
68 | 66 | ||
69 | write_sequnlock(&xtime_lock); | 67 | write_sequnlock(&xtime_lock); |
68 | |||
69 | #ifndef CONFIG_SMP | ||
70 | update_process_times(user_mode(get_irq_regs())); | ||
71 | #endif | ||
70 | return(IRQ_HANDLED); | 72 | return(IRQ_HANDLED); |
71 | } | 73 | } |
72 | 74 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c index 2b1953f6f12e..01974f7776e1 100644 --- a/arch/powerpc/platforms/cell/spufs/sputrace.c +++ b/arch/powerpc/platforms/cell/spufs/sputrace.c | |||
@@ -146,34 +146,28 @@ static void sputrace_log_item(const char *name, struct spu_context *ctx, | |||
146 | wake_up(&sputrace_wait); | 146 | wake_up(&sputrace_wait); |
147 | } | 147 | } |
148 | 148 | ||
149 | static void spu_context_event(const struct marker *mdata, | 149 | static void spu_context_event(void *probe_private, void *call_data, |
150 | void *private, const char *format, ...) | 150 | const char *format, va_list *args) |
151 | { | 151 | { |
152 | struct spu_probe *p = mdata->private; | 152 | struct spu_probe *p = probe_private; |
153 | va_list ap; | ||
154 | struct spu_context *ctx; | 153 | struct spu_context *ctx; |
155 | struct spu *spu; | 154 | struct spu *spu; |
156 | 155 | ||
157 | va_start(ap, format); | 156 | ctx = va_arg(*args, struct spu_context *); |
158 | ctx = va_arg(ap, struct spu_context *); | 157 | spu = va_arg(*args, struct spu *); |
159 | spu = va_arg(ap, struct spu *); | ||
160 | 158 | ||
161 | sputrace_log_item(p->name, ctx, spu); | 159 | sputrace_log_item(p->name, ctx, spu); |
162 | va_end(ap); | ||
163 | } | 160 | } |
164 | 161 | ||
165 | static void spu_context_nospu_event(const struct marker *mdata, | 162 | static void spu_context_nospu_event(void *probe_private, void *call_data, |
166 | void *private, const char *format, ...) | 163 | const char *format, va_list *args) |
167 | { | 164 | { |
168 | struct spu_probe *p = mdata->private; | 165 | struct spu_probe *p = probe_private; |
169 | va_list ap; | ||
170 | struct spu_context *ctx; | 166 | struct spu_context *ctx; |
171 | 167 | ||
172 | va_start(ap, format); | 168 | ctx = va_arg(*args, struct spu_context *); |
173 | ctx = va_arg(ap, struct spu_context *); | ||
174 | 169 | ||
175 | sputrace_log_item(p->name, ctx, NULL); | 170 | sputrace_log_item(p->name, ctx, NULL); |
176 | va_end(ap); | ||
177 | } | 171 | } |
178 | 172 | ||
179 | struct spu_probe spu_probes[] = { | 173 | struct spu_probe spu_probes[] = { |
@@ -219,10 +213,6 @@ static int __init sputrace_init(void) | |||
219 | if (error) | 213 | if (error) |
220 | printk(KERN_INFO "Unable to register probe %s\n", | 214 | printk(KERN_INFO "Unable to register probe %s\n", |
221 | p->name); | 215 | p->name); |
222 | |||
223 | error = marker_arm(p->name); | ||
224 | if (error) | ||
225 | printk(KERN_INFO "Unable to arm probe %s\n", p->name); | ||
226 | } | 216 | } |
227 | 217 | ||
228 | return 0; | 218 | return 0; |
@@ -238,7 +228,8 @@ static void __exit sputrace_exit(void) | |||
238 | int i; | 228 | int i; |
239 | 229 | ||
240 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) | 230 | for (i = 0; i < ARRAY_SIZE(spu_probes); i++) |
241 | marker_probe_unregister(spu_probes[i].name); | 231 | marker_probe_unregister(spu_probes[i].name, |
232 | spu_probes[i].probe_func, &spu_probes[i]); | ||
242 | 233 | ||
243 | remove_proc_entry("sputrace", NULL); | 234 | remove_proc_entry("sputrace", NULL); |
244 | kfree(sputrace_log); | 235 | kfree(sputrace_log); |
diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c index 499e07beebe2..71312324b5de 100644 --- a/arch/sh/kernel/timers/timer-cmt.c +++ b/arch/sh/kernel/timers/timer-cmt.c | |||
@@ -100,16 +100,7 @@ static irqreturn_t cmt_timer_interrupt(int irq, void *dev_id) | |||
100 | timer_status &= ~0x80; | 100 | timer_status &= ~0x80; |
101 | ctrl_outw(timer_status, CMT_CMCSR_0); | 101 | ctrl_outw(timer_status, CMT_CMCSR_0); |
102 | 102 | ||
103 | /* | ||
104 | * Here we are in the timer irq handler. We just have irqs locally | ||
105 | * disabled but we don't know if the timer_bh is running on the other | ||
106 | * CPU. We need to avoid to SMP race with it. NOTE: we don' t need | ||
107 | * the irq version of write_lock because as just said we have irq | ||
108 | * locally disabled. -arca | ||
109 | */ | ||
110 | write_seqlock(&xtime_lock); | ||
111 | handle_timer_tick(); | 103 | handle_timer_tick(); |
112 | write_sequnlock(&xtime_lock); | ||
113 | 104 | ||
114 | return IRQ_HANDLED; | 105 | return IRQ_HANDLED; |
115 | } | 106 | } |
diff --git a/arch/sh/kernel/timers/timer-mtu2.c b/arch/sh/kernel/timers/timer-mtu2.c index b7499a2a9188..463cd08f9517 100644 --- a/arch/sh/kernel/timers/timer-mtu2.c +++ b/arch/sh/kernel/timers/timer-mtu2.c | |||
@@ -100,9 +100,7 @@ static irqreturn_t mtu2_timer_interrupt(int irq, void *dev_id) | |||
100 | ctrl_outb(timer_status, MTU2_TSR_1); | 100 | ctrl_outb(timer_status, MTU2_TSR_1); |
101 | 101 | ||
102 | /* Do timer tick */ | 102 | /* Do timer tick */ |
103 | write_seqlock(&xtime_lock); | ||
104 | handle_timer_tick(); | 103 | handle_timer_tick(); |
105 | write_sequnlock(&xtime_lock); | ||
106 | 104 | ||
107 | return IRQ_HANDLED; | 105 | return IRQ_HANDLED; |
108 | } | 106 | } |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 4cd5d7818dc6..a6a6f9823370 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -713,10 +713,10 @@ static irqreturn_t pcic_timer_handler (int irq, void *h) | |||
713 | write_seqlock(&xtime_lock); /* Dummy, to show that we remember */ | 713 | write_seqlock(&xtime_lock); /* Dummy, to show that we remember */ |
714 | pcic_clear_clock_irq(); | 714 | pcic_clear_clock_irq(); |
715 | do_timer(1); | 715 | do_timer(1); |
716 | write_sequnlock(&xtime_lock); | ||
716 | #ifndef CONFIG_SMP | 717 | #ifndef CONFIG_SMP |
717 | update_process_times(user_mode(get_irq_regs())); | 718 | update_process_times(user_mode(get_irq_regs())); |
718 | #endif | 719 | #endif |
719 | write_sequnlock(&xtime_lock); | ||
720 | return IRQ_HANDLED; | 720 | return IRQ_HANDLED; |
721 | } | 721 | } |
722 | 722 | ||
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 00b393c3a4a0..cfaf22c05bc4 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -128,10 +128,6 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
128 | clear_clock_irq(); | 128 | clear_clock_irq(); |
129 | 129 | ||
130 | do_timer(1); | 130 | do_timer(1); |
131 | #ifndef CONFIG_SMP | ||
132 | update_process_times(user_mode(get_irq_regs())); | ||
133 | #endif | ||
134 | |||
135 | 131 | ||
136 | /* Determine when to update the Mostek clock. */ | 132 | /* Determine when to update the Mostek clock. */ |
137 | if (ntp_synced() && | 133 | if (ntp_synced() && |
@@ -145,6 +141,9 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
145 | } | 141 | } |
146 | write_sequnlock(&xtime_lock); | 142 | write_sequnlock(&xtime_lock); |
147 | 143 | ||
144 | #ifndef CONFIG_SMP | ||
145 | update_process_times(user_mode(get_irq_regs())); | ||
146 | #endif | ||
148 | return IRQ_HANDLED; | 147 | return IRQ_HANDLED; |
149 | } | 148 | } |
150 | 149 | ||
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c index 32dd62b36ff7..cbdf9bacc575 100644 --- a/arch/x86/kernel/efi.c +++ b/arch/x86/kernel/efi.c | |||
@@ -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; |
@@ -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, size); | ||
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_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 | ||
39 | static pgd_t save_pgd __initdata; | 40 | static pgd_t save_pgd __initdata; |
40 | static unsigned long efi_flags __initdata; | 41 | static 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 | ||
64 | static void __init early_runtime_code_mapping_set_exec(int executable) | 58 | static 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 | ||
106 | void __init efi_reserve_bootmem(void) | 100 | void __init efi_reserve_bootmem(void) |
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 | */ |
98 | struct clock_event_device pit_clockevent = { | 98 | static 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/quirks.c b/arch/x86/kernel/quirks.c index 1941482d4ca3..c47208fc5932 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -11,7 +11,7 @@ | |||
11 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) |
12 | { | 12 | { |
13 | u8 config, rev; | 13 | u8 config, rev; |
14 | u32 word; | 14 | u16 word; |
15 | 15 | ||
16 | /* BIOS may enable hardware IRQ balancing for | 16 | /* BIOS may enable hardware IRQ balancing for |
17 | * E7520/E7320/E7525(revision ID 0x9 and below) | 17 | * E7520/E7320/E7525(revision ID 0x9 and below) |
@@ -26,8 +26,11 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
26 | pci_read_config_byte(dev, 0xf4, &config); | 26 | pci_read_config_byte(dev, 0xf4, &config); |
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | 27 | pci_write_config_byte(dev, 0xf4, config|0x2); |
28 | 28 | ||
29 | /* read xTPR register */ | 29 | /* |
30 | raw_pci_read(0, 0, 0x40, 0x4c, 2, &word); | 30 | * read xTPR register. We may not have a pci_dev for device 8 |
31 | * because it might be hidden until the above write. | ||
32 | */ | ||
33 | pci_bus_read_config_word(dev->bus, PCI_DEVFN(8, 0), 0x4c, &word); | ||
31 | 34 | ||
32 | if (!(word & (1 << 13))) { | 35 | if (!(word & (1 << 13))) { |
33 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " | 36 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " |
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 | ||
329 | void machine_emergency_restart(void) | 329 | static 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 | ||
379 | void machine_shutdown(void) | 379 | static 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 | ||
423 | void machine_restart(char *__unused) | 423 | static 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 | ||
432 | void machine_halt(void) | 432 | static void native_machine_halt(void) |
433 | { | 433 | { |
434 | } | 434 | } |
435 | 435 | ||
436 | void machine_power_off(void) | 436 | static 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 | ||
445 | struct machine_ops machine_ops = { | 445 | struct 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 | |||
453 | void machine_power_off(void) | ||
454 | { | ||
455 | machine_ops.power_off(); | ||
456 | } | ||
457 | |||
458 | void machine_shutdown(void) | ||
459 | { | ||
460 | machine_ops.shutdown(); | ||
461 | } | ||
462 | |||
463 | void machine_emergency_restart(void) | ||
464 | { | ||
465 | machine_ops.emergency_restart(); | ||
466 | } | ||
467 | |||
468 | void machine_restart(char *cmd) | ||
469 | { | ||
470 | machine_ops.restart(cmd); | ||
471 | } | ||
472 | |||
473 | void machine_halt(void) | ||
474 | { | ||
475 | machine_ops.halt(); | ||
476 | } | ||
477 | |||
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index a4897a85268a..9f42d7e9c158 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -265,7 +265,9 @@ static __initdata pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] | |||
265 | 265 | ||
266 | static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) | 266 | static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) |
267 | { | 267 | { |
268 | pgd_t *pgd = &swapper_pg_dir[pgd_index(addr)]; | 268 | /* Don't assume we're using swapper_pg_dir at this point */ |
269 | pgd_t *base = __va(read_cr3()); | ||
270 | pgd_t *pgd = &base[pgd_index(addr)]; | ||
269 | pud_t *pud = pud_offset(pgd, addr); | 271 | pud_t *pud = pud_offset(pgd, addr); |
270 | pmd_t *pmd = pmd_offset(pud, addr); | 272 | pmd_t *pmd = pmd_offset(pud, addr); |
271 | 273 | ||
diff --git a/arch/x86/mm/pageattr-test.c b/arch/x86/mm/pageattr-test.c index ed8201600354..75f1b109aae8 100644 --- a/arch/x86/mm/pageattr-test.c +++ b/arch/x86/mm/pageattr-test.c | |||
@@ -40,7 +40,6 @@ struct split_state { | |||
40 | static int print_split(struct split_state *s) | 40 | static int print_split(struct split_state *s) |
41 | { | 41 | { |
42 | long i, expected, missed = 0; | 42 | long i, expected, missed = 0; |
43 | int printed = 0; | ||
44 | int err = 0; | 43 | int err = 0; |
45 | 44 | ||
46 | s->lpg = s->gpg = s->spg = s->exec = 0; | 45 | s->lpg = s->gpg = s->spg = s->exec = 0; |
@@ -53,12 +52,6 @@ static int print_split(struct split_state *s) | |||
53 | 52 | ||
54 | pte = lookup_address(addr, &level); | 53 | pte = lookup_address(addr, &level); |
55 | if (!pte) { | 54 | if (!pte) { |
56 | if (!printed) { | ||
57 | dump_pagetable(addr); | ||
58 | printk(KERN_INFO "CPA %lx no pte level %d\n", | ||
59 | addr, level); | ||
60 | printed = 1; | ||
61 | } | ||
62 | missed++; | 55 | missed++; |
63 | i++; | 56 | i++; |
64 | continue; | 57 | continue; |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 440210a2277d..bd61ed13f9cf 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -275,8 +275,8 @@ try_preserve_large_page(pte_t *kpte, unsigned long address, | |||
275 | break; | 275 | break; |
276 | #ifdef CONFIG_X86_64 | 276 | #ifdef CONFIG_X86_64 |
277 | case PG_LEVEL_1G: | 277 | case PG_LEVEL_1G: |
278 | psize = PMD_PAGE_SIZE; | 278 | psize = PUD_PAGE_SIZE; |
279 | pmask = PMD_PAGE_MASK; | 279 | pmask = PUD_PAGE_MASK; |
280 | break; | 280 | break; |
281 | #endif | 281 | #endif |
282 | default: | 282 | default: |
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index d28dda574700..f385a4b4a484 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
@@ -7,7 +7,7 @@ VDSO32-$(CONFIG_X86_32) := y | |||
7 | VDSO32-$(CONFIG_COMPAT) := y | 7 | VDSO32-$(CONFIG_COMPAT) := y |
8 | 8 | ||
9 | vdso-install-$(VDSO64-y) += vdso.so | 9 | vdso-install-$(VDSO64-y) += vdso.so |
10 | vdso-install-$(VDSO32-y) += $(vdso32-y:=.so) | 10 | vdso-install-$(VDSO32-y) += $(vdso32-images) |
11 | 11 | ||
12 | 12 | ||
13 | # files to link into the vdso | 13 | # files to link into the vdso |
@@ -63,6 +63,8 @@ vdso32.so-$(CONFIG_X86_32) += int80 | |||
63 | vdso32.so-$(CONFIG_COMPAT) += syscall | 63 | vdso32.so-$(CONFIG_COMPAT) += syscall |
64 | vdso32.so-$(VDSO32-y) += sysenter | 64 | vdso32.so-$(VDSO32-y) += sysenter |
65 | 65 | ||
66 | vdso32-images = $(vdso32.so-y:%=vdso32-%.so) | ||
67 | |||
66 | CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) | 68 | CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) |
67 | VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 | 69 | VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 |
68 | 70 | ||
@@ -71,21 +73,21 @@ VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 | |||
71 | override obj-dirs = $(dir $(obj)) $(obj)/vdso32/ | 73 | override obj-dirs = $(dir $(obj)) $(obj)/vdso32/ |
72 | 74 | ||
73 | targets += vdso32/vdso32.lds | 75 | targets += vdso32/vdso32.lds |
74 | targets += $(vdso32.so-y:%=vdso32-%.so.dbg) $(vdso32.so-y:%=vdso32-%.so) | 76 | targets += $(vdso32-images) $(vdso32-images:=.dbg) |
75 | targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o) | 77 | targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o) |
76 | 78 | ||
77 | extra-y += $(vdso32.so-y:%=vdso32-%.so) | 79 | extra-y += $(vdso32-images) |
78 | 80 | ||
79 | $(obj)/vdso32.o: $(vdso32.so-y:%=$(obj)/vdso32-%.so) | 81 | $(obj)/vdso32.o: $(vdso32-images:%=$(obj)/%) |
80 | 82 | ||
81 | KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS)) | 83 | KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS)) |
82 | $(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) | 84 | $(vdso32-images:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) |
83 | $(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32 | 85 | $(vdso32-images:%=$(obj)/%.dbg): asflags-$(CONFIG_X86_64) += -m32 |
84 | 86 | ||
85 | $(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): $(obj)/vdso32-%.so.dbg: FORCE \ | 87 | $(vdso32-images:%=$(obj)/%.dbg): $(obj)/vdso32-%.so.dbg: FORCE \ |
86 | $(obj)/vdso32/vdso32.lds \ | 88 | $(obj)/vdso32/vdso32.lds \ |
87 | $(obj)/vdso32/note.o \ | 89 | $(obj)/vdso32/note.o \ |
88 | $(obj)/vdso32/%.o | 90 | $(obj)/vdso32/%.o |
89 | $(call if_changed,vdso) | 91 | $(call if_changed,vdso) |
90 | 92 | ||
91 | # Make vdso32-*-syms.lds from each image, and then make sure they match. | 93 | # Make vdso32-*-syms.lds from each image, and then make sure they match. |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index de647bc6e74d..49e5358f481a 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -798,6 +798,10 @@ static __init void xen_pagetable_setup_start(pgd_t *base) | |||
798 | * added to the table can be prepared properly for Xen. | 798 | * added to the table can be prepared properly for Xen. |
799 | */ | 799 | */ |
800 | xen_write_cr3(__pa(base)); | 800 | xen_write_cr3(__pa(base)); |
801 | |||
802 | /* Unpin initial Xen pagetable */ | ||
803 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, | ||
804 | PFN_DOWN(__pa(xen_start_info->pt_base))); | ||
801 | } | 805 | } |
802 | 806 | ||
803 | static __init void xen_pagetable_setup_done(pgd_t *base) | 807 | static __init void xen_pagetable_setup_done(pgd_t *base) |