2019-05-19 12:07:45 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2010-09-27 12:45:59 +00:00
|
|
|
menu "IRQ subsystem"
|
|
|
|
# Options selectable by the architecture code
|
2011-03-08 18:52:55 +00:00
|
|
|
|
|
|
|
# Make sparse irq Kconfig switch below available
|
2012-01-26 02:02:40 +00:00
|
|
|
config MAY_HAVE_SPARSE_IRQ
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-09-27 12:45:59 +00:00
|
|
|
|
2014-05-07 15:44:22 +00:00
|
|
|
# Legacy support, required for itanic
|
|
|
|
config GENERIC_IRQ_LEGACY
|
|
|
|
bool
|
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Enable the generic irq autoprobe mechanism
|
2010-09-27 12:45:59 +00:00
|
|
|
config GENERIC_IRQ_PROBE
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-09-27 12:45:59 +00:00
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Use the generic /proc/interrupts implementation
|
2010-12-16 16:21:47 +00:00
|
|
|
config GENERIC_IRQ_SHOW
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-12-16 16:21:47 +00:00
|
|
|
|
2011-03-25 15:48:50 +00:00
|
|
|
# Print level/edge extra information
|
|
|
|
config GENERIC_IRQ_SHOW_LEVEL
|
|
|
|
bool
|
|
|
|
|
2017-06-19 23:37:38 +00:00
|
|
|
# Supports effective affinity mask
|
|
|
|
config GENERIC_IRQ_EFFECTIVE_AFF_MASK
|
|
|
|
bool
|
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Support for delayed migration from interrupt context
|
2010-09-27 12:45:59 +00:00
|
|
|
config GENERIC_PENDING_IRQ
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-09-27 12:45:59 +00:00
|
|
|
|
2015-09-24 09:32:13 +00:00
|
|
|
# Support for generic irq migrating off cpu before the cpu is offline.
|
|
|
|
config GENERIC_IRQ_MIGRATION
|
|
|
|
bool
|
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Alpha specific irq affinity mechanism
|
2010-09-27 12:45:59 +00:00
|
|
|
config AUTO_IRQ_AFFINITY
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-09-27 12:45:59 +00:00
|
|
|
|
2020-03-06 13:03:47 +00:00
|
|
|
# Interrupt injection mechanism
|
|
|
|
config GENERIC_IRQ_INJECTION
|
|
|
|
bool
|
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Tasklet based software resend for pending interrupts on enable_irq()
|
2010-09-27 12:45:59 +00:00
|
|
|
config HARDIRQS_SW_RESEND
|
2011-02-17 13:39:05 +00:00
|
|
|
bool
|
2010-09-27 12:45:59 +00:00
|
|
|
|
2011-03-28 14:13:24 +00:00
|
|
|
# Edge style eoi based handler (cell)
|
|
|
|
config IRQ_EDGE_EOI_HANDLER
|
|
|
|
bool
|
|
|
|
|
2011-05-02 16:16:22 +00:00
|
|
|
# Generic configurable interrupt chip implementation
|
|
|
|
config GENERIC_IRQ_CHIP
|
|
|
|
bool
|
2014-01-31 00:50:10 +00:00
|
|
|
select IRQ_DOMAIN
|
2011-05-02 16:16:22 +00:00
|
|
|
|
2011-07-26 09:19:06 +00:00
|
|
|
# Generic irq_domain hw <--> linux irq number translation
|
|
|
|
config IRQ_DOMAIN
|
|
|
|
bool
|
|
|
|
|
2017-08-14 14:53:16 +00:00
|
|
|
# Support for simulated interrupts
|
|
|
|
config IRQ_SIM
|
|
|
|
bool
|
|
|
|
select IRQ_WORK
|
2020-05-14 08:39:01 +00:00
|
|
|
select IRQ_DOMAIN
|
2017-08-14 14:53:16 +00:00
|
|
|
|
2014-11-06 14:20:14 +00:00
|
|
|
# Support for hierarchical irq domains
|
|
|
|
config IRQ_DOMAIN_HIERARCHY
|
|
|
|
bool
|
|
|
|
select IRQ_DOMAIN
|
|
|
|
|
2021-04-04 12:06:39 +00:00
|
|
|
# Support for obsolete non-mapping irq domains
|
|
|
|
config IRQ_DOMAIN_NOMAP
|
|
|
|
bool
|
|
|
|
select IRQ_DOMAIN
|
|
|
|
|
2017-08-18 00:53:31 +00:00
|
|
|
# Support for hierarchical fasteoi+edge and fasteoi+level handlers
|
|
|
|
config IRQ_FASTEOI_HIERARCHY_HANDLERS
|
|
|
|
bool
|
|
|
|
|
2015-12-08 13:20:14 +00:00
|
|
|
# Generic IRQ IPI support
|
|
|
|
config GENERIC_IRQ_IPI
|
|
|
|
bool
|
2020-10-15 20:41:44 +00:00
|
|
|
select IRQ_DOMAIN_HIERARCHY
|
2015-12-08 13:20:14 +00:00
|
|
|
|
2014-11-12 10:39:03 +00:00
|
|
|
# Generic MSI interrupt support
|
|
|
|
config GENERIC_MSI_IRQ
|
|
|
|
bool
|
|
|
|
|
|
|
|
# Generic MSI hierarchical interrupt domain support
|
|
|
|
config GENERIC_MSI_IRQ_DOMAIN
|
|
|
|
bool
|
|
|
|
select IRQ_DOMAIN_HIERARCHY
|
|
|
|
select GENERIC_MSI_IRQ
|
|
|
|
|
2019-05-01 13:58:18 +00:00
|
|
|
config IRQ_MSI_IOMMU
|
|
|
|
bool
|
|
|
|
|
genirq: Add irq_domain-aware core IRQ handler
Calling irq_find_mapping from outside a irq_{enter,exit} section is
unsafe and produces ugly messages if CONFIG_PROVE_RCU is enabled:
If coming from the idle state, the rcu_read_lock call in irq_find_mapping
will generate an unpleasant warning:
<quote>
===============================
[ INFO: suspicious RCU usage. ]
3.16.0-rc1+ #135 Not tainted
-------------------------------
include/linux/rcupdate.h:871 rcu_read_lock() used illegally while idle!
other info that might help us debug this:
RCU used illegally from idle CPU!
rcu_scheduler_active = 1, debug_locks = 0
RCU used illegally from extended quiescent state!
1 lock held by swapper/0/0:
#0: (rcu_read_lock){......}, at: [<ffffffc00010206c>]
irq_find_mapping+0x4c/0x198
</quote>
As this issue is fairly widespread and involves at least three
different architectures, a possible solution is to add a new
handle_domain_irq entry point into the generic IRQ code that
the interrupt controller code can call.
This new function takes an irq_domain, and calls into irq_find_domain
inside the irq_{enter,exit} block. An additional "lookup" parameter is
used to allow non-domain architecture code to be replaced by this as well.
Interrupt controllers can then be updated to use the new mechanism.
This code is sitting behind a new CONFIG_HANDLE_DOMAIN_IRQ, as not all
architectures implement set_irq_regs (yes, mn10300, I'm looking at you...).
Reported-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1409047421-27649-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-08-26 10:03:16 +00:00
|
|
|
config HANDLE_DOMAIN_IRQ
|
|
|
|
bool
|
|
|
|
|
irq: add a (temporary) CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY
Going forward we want architecture/entry code to perform all the
necessary work to enter/exit IRQ context, with irqchip code merely
handling the mapping of the interrupt to any handler(s). Among other
reasons, this is necessary to consistently fix some longstanding issues
with the ordering of lockdep/RCU/tracing instrumentation which many
architectures get wrong today in their entry code.
Importantly, rcu_irq_{enter,exit}() must be called precisely once per
IRQ exception, so that rcu_is_cpu_rrupt_from_idle() can correctly
identify when an interrupt was taken from an idle context which must be
explicitly preempted. Currently handle_domain_irq() calls
rcu_irq_{enter,exit}() via irq_{enter,exit}(), but entry code needs to
be able to call rcu_irq_{enter,exit}() earlier for correct ordering
across lockdep/RCU/tracing updates for sequences such as:
lockdep_hardirqs_off(CALLER_ADDR0);
rcu_irq_enter();
trace_hardirqs_off_finish();
To permit each architecture to be converted to the new style in turn,
this patch adds a new CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY selected by all
current users of HANDLE_DOMAIN_IRQ, which gates the existing behaviour.
When CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY is not selected,
handle_domain_irq() requires entry code to perform the
irq_{enter,exit}() work, with an explicit check for this matching the
style of handle_domain_nmi().
Subsequent patches will:
1) Add the necessary IRQ entry accounting to each architecture in turn,
dropping CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY from that architecture's
Kconfig.
2) Remove CONFIG_HANDLE_DOMAIN_IRQ_IRQENTRY once it is no longer
selected.
3) Convert irqchip drivers to consistently use
generic_handle_domain_irq() rather than handle_domain_irq().
4) Remove handle_domain_irq() and CONFIG_HANDLE_DOMAIN_IRQ.
... which should leave us with a clear split of responsiblity across the
entry and irqchip code, making it possible to perform additional
cleanups and fixes for the aforementioned longstanding issues with entry
code.
There should be no functional change as a result of this patch.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
2021-10-19 10:12:31 +00:00
|
|
|
# Legacy behaviour; architectures should call irq_{enter,exit}() themselves
|
|
|
|
config HANDLE_DOMAIN_IRQ_IRQENTRY
|
|
|
|
bool
|
|
|
|
|
2017-06-23 14:11:07 +00:00
|
|
|
config IRQ_TIMINGS
|
|
|
|
bool
|
|
|
|
|
2017-09-13 21:29:14 +00:00
|
|
|
config GENERIC_IRQ_MATRIX_ALLOCATOR
|
|
|
|
bool
|
|
|
|
|
2017-10-17 07:54:57 +00:00
|
|
|
config GENERIC_IRQ_RESERVATION_MODE
|
|
|
|
bool
|
|
|
|
|
2011-03-08 18:52:55 +00:00
|
|
|
# Support forced irq threading
|
2011-02-23 23:52:23 +00:00
|
|
|
config IRQ_FORCED_THREADING
|
|
|
|
bool
|
|
|
|
|
2010-09-27 12:45:59 +00:00
|
|
|
config SPARSE_IRQ
|
2012-01-26 02:02:40 +00:00
|
|
|
bool "Support sparse irq numbering" if MAY_HAVE_SPARSE_IRQ
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2010-09-27 12:45:59 +00:00
|
|
|
|
|
|
|
Sparse irq numbering is useful for distro kernels that want
|
|
|
|
to define a high CONFIG_NR_CPUS value but still want to have
|
|
|
|
low kernel memory footprint on smaller machines.
|
|
|
|
|
|
|
|
( Sparse irqs can also be beneficial on NUMA boxes, as they spread
|
|
|
|
out the interrupt descriptors in a more NUMA-friendly way. )
|
|
|
|
|
|
|
|
If you don't know what to do here, say N.
|
|
|
|
|
2017-06-19 23:37:17 +00:00
|
|
|
config GENERIC_IRQ_DEBUGFS
|
|
|
|
bool "Expose irq internals in debugfs"
|
|
|
|
depends on DEBUG_FS
|
2020-03-06 13:03:47 +00:00
|
|
|
select GENERIC_IRQ_INJECTION
|
2017-06-19 23:37:17 +00:00
|
|
|
default n
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-06-19 23:37:17 +00:00
|
|
|
|
|
|
|
Exposes internal state information through debugfs. Mostly for
|
|
|
|
developers and debugging of hard to diagnose interrupt problems.
|
|
|
|
|
|
|
|
If you don't know what to do here, say N.
|
|
|
|
|
2010-09-27 12:45:59 +00:00
|
|
|
endmenu
|
2018-03-07 23:57:27 +00:00
|
|
|
|
|
|
|
config GENERIC_IRQ_MULTI_HANDLER
|
|
|
|
bool
|
|
|
|
help
|
|
|
|
Allow to specify the low level IRQ handler at run time.
|