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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H5sO0x1EkWks5QZ8ah-stB7JbDk6eFFeeonXD6JT9fHAw@mail.gmail.com>
Date: Sun, 6 Apr 2025 17:46:45 +0800
From: Huacai Chen <chenhuacai@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Huacai Chen <chenhuacai@...ngson.cn>, loongarch@...ts.linux.dev, 
	linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>, 
	Jiaxun Yang <jiaxun.yang@...goat.com>, stable@...r.kernel.org, 
	Yinbo Zhu <zhuyinbo@...ngson.cn>
Subject: Re: [PATCH] irqchip/loongson-liointc: Support to set IRQ_TYPE_EDGE_BOTH

Hi, Thomas,

On Thu, Apr 3, 2025 at 11:48 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> On Wed, Apr 02 2025 at 17:25, Huacai Chen wrote:
> > 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.
>
> That's broken because it will either trigger on the rising or the
> falling edge depending on the setting of LIOINTC_REG_INTC_POL.
Yes, this patch does exactly this.

>
> But it won't trigger on both. So no, you cannot claim that this fixes
> anything.
Yes, it won't trigger on both (not perfect), but it allows drivers
that request "both" work (better than fail to request), and there are
other irqchip drivers that do similar things.

For example,

drivers/irqchip/irq-mips-gic.c
        case IRQ_TYPE_EDGE_BOTH:
                pol = 0; /* Doesn't matter */
                trig = GIC_TRIG_EDGE;
                dual = GIC_DUAL_DUAL;
                break;

drivers/irqchip/irq-qcom-mpm.c
        if (type & IRQ_TYPE_EDGE_BOTH)
                type = IRQ_TYPE_EDGE_RISING;

 Huacai

>
> Thanks,
>
>         tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ