[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250908163127.2462948-12-maz@kernel.org>
Date: Mon, 8 Sep 2025 17:31:13 +0100
From: Marc Zyngier <maz@...nel.org>
To: linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-acpi@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Rob Herring <robh@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sven Peter <sven@...nel.org>,
Janne Grunau <j@...nau.net>,
Suzuki K Poulose <suzuki.poulose@....com>,
James Clark <james.clark@...aro.org>
Subject: [PATCH 11/25] genirq: Merge irqaction::{dev_id,percpu_dev_id}
When irqaction::percpu_dev_id was introduced, it was hoped that it
could be part of an anonymous union with dev_id, as the two fields
are mutually exclusive.
However, toolchains used at the time were often showing terrible
support for anonymous unions, breaking the build on a number of
architectures. It was therefore decided to keep the two fields separate
and address this down the line.
14 years later, the compiler dark age is over, and there is universal
support for anonymous unions. Let's get a whole pointer back that can
immediately be spent on something else.
Signed-off-by: Marc Zyngier <maz@...nel.org>
---
include/linux/interrupt.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 51b6484c04934..0ec1a71ab4e84 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -121,8 +121,10 @@ typedef irqreturn_t (*irq_handler_t)(int, void *);
*/
struct irqaction {
irq_handler_t handler;
- void *dev_id;
- void __percpu *percpu_dev_id;
+ union {
+ void *dev_id;
+ void __percpu *percpu_dev_id;
+ };
struct irqaction *next;
irq_handler_t thread_fn;
struct task_struct *thread;
--
2.39.2
Powered by blists - more mailing lists