aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/metag/include/asm/smp.h2
-rw-r--r--arch/metag/kernel/dma.c5
-rw-r--r--arch/metag/kernel/smp.c15
-rw-r--r--arch/metag/kernel/topology.c1
4 files changed, 5 insertions, 18 deletions
diff --git a/arch/metag/include/asm/smp.h b/arch/metag/include/asm/smp.h
index e0373f81a117..1d7e770f7a54 100644
--- a/arch/metag/include/asm/smp.h
+++ b/arch/metag/include/asm/smp.h
@@ -7,13 +7,11 @@
7 7
8enum ipi_msg_type { 8enum ipi_msg_type {
9 IPI_CALL_FUNC, 9 IPI_CALL_FUNC,
10 IPI_CALL_FUNC_SINGLE,
11 IPI_RESCHEDULE, 10 IPI_RESCHEDULE,
12}; 11};
13 12
14extern void arch_send_call_function_single_ipi(int cpu); 13extern void arch_send_call_function_single_ipi(int cpu);
15extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 14extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
16#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
17 15
18asmlinkage void secondary_start_kernel(void); 16asmlinkage void secondary_start_kernel(void);
19 17
diff --git a/arch/metag/kernel/dma.c b/arch/metag/kernel/dma.c
index db589ad5dbc4..c700d625067a 100644
--- a/arch/metag/kernel/dma.c
+++ b/arch/metag/kernel/dma.c
@@ -399,11 +399,6 @@ static int __init dma_alloc_init(void)
399 pgd = pgd_offset(&init_mm, CONSISTENT_START); 399 pgd = pgd_offset(&init_mm, CONSISTENT_START);
400 pud = pud_alloc(&init_mm, pgd, CONSISTENT_START); 400 pud = pud_alloc(&init_mm, pgd, CONSISTENT_START);
401 pmd = pmd_alloc(&init_mm, pud, CONSISTENT_START); 401 pmd = pmd_alloc(&init_mm, pud, CONSISTENT_START);
402 if (!pmd) {
403 pr_err("%s: no pmd tables\n", __func__);
404 ret = -ENOMEM;
405 break;
406 }
407 WARN_ON(!pmd_none(*pmd)); 402 WARN_ON(!pmd_none(*pmd));
408 403
409 pte = pte_alloc_kernel(pmd, CONSISTENT_START); 404 pte = pte_alloc_kernel(pmd, CONSISTENT_START);
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c
index 7c0113142981..f006d2276f40 100644
--- a/arch/metag/kernel/smp.c
+++ b/arch/metag/kernel/smp.c
@@ -68,7 +68,7 @@ static DECLARE_COMPLETION(cpu_running);
68/* 68/*
69 * "thread" is assumed to be a valid Meta hardware thread ID. 69 * "thread" is assumed to be a valid Meta hardware thread ID.
70 */ 70 */
71int boot_secondary(unsigned int thread, struct task_struct *idle) 71static int boot_secondary(unsigned int thread, struct task_struct *idle)
72{ 72{
73 u32 val; 73 u32 val;
74 74
@@ -491,7 +491,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask)
491 491
492void arch_send_call_function_single_ipi(int cpu) 492void arch_send_call_function_single_ipi(int cpu)
493{ 493{
494 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); 494 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC);
495} 495}
496 496
497void show_ipi_list(struct seq_file *p) 497void show_ipi_list(struct seq_file *p)
@@ -517,11 +517,10 @@ static DEFINE_SPINLOCK(stop_lock);
517 * 517 *
518 * Bit 0 - Inter-processor function call 518 * Bit 0 - Inter-processor function call
519 */ 519 */
520static int do_IPI(struct pt_regs *regs) 520static int do_IPI(void)
521{ 521{
522 unsigned int cpu = smp_processor_id(); 522 unsigned int cpu = smp_processor_id();
523 struct ipi_data *ipi = &per_cpu(ipi_data, cpu); 523 struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
524 struct pt_regs *old_regs = set_irq_regs(regs);
525 unsigned long msgs, nextmsg; 524 unsigned long msgs, nextmsg;
526 int handled = 0; 525 int handled = 0;
527 526
@@ -546,10 +545,6 @@ static int do_IPI(struct pt_regs *regs)
546 generic_smp_call_function_interrupt(); 545 generic_smp_call_function_interrupt();
547 break; 546 break;
548 547
549 case IPI_CALL_FUNC_SINGLE:
550 generic_smp_call_function_single_interrupt();
551 break;
552
553 default: 548 default:
554 pr_crit("CPU%u: Unknown IPI message 0x%lx\n", 549 pr_crit("CPU%u: Unknown IPI message 0x%lx\n",
555 cpu, nextmsg); 550 cpu, nextmsg);
@@ -557,8 +552,6 @@ static int do_IPI(struct pt_regs *regs)
557 } 552 }
558 } 553 }
559 554
560 set_irq_regs(old_regs);
561
562 return handled; 555 return handled;
563} 556}
564 557
@@ -624,7 +617,7 @@ static void kick_raise_softirq(cpumask_t callmap, unsigned int irq)
624static TBIRES ipi_handler(TBIRES State, int SigNum, int Triggers, 617static TBIRES ipi_handler(TBIRES State, int SigNum, int Triggers,
625 int Inst, PTBI pTBI, int *handled) 618 int Inst, PTBI pTBI, int *handled)
626{ 619{
627 *handled = do_IPI((struct pt_regs *)State.Sig.pCtx); 620 *handled = do_IPI();
628 621
629 return State; 622 return State;
630} 623}
diff --git a/arch/metag/kernel/topology.c b/arch/metag/kernel/topology.c
index bec3dec4922e..4ba595701f7d 100644
--- a/arch/metag/kernel/topology.c
+++ b/arch/metag/kernel/topology.c
@@ -19,6 +19,7 @@
19DEFINE_PER_CPU(struct cpuinfo_metag, cpu_data); 19DEFINE_PER_CPU(struct cpuinfo_metag, cpu_data);
20 20
21cpumask_t cpu_core_map[NR_CPUS]; 21cpumask_t cpu_core_map[NR_CPUS];
22EXPORT_SYMBOL(cpu_core_map);
22 23
23static cpumask_t cpu_coregroup_map(unsigned int cpu) 24static cpumask_t cpu_coregroup_map(unsigned int cpu)
24{ 25{