lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250402092500.514305-1-chenhuacai@loongson.cn>
Date: Wed,  2 Apr 2025 17:25:00 +0800
From: Huacai Chen <chenhuacai@...ngson.cn>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: loongarch@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Xuefeng Li <lixuefeng@...ngson.cn>,
	Huacai Chen <chenhuacai@...il.com>,
	Jiaxun Yang <jiaxun.yang@...goat.com>,
	Huacai Chen <chenhuacai@...ngson.cn>,
	stable@...r.kernel.org,
	Yinbo Zhu <zhuyinbo@...ngson.cn>
Subject: [PATCH] irqchip/loongson-liointc: Support to set IRQ_TYPE_EDGE_BOTH

Some peripheral subsystems request IRQ_TYPE_EDGE_BOTH interrupt type and
report request failures on LIOINTC. To avoid such failures we support to
set IRQ_TYPE_EDGE_BOTH type on LIOINTC, by setting LIOINTC_REG_INTC_EDGE
to true and keep LIOINTC_REG_INTC_POL as is.

Cc: stable@...r.kernel.org
Signed-off-by: Yinbo Zhu <zhuyinbo@...ngson.cn>
Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
---
 drivers/irqchip/irq-loongson-liointc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c
index 2b1bd4a96665..c0c8ef8d27cf 100644
--- a/drivers/irqchip/irq-loongson-liointc.c
+++ b/drivers/irqchip/irq-loongson-liointc.c
@@ -128,6 +128,10 @@ static int liointc_set_type(struct irq_data *data, unsigned int type)
 		liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, false);
 		liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, true);
 		break;
+	case IRQ_TYPE_EDGE_BOTH:
+		liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, true);
+		/* Requester need "both", keep LIOINTC_REG_INTC_POL as is */
+		break;
 	case IRQ_TYPE_EDGE_RISING:
 		liointc_set_bit(gc, LIOINTC_REG_INTC_EDGE, mask, true);
 		liointc_set_bit(gc, LIOINTC_REG_INTC_POL, mask, false);
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ