diff options
author | Sunil V L <sunilvl@ventanamicro.com> | 2022-05-27 10:47:42 +0530 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2022-07-19 16:39:14 -0700 |
commit | ad635e723e17379b192a5ba9c182e3eedfc24d16 (patch) | |
tree | 16f68aacc8eb9b33253e64b2811783f96acf4a67 /drivers/irqchip/irq-riscv-intc.c | |
parent | 62750eae410cf20b7d040395064bac547cfdf540 (diff) | |
download | lwn-ad635e723e17379b192a5ba9c182e3eedfc24d16.tar.gz lwn-ad635e723e17379b192a5ba9c182e3eedfc24d16.zip |
riscv: cpu: Add 64bit hartid support on RV64
The hartid can be a 64bit value on RV64 platforms.
Add support for 64bit hartid in riscv_of_processor_hartid() and
update its callers.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20220527051743.2829940-5-sunilvl@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'drivers/irqchip/irq-riscv-intc.c')
-rw-r--r-- | drivers/irqchip/irq-riscv-intc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c index b65bd8878d4f..499e5f81b3fe 100644 --- a/drivers/irqchip/irq-riscv-intc.c +++ b/drivers/irqchip/irq-riscv-intc.c @@ -95,10 +95,11 @@ static const struct irq_domain_ops riscv_intc_domain_ops = { static int __init riscv_intc_init(struct device_node *node, struct device_node *parent) { - int rc, hartid; + int rc; + unsigned long hartid; - hartid = riscv_of_parent_hartid(node); - if (hartid < 0) { + rc = riscv_of_parent_hartid(node, &hartid); + if (rc < 0) { pr_warn("unable to find hart id for %pOF\n", node); return 0; } |