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: <aB-acnUBnidSw7r4@surfacebook.localdomain>
Date: Sat, 10 May 2025 21:26:58 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: 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>, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Peng Fan <peng.fan@....com>
Subject: Re: [PATCH RFC 8/9] gpio: timberdale: Make irq_chip immutable

Fri, May 09, 2025 at 12:45:39PM +0800, Peng Fan (OSS) kirjoitti:
> From: Peng Fan <peng.fan@....com>
> 
> Kernel warns about mutable irq_chips:
> "not an immutable chip, please consider fixing!"
> 
> Constify timbgpio_irqchip, flag the irq_chip as IRQCHIP_IMMUTABLE,
> add the new helper functions, and call the appropriate gpiolib functions.

...

>  	struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
>  	int offset = d->irq - tgpio->irq_base;
> +	irq_hw_number_t hwirq = irqd_to_hwirq(d);
>  	unsigned long flags;

While at it, replace direct accesses to IRQ data `irq` member.

  	int offset = hwirq - tgpio->irq_base;

...

>  static void timbgpio_irq_enable(struct irq_data *d)
>  {
>  	struct timbgpio *tgpio = irq_data_get_irq_chip_data(d);
>  	int offset = d->irq - tgpio->irq_base;
> +	irq_hw_number_t hwirq = irqd_to_hwirq(d);
>  	unsigned long flags;

Ditto.

> +	gpiochip_enable_irq(&tgpio->gpio, hwirq);
> +
>  	spin_lock_irqsave(&tgpio->lock, flags);
>  	tgpio->last_ier |= 1UL << offset;
>  	iowrite32(tgpio->last_ier, tgpio->membase + TGPIO_IER);

>  }

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ