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: <20250509-gpio-v1-0-639377c98288@nxp.com>
Date: Fri, 09 May 2025 12:45:31 +0800
From: "Peng Fan (OSS)" <peng.fan@....nxp.com>
To: Ray Jui <rjui@...adcom.com>, 
 Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, 
 Linus Walleij <linus.walleij@...aro.org>, 
 Bartosz Golaszewski <brgl@...ev.pl>, 
 Florian Fainelli <florian.fainelli@...adcom.com>, 
 Scott Branden <sbranden@...adcom.com>, Vladimir Zapolskiy <vz@...ia.com>, 
 Keerthy <j-keerthy@...com>, Robert Jarzmik <robert.jarzmik@...e.fr>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-arm-kernel@...ts.infradead.org, Peng Fan <peng.fan@....com>
Subject: [PATCH RFC 0/9] gpio: make irq_chip immutable

This might be a bit late to post this patchset, since it is almost rc6,
but no rush here. Not expect this patchset be in 6.16.

This is an effort to make irq_chip immutable to elimnate the kernel
warning "not an immutable chip, please consider fixing!"

The major changes 
- add "gpiochip_disable_irq(gc, hwirq)" to end of mask hook
- add "gpiochip_enable_irq(gc, hwirq)" to start of unmask hook
- add IMMUTABLE flag
- add GPIOCHIP_IRQ_RESOURCE_HELPERS

For davinci, two patches are made, 1st is to update irq chip data, 2nd
make irq_chip immutable.
For xgene-sb, two functions are added, because previous driver directly
use irq_chip_unmask_parent and irq_chip_mask_parent.

In some patches, I use irqd_to_hwirq(d) to get hwirq; in others, I
direclty use d->hwirq to align with previous code.

Some Kconfig entries do not select GPILIB_IRQCHIP, but I tried
to build pxa_defconfig lpc18xx_defconfig and multi_v7_defconfig,
GPIOLIB_IRQCHIP is y.
Not sure we should select GPIOLIB_IRQCHIP for them, because if
deselect GPIOLIB_IRQCHIP, there will be build failure.

I not have platform to test the code, just best effort to do this
patchset.

Signed-off-by: Peng Fan <peng.fan@....com>
---
Peng Fan (9):
      gpio: bcm-kona: make irq_chip immutable
      gpio: grgpio: Make irq_chip immutable
      gpio: lpc18xx: Make irq_chip immutable
      gpio: mpc8xxx: Make irq_chip immutable
      gpio: davinci: Update irq chip data
      gpio: davinci: Make irq_chip immutable
      gpio: xgene-sb: Make irq_chip immutable
      gpio: timberdale: Make irq_chip immutable
      gpio: pxa: Make irq_chip immutable

 drivers/gpio/gpio-bcm-kona.c   |  1 +
 drivers/gpio/gpio-davinci.c    | 29 ++++++++++++++---------------
 drivers/gpio/gpio-grgpio.c     |  7 ++++++-
 drivers/gpio/gpio-lpc18xx.c    | 13 +++++++++++--
 drivers/gpio/gpio-mpc8xxx.c    |  8 ++++++++
 drivers/gpio/gpio-pxa.c        |  8 +++++++-
 drivers/gpio/gpio-timberdale.c | 10 +++++++++-
 drivers/gpio/gpio-xgene-sb.c   | 26 +++++++++++++++++++++++---
 8 files changed, 79 insertions(+), 23 deletions(-)
---
base-commit: f48887a98b78880b7711aca311fbbbcaad6c4e3b
change-id: 20250509-gpio-c09a49e972ba

Best regards,
-- 
Peng Fan <peng.fan@....com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ