]> asedeno.scripts.mit.edu Git - linux.git/commit
genirq/debugfs: Triggering of interrupts from userspace
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 18 Aug 2017 08:11:56 +0000 (09:11 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 18 Aug 2017 08:36:24 +0000 (10:36 +0200)
commit536e2e34bd002267384b0668ffff3f023003a830
tree4c5311acc59863a845a7c88702082c48ed8db636
parent7cb2fad97ee057c7b0cb5913074eee8071490a71
genirq/debugfs: Triggering of interrupts from userspace

When developing new (and therefore buggy) interrupt related
code, it can sometimes be useful to inject interrupts without
having to rely on a device to actually generate them.

This functionnality relies either on the irqchip driver to
expose a irq_set_irqchip_state(IRQCHIP_STATE_PENDING) callback,
or on the core code to be able to retrigger a (edge-only)
interrupt.

To use this feature:

echo -n trigger > /sys/kernel/debug/irq/irqs/IRQNUM

WARNING: This is DANGEROUS, and strictly a debug feature.
Do not use it on a production system. Your HW is likely to
catch fire, your data to be corrupted, and reporting this will
make you look an even bigger fool than the idiot who wrote
this patch.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170818081156.9264-1-marc.zyngier@arm.com
kernel/irq/debugfs.c