[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230518131013.3366406-7-guoren@kernel.org>
Date: Thu, 18 May 2023 09:09:57 -0400
From: guoren@...nel.org
To: arnd@...db.de, guoren@...nel.org, palmer@...osinc.com,
tglx@...utronix.de, peterz@...radead.org, luto@...nel.org,
conor.dooley@...rochip.com, heiko@...ech.de, jszhang@...nel.org,
chenhuacai@...nel.org, apatel@...tanamicro.com,
atishp@...shpatra.org, mark.rutland@....com, bjorn@...nel.org,
paul.walmsley@...ive.com, catalin.marinas@....com, will@...nel.org,
rppt@...nel.org, anup@...infault.org, shihua@...as.ac.cn,
jiawei@...as.ac.cn, liweiwei@...as.ac.cn, luxufan@...as.ac.cn,
chunyu@...as.ac.cn, tsu.yubo@...il.com, wefu@...hat.com,
wangjunqiang@...as.ac.cn, kito.cheng@...ive.com,
andy.chiu@...ive.com, vincent.chen@...ive.com,
greentime.hu@...ive.com, corbet@....net, wuwei2016@...as.ac.cn,
jrtc27@...c27.com
Cc: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, Guo Ren <guoren@...ux.alibaba.com>
Subject: [RFC PATCH 06/22] irqchip: riscv: s64ilp32: Use __riscv_xlen instead of CONFIG_32BIT
From: Guo Ren <guoren@...ux.alibaba.com>
When s64ilp32 enabled, CONFIG_32BIT=y but __riscv_xlen=64. So we
must use __riscv_xlen to detect real machine XLEN for CSR access.
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Signed-off-by: Guo Ren <guoren@...nel.org>
---
drivers/irqchip/irq-riscv-intc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index 499e5f81b3fe..18f3c837e488 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -21,7 +21,7 @@ static struct irq_domain *intc_domain;
static asmlinkage void riscv_intc_irq(struct pt_regs *regs)
{
- unsigned long cause = regs->cause & ~CAUSE_IRQ_FLAG;
+ xlen_t cause = regs->cause & ~CAUSE_IRQ_FLAG;
if (unlikely(cause >= BITS_PER_LONG))
panic("unexpected interrupt cause");
@@ -113,7 +113,7 @@ static int __init riscv_intc_init(struct device_node *node,
if (riscv_hartid_to_cpuid(hartid) != smp_processor_id())
return 0;
- intc_domain = irq_domain_add_linear(node, BITS_PER_LONG,
+ intc_domain = irq_domain_add_linear(node, __riscv_xlen,
&riscv_intc_domain_ops, NULL);
if (!intc_domain) {
pr_err("unable to add IRQ domain\n");
--
2.36.1
Powered by blists - more mailing lists