[PATCH] irqchip/armada-370-xp: Use atomic_io_modify() instead of another spinlock

Andrew Lunn andrew at lunn.ch
Thu Jun 20 07:25:59 PDT 2024


On Thu, Jun 20, 2024 at 11:52:33AM +0200, Marek Behún wrote:
> Use the dedicated atomic_io_modify() instead of hardcoded
> spin_lock() + readl() + writel() + spin_unlock() sequence.
> 
> This allows us to drop the irq_controller_lock spinlock from the driver.
> 
> Signed-off-by: Marek Behún <kabel at kernel.org>
> ---
> Note: the atomic_io_modify() function is defined only for arm platform,
> and it is currently used only in 3 drivers:
> 
>   drivers/clocksource/timer-armada-370-xp.c
>   drivers/clocksource/timer-orion.c
>   drivers/watchdog/orion_wdt.c
> 
> Do we want to use this? Is there some other standardized alternative
> that can be used across all platforms?

I took a quick look at the code. I don't see anything architecture
specific in there. It could be moved somewhere more general.

Maybe ask Arnd, he tends to have a good overview for this sort of
thing.

The patch itself looks fine.

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the linux-arm-kernel mailing list