Commit 98f74554 authored by Noam Camus's avatar Noam Camus Committed by Greg Kroah-Hartman

ARC: SMP failed to boot due to missing IVT setup

commit c3567f8a upstream.

Commit 05b016ec "ARC: Setup Vector Table Base in early boot" moved
the Interrupt vector Table setup out of arc_init_IRQ() which is called
for all CPUs, to entry point of boot cpu only, breaking booting of others.

Fix by adding the same to entry point of non-boot CPUs too.

read_arc_build_cfg_regs() printing IVT Base Register didn't help the
casue since it prints a synthetic value if zero which is totally bogus,
so fix that to print the exact Register.

[vgupta: Remove the now stale comment from header of arc_init_IRQ and
also added the commentary for halt-on-reset]

Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: default avatarNoam Camus <noamc@ezchip.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8a229aea
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <asm-generic/sections.h> #include <asm-generic/sections.h>
extern char _int_vec_base_lds[];
extern char __arc_dccm_base[]; extern char __arc_dccm_base[];
extern char __dtb_start[]; extern char __dtb_start[];
......
...@@ -34,6 +34,9 @@ stext: ...@@ -34,6 +34,9 @@ stext:
; IDENTITY Reg [ 3 2 1 0 ] ; IDENTITY Reg [ 3 2 1 0 ]
; (cpu-id) ^^^ => Zero for UP ARC700 ; (cpu-id) ^^^ => Zero for UP ARC700
; => #Core-ID if SMP (Master 0) ; => #Core-ID if SMP (Master 0)
; Note that non-boot CPUs might not land here if halt-on-reset and
; instead breath life from @first_lines_of_secondary, but we still
; need to make sure only boot cpu takes this path.
GET_CPU_ID r5 GET_CPU_ID r5
cmp r5, 0 cmp r5, 0
jnz arc_platform_smp_wait_to_boot jnz arc_platform_smp_wait_to_boot
...@@ -98,6 +101,8 @@ stext: ...@@ -98,6 +101,8 @@ stext:
first_lines_of_secondary: first_lines_of_secondary:
sr @_int_vec_base_lds, [AUX_INTR_VEC_BASE]
; setup per-cpu idle task as "current" on this CPU ; setup per-cpu idle task as "current" on this CPU
ld r0, [@secondary_idle_tsk] ld r0, [@secondary_idle_tsk]
SET_CURR_TASK_ON_CPU r0, r1 SET_CURR_TASK_ON_CPU r0, r1
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
* -Needed for each CPU (hence not foldable into init_IRQ) * -Needed for each CPU (hence not foldable into init_IRQ)
* *
* what it does ? * what it does ?
* -setup Vector Table Base Reg - in case Linux not linked at 0x8000_0000
* -Disable all IRQs (on CPU side) * -Disable all IRQs (on CPU side)
* -Optionally, setup the High priority Interrupts as Level 2 IRQs * -Optionally, setup the High priority Interrupts as Level 2 IRQs
*/ */
......
...@@ -47,10 +47,7 @@ void __cpuinit read_arc_build_cfg_regs(void) ...@@ -47,10 +47,7 @@ void __cpuinit read_arc_build_cfg_regs(void)
READ_BCR(AUX_IDENTITY, cpu->core); READ_BCR(AUX_IDENTITY, cpu->core);
cpu->timers = read_aux_reg(ARC_REG_TIMERS_BCR); cpu->timers = read_aux_reg(ARC_REG_TIMERS_BCR);
cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE); cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE);
if (cpu->vec_base == 0)
cpu->vec_base = (unsigned int)_int_vec_base_lds;
READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space); READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space);
cpu->uncached_base = uncached_space.start << 24; cpu->uncached_base = uncached_space.start << 24;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment