diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/kernel/smp.c | 23 | ||||
-rw-r--r-- | arch/mips/kernel/topology.c | 29 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_setup.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/early_printk.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 10 |
7 files changed, 41 insertions, 29 deletions
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index cd9cec9e39e9..6bfbbed0897e 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -6,7 +6,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
6 | 6 | ||
7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ | 7 | obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \ |
8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ | 8 | ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \ |
9 | time.o traps.o unaligned.o | 9 | time.o topology.o traps.o unaligned.o |
10 | 10 | ||
11 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | 11 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ |
12 | irix5sys.o sysirix.o | 12 | irix5sys.o sysirix.o |
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index db80957ada89..49db516789e0 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -463,28 +463,5 @@ void flush_tlb_one(unsigned long vaddr) | |||
463 | smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr); | 463 | smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr); |
464 | } | 464 | } |
465 | 465 | ||
466 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
467 | |||
468 | static int __init topology_init(void) | ||
469 | { | ||
470 | int i, ret; | ||
471 | |||
472 | #ifdef CONFIG_NUMA | ||
473 | for_each_online_node(i) | ||
474 | register_one_node(i); | ||
475 | #endif /* CONFIG_NUMA */ | ||
476 | |||
477 | for_each_present_cpu(i) { | ||
478 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | ||
479 | if (ret) | ||
480 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
481 | "failed (%d)\n", i, ret); | ||
482 | } | ||
483 | |||
484 | return 0; | ||
485 | } | ||
486 | |||
487 | subsys_initcall(topology_init); | ||
488 | |||
489 | EXPORT_SYMBOL(flush_tlb_page); | 466 | EXPORT_SYMBOL(flush_tlb_page); |
490 | EXPORT_SYMBOL(flush_tlb_one); | 467 | EXPORT_SYMBOL(flush_tlb_one); |
diff --git a/arch/mips/kernel/topology.c b/arch/mips/kernel/topology.c new file mode 100644 index 000000000000..660e44ed44d7 --- /dev/null +++ b/arch/mips/kernel/topology.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <linux/cpu.h> | ||
2 | #include <linux/cpumask.h> | ||
3 | #include <linux/init.h> | ||
4 | #include <linux/node.h> | ||
5 | #include <linux/nodemask.h> | ||
6 | #include <linux/percpu.h> | ||
7 | |||
8 | static DEFINE_PER_CPU(struct cpu, cpu_devices); | ||
9 | |||
10 | static int __init topology_init(void) | ||
11 | { | ||
12 | int i, ret; | ||
13 | |||
14 | #ifdef CONFIG_NUMA | ||
15 | for_each_online_node(i) | ||
16 | register_one_node(i); | ||
17 | #endif /* CONFIG_NUMA */ | ||
18 | |||
19 | for_each_present_cpu(i) { | ||
20 | ret = register_cpu(&per_cpu(cpu_devices, i), i); | ||
21 | if (ret) | ||
22 | printk(KERN_WARNING "topology_init: register_cpu %d " | ||
23 | "failed (%d)\n", i, ret); | ||
24 | } | ||
25 | |||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | subsys_initcall(topology_init); | ||
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index ab460f805bef..282f3e52eea3 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -159,7 +159,7 @@ void __init plat_mem_setup(void) | |||
159 | BONITO_PCIMEMBASECFG |= | 159 | BONITO_PCIMEMBASECFG |= |
160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | | 160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | |
161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); | 161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); |
162 | printk("Disabled Bonito IOBC coherency\n"); | 162 | printk("Enabled Bonito IOBC coherency\n"); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else | 165 | else |
diff --git a/arch/x86_64/kernel/early_printk.c b/arch/x86_64/kernel/early_printk.c index e22ecd54870d..47b6d90349da 100644 --- a/arch/x86_64/kernel/early_printk.c +++ b/arch/x86_64/kernel/early_printk.c | |||
@@ -224,7 +224,7 @@ static int __init setup_early_printk(char *buf) | |||
224 | return 0; | 224 | return 0; |
225 | early_console_initialized = 1; | 225 | early_console_initialized = 1; |
226 | 226 | ||
227 | if (!strcmp(buf,"keep")) | 227 | if (strstr(buf, "keep")) |
228 | keep_early = 1; | 228 | keep_early = 1; |
229 | 229 | ||
230 | if (!strncmp(buf, "serial", 6)) { | 230 | if (!strncmp(buf, "serial", 6)) { |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 14654e682411..c80081a6ba41 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -754,10 +754,8 @@ void __setup_vector_irq(int cpu) | |||
754 | { | 754 | { |
755 | /* Initialize vector_irq on a new cpu */ | 755 | /* Initialize vector_irq on a new cpu */ |
756 | /* This function must be called with vector_lock held */ | 756 | /* This function must be called with vector_lock held */ |
757 | unsigned long flags; | ||
758 | int irq, vector; | 757 | int irq, vector; |
759 | 758 | ||
760 | |||
761 | /* Mark the inuse vectors */ | 759 | /* Mark the inuse vectors */ |
762 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { | 760 | for (irq = 0; irq < NR_IRQ_VECTORS; ++irq) { |
763 | if (!cpu_isset(cpu, irq_domain[irq])) | 761 | if (!cpu_isset(cpu, irq_domain[irq])) |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index a153d0a01b72..0d65b22f229c 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -242,12 +242,19 @@ static int dump_trace_unwind(struct unwind_frame_info *info, void *context) | |||
242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 242 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
243 | */ | 243 | */ |
244 | 244 | ||
245 | static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | ||
246 | { | ||
247 | void *t = (void *)tinfo; | ||
248 | return p > t && p < t + THREAD_SIZE - 3; | ||
249 | } | ||
250 | |||
245 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, | 251 | void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * stack, |
246 | struct stacktrace_ops *ops, void *data) | 252 | struct stacktrace_ops *ops, void *data) |
247 | { | 253 | { |
248 | const unsigned cpu = smp_processor_id(); | 254 | const unsigned cpu = smp_processor_id(); |
249 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; | 255 | unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; |
250 | unsigned used = 0; | 256 | unsigned used = 0; |
257 | struct thread_info *tinfo; | ||
251 | 258 | ||
252 | if (!tsk) | 259 | if (!tsk) |
253 | tsk = current; | 260 | tsk = current; |
@@ -370,7 +377,8 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s | |||
370 | /* | 377 | /* |
371 | * This handles the process stack: | 378 | * This handles the process stack: |
372 | */ | 379 | */ |
373 | HANDLE_STACK (((long) stack & (THREAD_SIZE-1)) != 0); | 380 | tinfo = current_thread_info(); |
381 | HANDLE_STACK (valid_stack_ptr(tinfo, stack)); | ||
374 | #undef HANDLE_STACK | 382 | #undef HANDLE_STACK |
375 | } | 383 | } |
376 | EXPORT_SYMBOL(dump_trace); | 384 | EXPORT_SYMBOL(dump_trace); |