Skip to content
Commit 234a557e authored by Baoqi Zhang's avatar Baoqi Zhang Committed by Thomas Gleixner
Browse files

irqchip/loongson-pch-pic: Update interrupt registration policy



The current code is using a fixed mapping between the LS7A interrupt source
and the HT interrupt vector. This prevents the utilization of the full
interrupt vector space and therefore limits the number of interrupt source
in a system.

Replace the fixed mapping with a dynamic mapping which allocates a
vector when an interrupt source is set up. This avoids that unused
sources prevent vectors from being used for other devices.

Introduce a mapping table in struct pch_pic, where each interrupt source
will allocate an index as a 'hwirq' number from the table in the order of
application and set table value as interrupt source number. This hwirq
number will be configured as vector in the HT interrupt controller. For an
interrupt source, the validity period of the obtained hwirq will last until
the system reset.

Co-developed-by: default avatarBiao Dong <dongbiao@loongson.cn>
Signed-off-by: default avatarBiao Dong <dongbiao@loongson.cn>
Co-developed-by: default avatarTianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: default avatarTianyang Zhang <zhangtianyang@loongson.cn>
Signed-off-by: default avatarBaoqi Zhang <zhangbaoqi@loongson.cn>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240422093830.27212-1-zhangtianyang@loongson.cn
parent bb58c1ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment