Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
65 lines
1.3 KiB
C
65 lines
1.3 KiB
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
|
|
* Copyright (C) 2005-2006, Thomas Gleixner, Russell King
|
|
*
|
|
* This file contains the dummy interrupt chip implementation
|
|
*/
|
|
#include <linux/interrupt.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/export.h>
|
|
|
|
#include "internals.h"
|
|
|
|
/*
|
|
* What should we do if we get a hw irq event on an illegal vector?
|
|
* Each architecture has to answer this themselves.
|
|
*/
|
|
static void ack_bad(struct irq_data *data)
|
|
{
|
|
struct irq_desc *desc = irq_data_to_desc(data);
|
|
|
|
print_irq_desc(data->irq, desc);
|
|
ack_bad_irq(data->irq);
|
|
}
|
|
|
|
/*
|
|
* NOP functions
|
|
*/
|
|
static void noop(struct irq_data *data) { }
|
|
|
|
static unsigned int noop_ret(struct irq_data *data)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* Generic no controller implementation
|
|
*/
|
|
struct irq_chip no_irq_chip = {
|
|
.name = "none",
|
|
.irq_startup = noop_ret,
|
|
.irq_shutdown = noop,
|
|
.irq_enable = noop,
|
|
.irq_disable = noop,
|
|
.irq_ack = ack_bad,
|
|
.flags = IRQCHIP_SKIP_SET_WAKE,
|
|
};
|
|
|
|
/*
|
|
* Generic dummy implementation which can be used for
|
|
* real dumb interrupt sources
|
|
*/
|
|
struct irq_chip dummy_irq_chip = {
|
|
.name = "dummy",
|
|
.irq_startup = noop_ret,
|
|
.irq_shutdown = noop,
|
|
.irq_enable = noop,
|
|
.irq_disable = noop,
|
|
.irq_ack = noop,
|
|
.irq_mask = noop,
|
|
.irq_unmask = noop,
|
|
.flags = IRQCHIP_SKIP_SET_WAKE,
|
|
};
|
|
EXPORT_SYMBOL_GPL(dummy_irq_chip);
|