forked from mirrors/linux
		
	 caab277b1d
			
		
	
	
		caab277b1d
		
	
	
	
	
		
			
			Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 503 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Enrico Weigelt <info@metux.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
		
			
				
	
	
		
			41 lines
		
	
	
	
		
			931 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
	
		
			931 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /* SPDX-License-Identifier: GPL-2.0-only */
 | |
| /*
 | |
|  * Chained IRQ handlers support.
 | |
|  *
 | |
|  * Copyright (C) 2011 ARM Ltd.
 | |
|  */
 | |
| #ifndef __IRQCHIP_CHAINED_IRQ_H
 | |
| #define __IRQCHIP_CHAINED_IRQ_H
 | |
| 
 | |
| #include <linux/irq.h>
 | |
| 
 | |
| /*
 | |
|  * Entry/exit functions for chained handlers where the primary IRQ chip
 | |
|  * may implement either fasteoi or level-trigger flow control.
 | |
|  */
 | |
| static inline void chained_irq_enter(struct irq_chip *chip,
 | |
| 				     struct irq_desc *desc)
 | |
| {
 | |
| 	/* FastEOI controllers require no action on entry. */
 | |
| 	if (chip->irq_eoi)
 | |
| 		return;
 | |
| 
 | |
| 	if (chip->irq_mask_ack) {
 | |
| 		chip->irq_mask_ack(&desc->irq_data);
 | |
| 	} else {
 | |
| 		chip->irq_mask(&desc->irq_data);
 | |
| 		if (chip->irq_ack)
 | |
| 			chip->irq_ack(&desc->irq_data);
 | |
| 	}
 | |
| }
 | |
| 
 | |
| static inline void chained_irq_exit(struct irq_chip *chip,
 | |
| 				    struct irq_desc *desc)
 | |
| {
 | |
| 	if (chip->irq_eoi)
 | |
| 		chip->irq_eoi(&desc->irq_data);
 | |
| 	else
 | |
| 		chip->irq_unmask(&desc->irq_data);
 | |
| }
 | |
| 
 | |
| #endif /* __IRQCHIP_CHAINED_IRQ_H */
 |