Dr. David Alan Gilbert
aefc11550e
genirq: Remove unused remove_percpu_irq()
...
remove_percpu_irq() has been unused since it was added in 2011 by
commit 31d9d9b6d8 ("genirq: Add support for per-cpu dev_id interrupts")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Link: https://lore.kernel.org/all/20250420164656.112641-1-linux@treblig.org
2025-05-07 11:35:41 +02:00
Thomas Gleixner
104361217c
genirq: Remove irq_[get|put]_desc*()
...
All users are converted to the guards. Remove the helpers.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.729586582@linutronix.de
2025-05-07 09:08:17 +02:00
Thomas Gleixner
193879e28b
genirq/manage: Rework irq_set_irqchip_state()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.670808288@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
782249a997
genirq/manage: Rework irq_get_irqchip_state()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.612184618@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
5fec6d5cd2
genirq/manage: Rework teardown_percpu_nmi()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.552884529@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
65dd1f7ca9
genirq/manage: Rework prepare_percpu_nmi()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.494561120@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
8e3f672b19
genirq/manage: Rework disable_percpu_irq()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.435932527@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
b171f712d6
genirq/manage: Rework irq_percpu_is_enabled()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.376836282@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
508bd94c3a
genirq/manage: Rework enable_percpu_irq()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.315844964@linutronix.de
2025-05-07 09:08:16 +02:00
Thomas Gleixner
90140d08ac
genirq/manage: Rework irq_set_parent()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.258216558@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
a1ceb83141
genirq/manage: Rework can_request_irq()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Make the return value boolean to reflect it's meaning.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.187250840@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
8589e325ba
genirq/manage: Rework irq_set_irq_wake()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/87ldrhq0hc.ffs@tglx
2025-05-07 09:08:15 +02:00
Thomas Gleixner
bddd10c554
genirq/manage: Rework enable_irq()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.071157729@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
1b74444467
genirq/manage: Rework __disable_irq_nosync()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065422.013088277@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
55ac0ad22f
genirq/manage: Rework irq_set_vcpu_affinity()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/87ikmlq0fk.ffs@tglx
2025-05-07 09:08:15 +02:00
Thomas Gleixner
7e04e5c6f6
genirq/manage: Rework __irq_apply_affinity_hint()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.897188799@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
b0561582ea
genirq/manage: Rework irq_update_affinity_desc()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.830357569@linutronix.de
2025-05-07 09:08:15 +02:00
Thomas Gleixner
17c1953567
genirq/manage: Convert to lock guards
...
Convert lock/unlock pairs to guards.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.771476066@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
0c169edf36
genirq/manage: Cleanup kernel doc comments
...
Get rid of the extra tab to make it consistent.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.710273122@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
95a3645893
genirq/chip: Rework irq_modify_status()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.650454052@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
5cd05f3e23
genirq/chip: Rework irq_set_handler() variants
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.590753128@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
b3801ddc68
genirq/chip: Rework irq_set_chip_data()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.532308759@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
c836e5a70c
genirq/chip: Rework irq_set_msi_desc_off()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.473563978@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
321a0fdf13
genirq/chip: Rework irq_set_handler_data()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.415072350@linutronix.de
2025-05-07 09:08:14 +02:00
Thomas Gleixner
fa870e0f35
genirq/chip: Rework irq_set_irq_type()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.355673840@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
46ff4d11f0
genirq/chip: Rework irq_set_chip()
...
Use the new guards to get and lock the interrupt descriptor and tidy up the
code.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.295400891@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
e7c6542557
genirq/chip: Use lock guards where applicable
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.236248749@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
f71d7c45ed
genirq/chip: Rework handle_fasteoi_mask_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Note: The mask_irq() operation in the second condition was redundant as the
interrupt is already masked right at the beginning of the function.
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.175652864@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
2beb01cbb7
genirq/chip: Rework handle_fasteoi_ack_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.105015800@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
2d46aea52c
genirq/chip: Rework handle_edge_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065421.045492336@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
15d772e2ee
genirq/chip: Rework handle_eoi_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.986002418@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
2334c45521
genirq/chip: Rework handle_level_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.926362488@linutronix.de
2025-05-07 09:08:13 +02:00
Thomas Gleixner
a155777175
genirq/chip: Rework handle_untracked_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.865212916@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
1a3678675f
genirq/chip: Rework handle_simple_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.804683349@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
2ef2e13094
genirq/chip: Rework handle_nested_irq()
...
Use the new helpers to decide whether the interrupt should be handled and
switch the descriptor locking to guard().
Fixup the kernel doc comment while at it.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.744042890@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
a6d8d0d12e
genirq/chip: Prepare for code reduction
...
The interrupt flow handlers have similar patterns to decide whether to
handle an interrupt or not.
Provide common helper functions to allow removal of duplicated code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.682547546@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
ecb84a3e7e
genirq/debugfs: Convert to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.620200108@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
88a4df117a
genirq/cpuhotplug: Convert to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.560083665@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
113332a865
genirq/spurious: Switch to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.497714413@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
e815ffc759
genirq/spurious: Cleanup code
...
Clean up the coding style
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.437285102@linutronix.de
2025-05-07 09:08:12 +02:00
Thomas Gleixner
659ff9c9d7
genirq/proc: Switch to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.373998838@linutronix.de
2025-05-07 09:08:11 +02:00
Thomas Gleixner
4bcdf07467
genirq/resend: Switch to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.312487167@linutronix.de
2025-05-07 09:08:11 +02:00
Thomas Gleixner
19b4b14428
genirq/pm: Switch to lock guards
...
Convert all lock/unlock pairs to guards and tidy up the code.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.251299112@linutronix.de
2025-05-07 09:08:11 +02:00
Thomas Gleixner
e80618b27a
genirq/autoprobe: Switch to lock guards
...
Convert all lock/unlock pairs to guards.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.188866381@linutronix.de
2025-05-07 09:08:11 +02:00
Thomas Gleixner
5d964a9f7c
genirq/irqdesc: Switch to lock guards
...
Replace all lock/unlock pairs with lock guards and simplify the code flow.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Reviewed-by: Jiri Slaby <jirislaby@kernel.org >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/871ptaqhoo.ffs@tglx
2025-05-07 09:08:11 +02:00
Thomas Gleixner
0f70a49f3f
genirq: Provide conditional lock guards
...
The interrupt core code has an ever repeating pattern:
unsigned long flags;
struct irq_desc *desc = irq_get_desc_[bus]lock(irq, &flags, mode);
if (!desc)
return -EINVAL;
....
irq_put_desc_[bus]unlock(desc, flags);
That requires gotos in failure paths and just creates visual clutter.
Provide lock guards, which allow to simplify the code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Link: https://lore.kernel.org/all/20250429065420.061659985@linutronix.de
2025-05-07 09:08:11 +02:00
Andy Shevchenko
e5032ead85
genirq/irqdesc: Decrease indentation level in __irq_get_desc_lock()
...
There is a conditional that covers all the code for the entire function.
Invert it and decrease indentation level. This also helps for further
changes to be clearer and tidier.
[ tglx: Removed line breaks ]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Link: https://lore.kernel.org/all/20250416114122.2191820-2-andriy.shevchenko@linux.intel.com
2025-05-05 15:24:06 +02:00
Cheng-Yang Chou
0128816c42
genirq: Fix typo in IRQ_NOTCONNECTED comment
...
Fix a minor typo in the comment for IRQ_NOTCONNECTED:
"distingiush" is corrected to "distinguish".
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Link: https://lore.kernel.org/all/20250410105144.214849-1-yphbchou0911@gmail.com
2025-04-24 14:31:03 +02:00
Andy Shevchenko
41c95ac483
genirq/irqdesc: Use sysfs_emit() to instead of s*printf()
...
Follow the advice of the Documentation/filesystems/sysfs.rst that show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the value
to be returned to user space.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Link: https://lore.kernel.org/all/20250416101651.2128688-1-andriy.shevchenko@linux.intel.com
2025-04-16 14:25:41 +02:00
Yixun Lan
0a02e1f4a5
irqdomain: Support three-cell scheme interrupts
...
Add new function *_twothreecell() to extend support to parse three-cell
interrupts which encoded as <instance hwirq irqflag>, the translate
function will retrieve irq number and flag from last two cells.
This API will be used in gpio irq driver which need to work with
two or three cells cases.
Signed-off-by: Yixun Lan <dlan@gentoo.org >
Signed-off-by: Thomas Gleixner <tglx@linutronix.de >
Link: https://lore.kernel.org/all/20250326-04-gpio-irq-threecell-v3-1-aab006ab0e00@gentoo.org
2025-04-07 09:36:09 +02:00