diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/io_apic.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/reboot.c | 8 | ||||
-rw-r--r-- | arch/ia64/kernel/ia64_ksyms.c | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/traps.c | 18 | ||||
-rw-r--r-- | arch/powerpc/kernel/ppc_ksyms.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 62 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/sparc64/mm/generic.c | 1 |
11 files changed, 48 insertions, 64 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index cc5d7ac5b2e7..22c8675c79f4 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2009,7 +2009,7 @@ static void ack_edge_ioapic_vector(unsigned int vector) | |||
2009 | { | 2009 | { |
2010 | int irq = vector_to_irq(vector); | 2010 | int irq = vector_to_irq(vector); |
2011 | 2011 | ||
2012 | move_irq(vector); | 2012 | move_native_irq(vector); |
2013 | ack_edge_ioapic_irq(irq); | 2013 | ack_edge_ioapic_irq(irq); |
2014 | } | 2014 | } |
2015 | 2015 | ||
@@ -2024,7 +2024,7 @@ static void end_level_ioapic_vector (unsigned int vector) | |||
2024 | { | 2024 | { |
2025 | int irq = vector_to_irq(vector); | 2025 | int irq = vector_to_irq(vector); |
2026 | 2026 | ||
2027 | move_irq(vector); | 2027 | move_native_irq(vector); |
2028 | end_level_ioapic_irq(irq); | 2028 | end_level_ioapic_irq(irq); |
2029 | } | 2029 | } |
2030 | 2030 | ||
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 350ea6680f63..2afe0f8d555a 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -111,6 +111,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
111 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), | 111 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), |
112 | }, | 112 | }, |
113 | }, | 113 | }, |
114 | { /* Handle problems with rebooting on HP nc6120 */ | ||
115 | .callback = set_bios_reboot, | ||
116 | .ident = "HP Compaq nc6120", | ||
117 | .matches = { | ||
118 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
119 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6120"), | ||
120 | }, | ||
121 | }, | ||
114 | { } | 122 | { } |
115 | }; | 123 | }; |
116 | 124 | ||
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c index 01572814abe4..5db9d3bcbbcb 100644 --- a/arch/ia64/kernel/ia64_ksyms.c +++ b/arch/ia64/kernel/ia64_ksyms.c | |||
@@ -42,6 +42,7 @@ EXPORT_SYMBOL(clear_page); | |||
42 | 42 | ||
43 | #ifdef CONFIG_VIRTUAL_MEM_MAP | 43 | #ifdef CONFIG_VIRTUAL_MEM_MAP |
44 | #include <linux/bootmem.h> | 44 | #include <linux/bootmem.h> |
45 | EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */ | ||
45 | EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */ | 46 | EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */ |
46 | #endif | 47 | #endif |
47 | 48 | ||
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 801eeaeaf3de..2895d6e6062f 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -740,7 +740,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self, | |||
740 | switch(val) { | 740 | switch(val) { |
741 | case DIE_BREAK: | 741 | case DIE_BREAK: |
742 | /* err is break number from ia64_bad_break() */ | 742 | /* err is break number from ia64_bad_break() */ |
743 | if (args->err == 0x80200 || args->err == 0x80300) | 743 | if (args->err == 0x80200 || args->err == 0x80300 || args->err == 0) |
744 | if (pre_kprobes_handler(args)) | 744 | if (pre_kprobes_handler(args)) |
745 | ret = NOTIFY_STOP; | 745 | ret = NOTIFY_STOP; |
746 | break; | 746 | break; |
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index fba5fdd1f968..d3e0ecb56d62 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -132,24 +132,6 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs) | |||
132 | siginfo_t siginfo; | 132 | siginfo_t siginfo; |
133 | int sig, code; | 133 | int sig, code; |
134 | 134 | ||
135 | /* break.b always sets cr.iim to 0, which causes problems for | ||
136 | * debuggers. Get the real break number from the original instruction, | ||
137 | * but only for kernel code. User space break.b is left alone, to | ||
138 | * preserve the existing behaviour. All break codings have the same | ||
139 | * format, so there is no need to check the slot type. | ||
140 | */ | ||
141 | if (break_num == 0 && !user_mode(regs)) { | ||
142 | struct ia64_psr *ipsr = ia64_psr(regs); | ||
143 | unsigned long *bundle = (unsigned long *)regs->cr_iip; | ||
144 | unsigned long slot; | ||
145 | switch (ipsr->ri) { | ||
146 | case 0: slot = (bundle[0] >> 5); break; | ||
147 | case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break; | ||
148 | default: slot = (bundle[1] >> 23); break; | ||
149 | } | ||
150 | break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff); | ||
151 | } | ||
152 | |||
153 | /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ | 135 | /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ |
154 | siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); | 136 | siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); |
155 | siginfo.si_imm = break_num; | 137 | siginfo.si_imm = break_num; |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index af4d1bc9a2eb..94db25708456 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -163,15 +163,13 @@ EXPORT_SYMBOL(giveup_altivec); | |||
163 | EXPORT_SYMBOL(giveup_spe); | 163 | EXPORT_SYMBOL(giveup_spe); |
164 | #endif /* CONFIG_SPE */ | 164 | #endif /* CONFIG_SPE */ |
165 | 165 | ||
166 | #ifdef CONFIG_PPC64 | 166 | #ifndef CONFIG_PPC64 |
167 | EXPORT_SYMBOL(__flush_icache_range); | ||
168 | #else | ||
169 | EXPORT_SYMBOL(flush_instruction_cache); | 167 | EXPORT_SYMBOL(flush_instruction_cache); |
170 | EXPORT_SYMBOL(flush_icache_range); | ||
171 | EXPORT_SYMBOL(flush_tlb_kernel_range); | 168 | EXPORT_SYMBOL(flush_tlb_kernel_range); |
172 | EXPORT_SYMBOL(flush_tlb_page); | 169 | EXPORT_SYMBOL(flush_tlb_page); |
173 | EXPORT_SYMBOL(_tlbie); | 170 | EXPORT_SYMBOL(_tlbie); |
174 | #endif | 171 | #endif |
172 | EXPORT_SYMBOL(__flush_icache_range); | ||
175 | EXPORT_SYMBOL(flush_dcache_range); | 173 | EXPORT_SYMBOL(flush_dcache_range); |
176 | 174 | ||
177 | #ifdef CONFIG_SMP | 175 | #ifdef CONFIG_SMP |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index a5a7542a8ff3..105d5609ff57 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -201,6 +201,28 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs) | |||
201 | } | 201 | } |
202 | #endif /* CONFIG_SPE */ | 202 | #endif /* CONFIG_SPE */ |
203 | 203 | ||
204 | /* | ||
205 | * If we are doing lazy switching of CPU state (FP, altivec or SPE), | ||
206 | * and the current task has some state, discard it. | ||
207 | */ | ||
208 | static inline void discard_lazy_cpu_state(void) | ||
209 | { | ||
210 | #ifndef CONFIG_SMP | ||
211 | preempt_disable(); | ||
212 | if (last_task_used_math == current) | ||
213 | last_task_used_math = NULL; | ||
214 | #ifdef CONFIG_ALTIVEC | ||
215 | if (last_task_used_altivec == current) | ||
216 | last_task_used_altivec = NULL; | ||
217 | #endif /* CONFIG_ALTIVEC */ | ||
218 | #ifdef CONFIG_SPE | ||
219 | if (last_task_used_spe == current) | ||
220 | last_task_used_spe = NULL; | ||
221 | #endif | ||
222 | preempt_enable(); | ||
223 | #endif /* CONFIG_SMP */ | ||
224 | } | ||
225 | |||
204 | int set_dabr(unsigned long dabr) | 226 | int set_dabr(unsigned long dabr) |
205 | { | 227 | { |
206 | if (ppc_md.set_dabr) | 228 | if (ppc_md.set_dabr) |
@@ -434,19 +456,7 @@ void show_regs(struct pt_regs * regs) | |||
434 | void exit_thread(void) | 456 | void exit_thread(void) |
435 | { | 457 | { |
436 | kprobe_flush_task(current); | 458 | kprobe_flush_task(current); |
437 | 459 | discard_lazy_cpu_state(); | |
438 | #ifndef CONFIG_SMP | ||
439 | if (last_task_used_math == current) | ||
440 | last_task_used_math = NULL; | ||
441 | #ifdef CONFIG_ALTIVEC | ||
442 | if (last_task_used_altivec == current) | ||
443 | last_task_used_altivec = NULL; | ||
444 | #endif /* CONFIG_ALTIVEC */ | ||
445 | #ifdef CONFIG_SPE | ||
446 | if (last_task_used_spe == current) | ||
447 | last_task_used_spe = NULL; | ||
448 | #endif | ||
449 | #endif /* CONFIG_SMP */ | ||
450 | } | 460 | } |
451 | 461 | ||
452 | void flush_thread(void) | 462 | void flush_thread(void) |
@@ -458,18 +468,7 @@ void flush_thread(void) | |||
458 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); | 468 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); |
459 | #endif | 469 | #endif |
460 | 470 | ||
461 | #ifndef CONFIG_SMP | 471 | discard_lazy_cpu_state(); |
462 | if (last_task_used_math == current) | ||
463 | last_task_used_math = NULL; | ||
464 | #ifdef CONFIG_ALTIVEC | ||
465 | if (last_task_used_altivec == current) | ||
466 | last_task_used_altivec = NULL; | ||
467 | #endif /* CONFIG_ALTIVEC */ | ||
468 | #ifdef CONFIG_SPE | ||
469 | if (last_task_used_spe == current) | ||
470 | last_task_used_spe = NULL; | ||
471 | #endif | ||
472 | #endif /* CONFIG_SMP */ | ||
473 | 472 | ||
474 | #ifdef CONFIG_PPC64 /* for now */ | 473 | #ifdef CONFIG_PPC64 /* for now */ |
475 | if (current->thread.dabr) { | 474 | if (current->thread.dabr) { |
@@ -635,18 +634,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp) | |||
635 | } | 634 | } |
636 | #endif | 635 | #endif |
637 | 636 | ||
638 | #ifndef CONFIG_SMP | 637 | discard_lazy_cpu_state(); |
639 | if (last_task_used_math == current) | ||
640 | last_task_used_math = NULL; | ||
641 | #ifdef CONFIG_ALTIVEC | ||
642 | if (last_task_used_altivec == current) | ||
643 | last_task_used_altivec = NULL; | ||
644 | #endif | ||
645 | #ifdef CONFIG_SPE | ||
646 | if (last_task_used_spe == current) | ||
647 | last_task_used_spe = NULL; | ||
648 | #endif | ||
649 | #endif /* CONFIG_SMP */ | ||
650 | memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); | 638 | memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); |
651 | current->thread.fpscr.val = 0; | 639 | current->thread.fpscr.val = 0; |
652 | #ifdef CONFIG_ALTIVEC | 640 | #ifdef CONFIG_ALTIVEC |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 4ce0105c308e..bcdc209dca85 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret, | |||
265 | va_end(list); | 265 | va_end(list); |
266 | 266 | ||
267 | for (i = 0; i < nret; i++) | 267 | for (i = 0; i < nret; i++) |
268 | rets[nargs+i] = 0; | 268 | args.args[nargs+i] = 0; |
269 | 269 | ||
270 | if (enter_prom(&args, RELOC(prom_entry)) < 0) | 270 | if (enter_prom(&args, RELOC(prom_entry)) < 0) |
271 | return PROM_ERROR; | 271 | return PROM_ERROR; |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 66073f775193..bb6a5c6a64be 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(kernel_thread); | |||
184 | 184 | ||
185 | EXPORT_SYMBOL(flush_instruction_cache); | 185 | EXPORT_SYMBOL(flush_instruction_cache); |
186 | EXPORT_SYMBOL(giveup_fpu); | 186 | EXPORT_SYMBOL(giveup_fpu); |
187 | EXPORT_SYMBOL(flush_icache_range); | 187 | EXPORT_SYMBOL(__flush_icache_range); |
188 | EXPORT_SYMBOL(flush_dcache_range); | 188 | EXPORT_SYMBOL(flush_dcache_range); |
189 | EXPORT_SYMBOL(flush_icache_user_range); | 189 | EXPORT_SYMBOL(flush_icache_user_range); |
190 | EXPORT_SYMBOL(flush_dcache_page); | 190 | EXPORT_SYMBOL(flush_dcache_page); |
diff --git a/arch/ppc/kernel/process.c b/arch/ppc/kernel/process.c index cb1c7b92f8c6..25cbdc8d2941 100644 --- a/arch/ppc/kernel/process.c +++ b/arch/ppc/kernel/process.c | |||
@@ -417,6 +417,7 @@ void show_regs(struct pt_regs * regs) | |||
417 | 417 | ||
418 | void exit_thread(void) | 418 | void exit_thread(void) |
419 | { | 419 | { |
420 | preempt_disable(); | ||
420 | if (last_task_used_math == current) | 421 | if (last_task_used_math == current) |
421 | last_task_used_math = NULL; | 422 | last_task_used_math = NULL; |
422 | if (last_task_used_altivec == current) | 423 | if (last_task_used_altivec == current) |
@@ -425,10 +426,12 @@ void exit_thread(void) | |||
425 | if (last_task_used_spe == current) | 426 | if (last_task_used_spe == current) |
426 | last_task_used_spe = NULL; | 427 | last_task_used_spe = NULL; |
427 | #endif | 428 | #endif |
429 | preempt_enable(); | ||
428 | } | 430 | } |
429 | 431 | ||
430 | void flush_thread(void) | 432 | void flush_thread(void) |
431 | { | 433 | { |
434 | preempt_disable(); | ||
432 | if (last_task_used_math == current) | 435 | if (last_task_used_math == current) |
433 | last_task_used_math = NULL; | 436 | last_task_used_math = NULL; |
434 | if (last_task_used_altivec == current) | 437 | if (last_task_used_altivec == current) |
@@ -437,6 +440,7 @@ void flush_thread(void) | |||
437 | if (last_task_used_spe == current) | 440 | if (last_task_used_spe == current) |
438 | last_task_used_spe = NULL; | 441 | last_task_used_spe = NULL; |
439 | #endif | 442 | #endif |
443 | preempt_enable(); | ||
440 | } | 444 | } |
441 | 445 | ||
442 | void | 446 | void |
@@ -535,6 +539,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp) | |||
535 | regs->nip = nip; | 539 | regs->nip = nip; |
536 | regs->gpr[1] = sp; | 540 | regs->gpr[1] = sp; |
537 | regs->msr = MSR_USER; | 541 | regs->msr = MSR_USER; |
542 | preempt_disable(); | ||
538 | if (last_task_used_math == current) | 543 | if (last_task_used_math == current) |
539 | last_task_used_math = NULL; | 544 | last_task_used_math = NULL; |
540 | if (last_task_used_altivec == current) | 545 | if (last_task_used_altivec == current) |
@@ -543,6 +548,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp) | |||
543 | if (last_task_used_spe == current) | 548 | if (last_task_used_spe == current) |
544 | last_task_used_spe = NULL; | 549 | last_task_used_spe = NULL; |
545 | #endif | 550 | #endif |
551 | preempt_enable(); | ||
546 | memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); | 552 | memset(current->thread.fpr, 0, sizeof(current->thread.fpr)); |
547 | current->thread.fpscr.val = 0; | 553 | current->thread.fpscr.val = 0; |
548 | #ifdef CONFIG_ALTIVEC | 554 | #ifdef CONFIG_ALTIVEC |
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index d9396c1721cd..580b63da836b 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -77,6 +77,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, | |||
77 | BUG_ON(!pte_none(*pte)); | 77 | BUG_ON(!pte_none(*pte)); |
78 | set_pte_at(mm, address, pte, entry); | 78 | set_pte_at(mm, address, pte, entry); |
79 | address += PAGE_SIZE; | 79 | address += PAGE_SIZE; |
80 | pte_val(entry) += PAGE_SIZE; | ||
80 | pte++; | 81 | pte++; |
81 | } while (address < curend); | 82 | } while (address < curend); |
82 | } while (address < end); | 83 | } while (address < end); |