aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch/kernel/time.c
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-05-01 17:19:10 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-05-01 17:19:10 +0800
commit9e36fa42995a7c7fa8d84a429ca647736c4f1c66 (patch)
treed581a92e3e2d3f038d806db8e7b6624a5ba3e536 /arch/loongarch/kernel/time.c
parent3b5a5672b34bdac2aa63985cd1226c569e36e7a7 (diff)
LoongArch: Clean up the architectural interrupt definitions
While interrupts are assigned ECodes `64 + interrupt number`, all existing use sites of interrupt numbers want the 64 subtracted. Re-arrange the definitions so that the actual interrupt number is used everywhere, and make EXCCODE_INT_END inclusive as it is more intuitive that way. While at it, according to the asm/loongarch.h definitions, the total number of architectural interrupts should be 14, but various other places indicate otherwise (13 or 15). Those places have been adjusted to 14 as well for consistency. Signed-off-by: WANG Xuerui <git@xen0n.name> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/time.c')
-rw-r--r--arch/loongarch/kernel/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/time.c b/arch/loongarch/kernel/time.c
index 4351f69d9950..f377e50f3c66 100644
--- a/arch/loongarch/kernel/time.c
+++ b/arch/loongarch/kernel/time.c
@@ -133,7 +133,7 @@ static int get_timer_irq(void)
struct irq_domain *d = irq_find_matching_fwnode(cpuintc_handle, DOMAIN_BUS_ANY);
if (d)
- return irq_create_mapping(d, EXCCODE_TIMER - EXCCODE_INT_START);
+ return irq_create_mapping(d, INT_TI);
return -EINVAL;
}