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: <ZWbjPIydJRrPnuDy@perf>
Date:   Wed, 29 Nov 2023 16:07:40 +0900
From:   Youngmin Nam <youngmin.nam@...sung.com>
To:     Sam Protsenko <semen.protsenko@...aro.org>
Cc:     tomasz.figa@...il.com, krzysztof.kozlowski@...aro.org,
        s.nawrocki@...sung.com, alim.akhtar@...sung.com,
        linus.walleij@...aro.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pinctrl: samsung: add irq_set_affinity() for non
 wake up external gpio interrupt

On Tue, Nov 28, 2023 at 03:35:53PM -0600, Sam Protsenko wrote:
> On Tue, Nov 28, 2023 at 1:29 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@...aro.org> wrote:
> >
> > On 28/11/2023 02:01, Youngmin Nam wrote:
> > > On Mon, Nov 27, 2023 at 10:54:56AM +0100, Krzysztof Kozlowski wrote:
> > >> On 26/11/2023 10:46, Youngmin Nam wrote:
> > >>> To support affinity setting for non wake up external gpio interrupt,
> > >>> add irq_set_affinity callback using irq number from pinctrl driver data.
> > >>>
> > >>> Before this patch, changing the irq affinity of gpio interrupt is not possible:
> > >>>
> > >>>     # cat /proc/irq/418/smp_affinity
> > >>>     3ff
> > >>>     # echo 00f > /proc/irq/418/smp_affinity
> > >>
> > >> Does this command succeed on your board?
> > >>
> > > Yes.
> >
> > Hm, fails all the time one mine.
> >
> 
> I tried to test this patch on E850-96, and an attempt to write into
> smp_affinity (for some GPIO irq) also fails for me:
> 
>     # echo f0 > smp_affinity
>     -bash: echo: write error: Input/output error
> 
> When I add some pr_err() to exynos_irq_set_affinity(), I can't see
> those printed in dmesg. So I guess exynos_irq_set_affinity() doesn't
> get called at all. So the error probably happens before
> .irq_set_affinity callback gets called.
> 
> Youngmin, can you please try and test this patch on E850-96? This
> board is already supported in upstream kernel. For example you can use
> "Volume Up" interrupt for the test, which is GPIO irq.
> 

I intened this affinity setting would work only on *Non* Wakeup External Interrupt.
The "Volume Up" on E850-96 board is connected with "gpa0-7" and
that is Wakeup External interrupt so that we can't test the callback.

I couldn't find out a pin for the test on E850-96 board yet.
We can test if there is a usage of *Non" Wake up External Interrupt of GPIO
on E850-96 board.

Do you have any idea ?

Thanks

> > >
> > >>>     # cat /proc/irq/418/smp_affinity
> > >>>     3ff
> > >>>     # cat /proc/interrupts
> > >>>                CPU0       CPU1       CPU2       CPU3    ...
> > >>>     418:       3631          0          0          0    ...
> > >>>
> > >>> With this patch applied, it's possible to change irq affinity of gpio interrupt:
> > >>
> > >> ...
> > >>
> > >> On which board did you test it?
> > >>
> > >>
> > > I tested on S5E9945 ERD(Exynos Reference Development) board.
> >
> > There is no such board upstream. How can we reproduce this issue? I am
> > afraid we cannot test neither the bug nor the fix.
> >
> > >
> > >>> +   if (parent)
> > >>> +           return parent->chip->irq_set_affinity(parent, dest, force);
> > >>> +
> > >>
> > >> I think there is a  helper for it: irq_chip_set_affinity_parent().
> > >>
> > >>
> > >
> > > The irq_chip_set_affinity_parent() requires parent_data of irq_data.
> >
> > Hm, so now I wonder why do we not have parent_data...
> >
> > > But when I tested as below, exynos's irqd->parent_data was null.
> > > So we should use irqchip's affinity function instead of the helper function.
> > >
> >
> >
> >
> > Best regards,
> > Krzysztof
> >
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ