aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel/smp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 12:46:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 12:46:18 -0400
commit0efacbbaee1e94e9942da0912f5b46ffd45a74bd (patch)
treea17933437de955f4ce5e74760610bab75f2ae385 /arch/arc/kernel/smp.c
parentf4f27d0028aabce57e44c16c2fdefccd6310d2f3 (diff)
parent776d7f1694a7d678291354a05f0243965708306a (diff)
Merge tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
Pull ARC updates from Vineet Gupta: "We have a relatively big changeset for ARC for 4.7. The highlight is support for EZChip (now Mellanox) NPS-400 network processor, a 400-Gb throughput C-programmable packet processor based on ARC700 cores from Synopsys. See http://www.mellanox.com/related-docs/prod_npu/PB_NPS-400.pdf Also present are irqchip and clocksource drivers for NPS as agreed with respective maintainers to go via ARC tree due to an soc header dependency. I have the needed ACKs from Jason, Marc, Daniel. You might run into a trivial merge conflict in drivers/irqchip/* This EZChip platform support required some deep changes in ARC architecture code and also opportunity to cleanup past sins (legacy irq domains, missing irq domain lookup, hard coded timer irqs...) Summary: - Support for EZChip (now Mellanox) NPS-400 Network processor based on ARC700 - NPS interrupt controller and clocksource drivers - ARC timers probed off DT - ARC iqrchips switching to linear domain (upgrade from legacy domains)" * tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (37 commits) arc: axs103_smp: Fix CPU frequency to 100MHz for dual-core arc: axs10x: Add DT bindings for I2S PLL Clock ARC: pae: STRICT_MM_TYPECHECKS was broken ARC: Add eznps platform to Kconfig and Makefile ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE ARC: [plat-eznps] Use dedicated cpu_relax() ARC: [plat-eznps] Use dedicated identity auxiliary register. ARC: [plat-eznps] Use dedicated SMP barriers ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg ARC: [plat-eznps] Use dedicated user stack top ARC: [plat-eznps] Add eznps platform ARC: [plat-eznps] Add eznps board defconfig and dts ARC: Mark secondary cpu online only after all HW setup is done ARC: rwlock: disable interrupts in !LLSC variant ARC: Make vmalloc size configurable ARC: clean out UAPI byteorder.h clean off Kconfig symbol irqchip: add nps Internal and external irqchips clocksource: Add NPS400 timers driver soc: Support for EZchip SoC Documentation: Add EZchip vendor to binding list ...
Diffstat (limited to 'arch/arc/kernel/smp.c')
-rw-r--r--arch/arc/kernel/smp.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 4cb3add77c75..f183cc648851 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -126,11 +126,6 @@ void start_kernel_secondary(void)
126 current->active_mm = mm; 126 current->active_mm = mm;
127 cpumask_set_cpu(cpu, mm_cpumask(mm)); 127 cpumask_set_cpu(cpu, mm_cpumask(mm));
128 128
129 notify_cpu_starting(cpu);
130 set_cpu_online(cpu, true);
131
132 pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu);
133
134 /* Some SMP H/w setup - for each cpu */ 129 /* Some SMP H/w setup - for each cpu */
135 if (plat_smp_ops.init_per_cpu) 130 if (plat_smp_ops.init_per_cpu)
136 plat_smp_ops.init_per_cpu(cpu); 131 plat_smp_ops.init_per_cpu(cpu);
@@ -138,7 +133,10 @@ void start_kernel_secondary(void)
138 if (machine_desc->init_per_cpu) 133 if (machine_desc->init_per_cpu)
139 machine_desc->init_per_cpu(cpu); 134 machine_desc->init_per_cpu(cpu);
140 135
141 arc_local_timer_setup(); 136 notify_cpu_starting(cpu);
137 set_cpu_online(cpu, true);
138
139 pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu);
142 140
143 local_irq_enable(); 141 local_irq_enable();
144 preempt_disable(); 142 preempt_disable();
@@ -346,6 +344,10 @@ irqreturn_t do_IPI(int irq, void *dev_id)
346 344
347/* 345/*
348 * API called by platform code to hookup arch-common ISR to their IPI IRQ 346 * API called by platform code to hookup arch-common ISR to their IPI IRQ
347 *
348 * Note: If IPI is provided by platform (vs. say ARC MCIP), their intc setup/map
349 * function needs to call call irq_set_percpu_devid() for IPI IRQ, otherwise
350 * request_percpu_irq() below will fail
349 */ 351 */
350static DEFINE_PER_CPU(int, ipi_dev); 352static DEFINE_PER_CPU(int, ipi_dev);
351 353
@@ -353,7 +355,16 @@ int smp_ipi_irq_setup(int cpu, int irq)
353{ 355{
354 int *dev = per_cpu_ptr(&ipi_dev, cpu); 356 int *dev = per_cpu_ptr(&ipi_dev, cpu);
355 357
356 arc_request_percpu_irq(irq, cpu, do_IPI, "IPI Interrupt", dev); 358 /* Boot cpu calls request, all call enable */
359 if (!cpu) {
360 int rc;
361
362 rc = request_percpu_irq(irq, do_IPI, "IPI Interrupt", dev);
363 if (rc)
364 panic("Percpu IRQ request failed for %d\n", irq);
365 }
366
367 enable_percpu_irq(irq, 0);
357 368
358 return 0; 369 return 0;
359} 370}