diff options
author | Noam Camus <noamc@ezchip.com> | 2013-09-12 03:37:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 10:40:08 -0400 |
commit | c3567f8a359b7917dcffa442301f88ed0a75211f (patch) | |
tree | 0bf6687e01b7d9eabd7b096e64bbb2d8a6c2bf15 /arch | |
parent | d5d04bb48f0eb89c14e76779bb46212494de0bec (diff) |
ARC: SMP failed to boot due to missing IVT setup
Commit 05b016ecf5e7a "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>
Cc: Cc: <stable@vger.kernel.org> #3.11
Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/include/asm/sections.h | 1 | ||||
-rw-r--r-- | arch/arc/kernel/head.S | 5 | ||||
-rw-r--r-- | arch/arc/kernel/irq.c | 1 | ||||
-rw-r--r-- | arch/arc/kernel/setup.c | 3 |
4 files changed, 5 insertions, 5 deletions
diff --git a/arch/arc/include/asm/sections.h b/arch/arc/include/asm/sections.h index 6fc1159dfefe..764f1e3ba752 100644 --- a/arch/arc/include/asm/sections.h +++ b/arch/arc/include/asm/sections.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <asm-generic/sections.h> | 12 | #include <asm-generic/sections.h> |
13 | 13 | ||
14 | extern char _int_vec_base_lds[]; | ||
15 | extern char __arc_dccm_base[]; | 14 | extern char __arc_dccm_base[]; |
16 | extern char __dtb_start[]; | 15 | extern char __dtb_start[]; |
17 | 16 | ||
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 2a913f85a747..0f944f024513 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S | |||
@@ -34,6 +34,9 @@ stext: | |||
34 | ; IDENTITY Reg [ 3 2 1 0 ] | 34 | ; IDENTITY Reg [ 3 2 1 0 ] |
35 | ; (cpu-id) ^^^ => Zero for UP ARC700 | 35 | ; (cpu-id) ^^^ => Zero for UP ARC700 |
36 | ; => #Core-ID if SMP (Master 0) | 36 | ; => #Core-ID if SMP (Master 0) |
37 | ; Note that non-boot CPUs might not land here if halt-on-reset and | ||
38 | ; instead breath life from @first_lines_of_secondary, but we still | ||
39 | ; need to make sure only boot cpu takes this path. | ||
37 | GET_CPU_ID r5 | 40 | GET_CPU_ID r5 |
38 | cmp r5, 0 | 41 | cmp r5, 0 |
39 | jnz arc_platform_smp_wait_to_boot | 42 | jnz arc_platform_smp_wait_to_boot |
@@ -98,6 +101,8 @@ stext: | |||
98 | 101 | ||
99 | first_lines_of_secondary: | 102 | first_lines_of_secondary: |
100 | 103 | ||
104 | sr @_int_vec_base_lds, [AUX_INTR_VEC_BASE] | ||
105 | |||
101 | ; setup per-cpu idle task as "current" on this CPU | 106 | ; setup per-cpu idle task as "current" on this CPU |
102 | ld r0, [@secondary_idle_tsk] | 107 | ld r0, [@secondary_idle_tsk] |
103 | SET_CURR_TASK_ON_CPU r0, r1 | 108 | SET_CURR_TASK_ON_CPU r0, r1 |
diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c index 305b3f866aa7..5fc92455da36 100644 --- a/arch/arc/kernel/irq.c +++ b/arch/arc/kernel/irq.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * -Needed for each CPU (hence not foldable into init_IRQ) | 24 | * -Needed for each CPU (hence not foldable into init_IRQ) |
25 | * | 25 | * |
26 | * what it does ? | 26 | * what it does ? |
27 | * -setup Vector Table Base Reg - in case Linux not linked at 0x8000_0000 | ||
28 | * -Disable all IRQs (on CPU side) | 27 | * -Disable all IRQs (on CPU side) |
29 | * -Optionally, setup the High priority Interrupts as Level 2 IRQs | 28 | * -Optionally, setup the High priority Interrupts as Level 2 IRQs |
30 | */ | 29 | */ |
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index b011f8c164a1..2c68bc7e6a78 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
@@ -47,10 +47,7 @@ void read_arc_build_cfg_regs(void) | |||
47 | READ_BCR(AUX_IDENTITY, cpu->core); | 47 | READ_BCR(AUX_IDENTITY, cpu->core); |
48 | 48 | ||
49 | cpu->timers = read_aux_reg(ARC_REG_TIMERS_BCR); | 49 | cpu->timers = read_aux_reg(ARC_REG_TIMERS_BCR); |
50 | |||
51 | cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE); | 50 | cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE); |
52 | if (cpu->vec_base == 0) | ||
53 | cpu->vec_base = (unsigned int)_int_vec_base_lds; | ||
54 | 51 | ||
55 | READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space); | 52 | READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space); |
56 | cpu->uncached_base = uncached_space.start << 24; | 53 | cpu->uncached_base = uncached_space.start << 24; |