aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-05-30 09:51:22 -0400
committerVineet Gupta <vgupta@synopsys.com>2016-05-30 13:15:04 -0400
commit60f2b4b8af548150cc56bf6fd213e47897964794 (patch)
tree6a2e3317963e0315259707df98f3fd0b12ce1f53 /arch/arc
parent49acadff2a0cb4f7ff4efe0fb6c23f5fad81a3b3 (diff)
ARC: [intc-compact] simplify code for 2 priority levels
ARC700 support for 2 interrupt priorities historically allowed even slow perpherals such as emac and uart to setup high priority interrupts which was wrong from the beginning as they could possibly delay the more critical timer interrupt. The hardware support for 2 level interrupts in ARCompact is less than ideal anyways (judging from the "hacks" in low level entry code and thus is not used in productions systems I know of. So reduce the scope of this to timer only, thereby reducing a bunch of complexity. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/Kconfig22
-rw-r--r--arch/arc/kernel/entry-compact.S18
-rw-r--r--arch/arc/kernel/intc-compact.c6
3 files changed, 6 insertions, 40 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 0dcbacfdea4b..b14826a4f59c 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -186,9 +186,6 @@ if SMP
186config ARC_HAS_COH_CACHES 186config ARC_HAS_COH_CACHES
187 def_bool n 187 def_bool n
188 188
189config ARC_HAS_REENTRANT_IRQ_LV2
190 def_bool n
191
192config ARC_MCIP 189config ARC_MCIP
193 bool "ARConnect Multicore IP (MCIP) Support " 190 bool "ARConnect Multicore IP (MCIP) Support "
194 depends on ISA_ARCV2 191 depends on ISA_ARCV2
@@ -366,25 +363,10 @@ config NODES_SHIFT
366if ISA_ARCOMPACT 363if ISA_ARCOMPACT
367 364
368config ARC_COMPACT_IRQ_LEVELS 365config ARC_COMPACT_IRQ_LEVELS
369 bool "ARCompact IRQ Priorities: High(2)/Low(1)" 366 bool "Setup Timer IRQ as high Priority"
370 default n 367 default n
371 # Timer HAS to be high priority, for any other high priority config
372 select ARC_IRQ3_LV2
373 # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy 368 # if SMP, LV2 enabled ONLY if ARC implementation has LV2 re-entrancy
374 depends on !SMP || ARC_HAS_REENTRANT_IRQ_LV2 369 depends on !SMP
375
376if ARC_COMPACT_IRQ_LEVELS
377
378config ARC_IRQ3_LV2
379 bool
380
381config ARC_IRQ5_LV2
382 bool
383
384config ARC_IRQ6_LV2
385 bool
386
387endif #ARC_COMPACT_IRQ_LEVELS
388 370
389config ARC_FPU_SAVE_RESTORE 371config ARC_FPU_SAVE_RESTORE
390 bool "Enable FPU state persistence across context switch" 372 bool "Enable FPU state persistence across context switch"
diff --git a/arch/arc/kernel/entry-compact.S b/arch/arc/kernel/entry-compact.S
index 0cb0abaa0479..98812c1248df 100644
--- a/arch/arc/kernel/entry-compact.S
+++ b/arch/arc/kernel/entry-compact.S
@@ -91,27 +91,13 @@ VECTOR mem_service ; 0x8, Mem exception (0x1)
91VECTOR instr_service ; 0x10, Instrn Error (0x2) 91VECTOR instr_service ; 0x10, Instrn Error (0x2)
92 92
93; ******************** Device ISRs ********************** 93; ******************** Device ISRs **********************
94#ifdef CONFIG_ARC_IRQ3_LV2 94#ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS
95VECTOR handle_interrupt_level2
96#else
97VECTOR handle_interrupt_level1
98#endif
99
100VECTOR handle_interrupt_level1
101
102#ifdef CONFIG_ARC_IRQ5_LV2
103VECTOR handle_interrupt_level2
104#else
105VECTOR handle_interrupt_level1
106#endif
107
108#ifdef CONFIG_ARC_IRQ6_LV2
109VECTOR handle_interrupt_level2 95VECTOR handle_interrupt_level2
110#else 96#else
111VECTOR handle_interrupt_level1 97VECTOR handle_interrupt_level1
112#endif 98#endif
113 99
114.rept 25 100.rept 28
115VECTOR handle_interrupt_level1 ; Other devices 101VECTOR handle_interrupt_level1 ; Other devices
116.endr 102.endr
117 103
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c
index c5cceca36118..ce9deb953ca9 100644
--- a/arch/arc/kernel/intc-compact.c
+++ b/arch/arc/kernel/intc-compact.c
@@ -28,10 +28,8 @@ void arc_init_IRQ(void)
28{ 28{
29 int level_mask = 0; 29 int level_mask = 0;
30 30
31 /* setup any high priority Interrupts (Level2 in ARCompact jargon) */ 31 /* Is timer high priority Interrupt (Level2 in ARCompact jargon) */
32 level_mask |= IS_ENABLED(CONFIG_ARC_IRQ3_LV2) << 3; 32 level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ;
33 level_mask |= IS_ENABLED(CONFIG_ARC_IRQ5_LV2) << 5;
34 level_mask |= IS_ENABLED(CONFIG_ARC_IRQ6_LV2) << 6;
35 33
36 /* 34 /*
37 * Write to register, even if no LV2 IRQs configured to reset it 35 * Write to register, even if no LV2 IRQs configured to reset it