| 
									
										
										
										
											2010-09-27 12:45:59 +00:00
										 |  |  | menu "IRQ subsystem" | 
					
						
							|  |  |  | # Options selectable by the architecture code | 
					
						
							| 
									
										
										
										
											2011-03-08 19:52:55 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Make sparse irq Kconfig switch below available | 
					
						
							| 
									
										
										
										
											2012-01-25 20:02:40 -06: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 19:52:55 +01: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 19:52:55 +01:00
										 |  |  | # Use the generic /proc/interrupts implementation | 
					
						
							| 
									
										
										
										
											2010-12-16 17:21:47 +01:00
										 |  |  | config GENERIC_IRQ_SHOW | 
					
						
							| 
									
										
										
										
											2011-02-17 13:39:05 +00:00
										 |  |  |        bool | 
					
						
							| 
									
										
										
										
											2010-12-16 17:21:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-25 16:48:50 +01:00
										 |  |  | # Print level/edge extra information | 
					
						
							|  |  |  | config GENERIC_IRQ_SHOW_LEVEL | 
					
						
							|  |  |  |        bool | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-07 15:44:05 +00:00
										 |  |  | # Facility to allocate a hardware interrupt. This is legacy support | 
					
						
							|  |  |  | # and should not be used in new code. Use irq domains instead. | 
					
						
							|  |  |  | config GENERIC_IRQ_LEGACY_ALLOC_HWIRQ | 
					
						
							|  |  |  |        bool | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-08 19:52:55 +01: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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-08 19:52:55 +01: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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-08 19:52:55 +01: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-08 19:52:55 +01:00
										 |  |  | # Preflow handler support for fasteoi (sparc64) | 
					
						
							| 
									
										
										
										
											2011-02-10 15:14:20 +01:00
										 |  |  | config IRQ_PREFLOW_FASTEOI | 
					
						
							| 
									
										
										
										
											2011-02-17 13:39:05 +00:00
										 |  |  |        bool | 
					
						
							| 
									
										
										
										
											2011-02-10 15:14:20 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-28 16:13:24 +02:00
										 |  |  | # Edge style eoi based handler (cell) | 
					
						
							|  |  |  | config IRQ_EDGE_EOI_HANDLER | 
					
						
							|  |  |  |        bool | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-02 18:16:22 +02:00
										 |  |  | # Generic configurable interrupt chip implementation | 
					
						
							|  |  |  | config GENERIC_IRQ_CHIP | 
					
						
							|  |  |  |        bool | 
					
						
							| 
									
										
										
										
											2014-01-30 16:50:10 -08:00
										 |  |  |        select IRQ_DOMAIN | 
					
						
							| 
									
										
										
										
											2011-05-02 18:16:22 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-07-26 03:19:06 -06:00
										 |  |  | # Generic irq_domain hw <--> linux irq number translation | 
					
						
							|  |  |  | config IRQ_DOMAIN | 
					
						
							|  |  |  | 	bool | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-06 22:20:14 +08:00
										 |  |  | # Support for hierarchical irq domains | 
					
						
							|  |  |  | config IRQ_DOMAIN_HIERARCHY | 
					
						
							|  |  |  | 	bool | 
					
						
							|  |  |  | 	select IRQ_DOMAIN | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-12 11:39:03 +01: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 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												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 11:03:16 +01:00
										 |  |  | config HANDLE_DOMAIN_IRQ | 
					
						
							|  |  |  | 	bool | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-29 14:10:30 -06:00
										 |  |  | config IRQ_DOMAIN_DEBUG | 
					
						
							|  |  |  | 	bool "Expose hardware/virtual IRQ mapping via debugfs" | 
					
						
							|  |  |  | 	depends on IRQ_DOMAIN && DEBUG_FS | 
					
						
							|  |  |  | 	help | 
					
						
							|  |  |  | 	  This option will show the mapping relationship between hardware irq | 
					
						
							|  |  |  | 	  numbers and Linux irq numbers. The mapping is exposed via debugfs | 
					
						
							| 
									
										
										
										
											2012-04-10 15:25:42 +03:00
										 |  |  | 	  in the file "irq_domain_mapping". | 
					
						
							| 
									
										
										
										
											2012-03-29 14:10:30 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	  If you don't know what this means you don't need it. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-03-08 19:52:55 +01: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-25 20:02:40 -06:00
										 |  |  | 	bool "Support sparse irq numbering" if MAY_HAVE_SPARSE_IRQ | 
					
						
							| 
									
										
										
										
											2010-09-27 12:45:59 +00:00
										 |  |  | 	---help--- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	  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. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | endmenu |