]> git.baikalelectronics.ru Git - kernel.git/commit
ARCv2: intc: Allow interruption by lowest priority interrupt
authorVineet Gupta <vgupta@synopsys.com>
Sun, 7 Feb 2016 07:24:35 +0000 (12:54 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 10 Feb 2016 01:08:50 +0000 (06:38 +0530)
commit928db5509eb07ce21f24c20792185a5af9be117e
tree9fa656c3c51af952e50c3e8ac9dcf2f904c247c4
parentee9dc75a28c223e2570132a8657198b0884d6832
ARCv2: intc: Allow interruption by lowest priority interrupt

ARC HS Cores support configurable multiple interrupt priorities of upto
16 levels.

There is processor "interrupt preemption threshhold" in STATUS32.E[4:1]
And several places need to set this up:
1. seed value as kernel is booting
2. seed value for user space programs
3. Arg to SLEEP instruction in idle task (what interrupt prio can wake)
4. Per-IRQ line prioirty (i.e. what is the priority of interrupt
   raised by a peripheral or timer or perf counter...

Currently above sites use the highest priority 0. This can be potential
problem when multiple priorities are supported. e.g. user space could
only be interrupted by P0 interrupt, not others...
So turn this over and instead make default interruption level to be
the lowest priority possible 15. This should be fine even if there are
fewer priority levels configured (say two: P0 HIGH, P1 LOW)

This feature also effectively disables FIRQ feature if present in
hardware config. With old code, a P0 interrupt would be FIRQ, needing
special handling (ISR or Register Banks) which is NOT supported yet.
Now it not be P0 (P15 or whatever is lowest prio) so FIRQ is not
triggered.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/irqflags-arcv2.h
arch/arc/kernel/intc-arcv2.c