]> git.ipfire.org Git - thirdparty/linux.git/commit
irqchip/loongson-pch-pic: Adjust irqchip driver for 32BIT/64BIT
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 13 Jan 2026 08:59:39 +0000 (16:59 +0800)
committerThomas Gleixner <tglx@kernel.org>
Sun, 18 Jan 2026 13:39:18 +0000 (14:39 +0100)
commit0370a5e740f2a078ac3cd3e20dae2dc95c6b92f3
tree5ee7399f83ca3786266a48493317558de088c813
parent4093b0e55b39422bbdae108a1be06292714a994d
irqchip/loongson-pch-pic: Adjust irqchip driver for 32BIT/64BIT

irq_domain_alloc_fwnode() takes a parameter with the phys_addr_t type.
Currently we pass acpi_pchpic->address to it. This can only work on
64BIT platform because its type is u64, so cast it to phys_addr_t and
then the driver works on both 32BIT and 64BIT platforms.

Also use readl() to read vec_count because readq() is only available on
64BIT platform.

[ tglx: Make the cast explicit and use the casted address as argument for
   pch_pic_init() which takes a phys_addr_t as well. Fixup coding
   style. More sigh... ]

Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260113085940.3344837-7-chenhuacai@loongson.cn
drivers/irqchip/irq-loongson-pch-pic.c