irqchip/loongson-pch-pic: Fix potential incorrect hwirq assignment
authorLiu Peibao <liupeibao@loongson.cn>
Wed, 14 Jun 2023 11:59:33 +0000 (19:59 +0800)
committerMarc Zyngier <maz@kernel.org>
Fri, 16 Jun 2023 11:59:28 +0000 (12:59 +0100)
commit783422e704ca0fa41cb2fe9ed79e46b6fe7eae29
treea342b8c35767719fcbcc17248d77da6af72191ce
parentf679616565f1cf1a4acb245dbc0032dafcd40637
irqchip/loongson-pch-pic: Fix potential incorrect hwirq assignment

In DeviceTree path, when ht_vec_base is not zero, the hwirq of PCH PIC
will be assigned incorrectly. Because when pch_pic_domain_translate()
adds the ht_vec_base to hwirq, the hwirq does not have the ht_vec_base
subtracted when calling irq_domain_set_info().

The ht_vec_base is designed for the parent irq chip/domain of the PCH PIC.
It seems not proper to deal this in callbacks of the PCH PIC domain and
let's put this back like the initial commit ef8c01eb64ca ("irqchip: Add
Loongson PCH PIC controller").

Fixes: bcdd75c596c8 ("irqchip/loongson-pch-pic: Add ACPI init support")
Cc: stable@vger.kernel.org
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Liu Peibao <liupeibao@loongson.cn>
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230614115936.5950-3-lvjianmin@loongson.cn
drivers/irqchip/irq-loongson-pch-pic.c