mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
sh: intc: IRQ auto-distribution support.
This implements support for hardware-managed IRQ balancing as implemented by SH-X3 cores (presently only hooked up for SH7786, but can probably be carried over to other SH-X3 cores, too). CPUs need to specify their distribution register along with the mask definitions, as these follow the same format. Peripheral IRQs that don't opt out of balancing will be automatically distributed at the whim of the hardware block, while each CPU needs to verify whether it is handling the IRQ or not, especially before clearing the mask. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
fecf066c2d
commit
dc825b1790
6 changed files with 244 additions and 79 deletions
|
@ -23,6 +23,9 @@ struct intc_group {
|
|||
struct intc_mask_reg {
|
||||
unsigned long set_reg, clr_reg, reg_width;
|
||||
intc_enum enum_ids[32];
|
||||
#ifdef CONFIG_INTC_BALANCING
|
||||
unsigned long dist_reg;
|
||||
#endif
|
||||
#ifdef CONFIG_SMP
|
||||
unsigned long smp;
|
||||
#endif
|
||||
|
@ -41,8 +44,14 @@ struct intc_sense_reg {
|
|||
intc_enum enum_ids[16];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_INTC_BALANCING
|
||||
#define INTC_SMP_BALANCING(reg) .dist_reg = (reg)
|
||||
#else
|
||||
#define INTC_SMP_BALANCING(reg)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8)
|
||||
#define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8)
|
||||
#else
|
||||
#define INTC_SMP(stride, nr)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue