mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	genirq: Move kstat_incr_irqs_this_cpu() to core
No more users outside the core code. Put it into the poison cabinet. That also gets rid of the linux/irq.h include in kernel_stat.h Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20140223212739.124207133@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
		
							parent
							
								
									1aec169673
								
							
						
					
					
						commit
						8f945a3325
					
				
					 2 changed files with 7 additions and 8 deletions
				
			
		| 
						 | 
					@ -51,15 +51,7 @@ DECLARE_PER_CPU(struct kernel_cpustat, kernel_cpustat);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern unsigned long long nr_context_switches(void);
 | 
					extern unsigned long long nr_context_switches(void);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <linux/irq.h>
 | 
					 | 
				
			||||||
extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
 | 
					extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
 | 
				
			||||||
 | 
					 | 
				
			||||||
static inline void kstat_incr_irqs_this_cpu(unsigned int irq, struct irq_desc *desc)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	__this_cpu_inc(*desc->kstat_irqs);
 | 
					 | 
				
			||||||
	__this_cpu_inc(kstat.irqs_sum);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
extern void kstat_incr_irq_this_cpu(unsigned int irq);
 | 
					extern void kstat_incr_irq_this_cpu(unsigned int irq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void kstat_incr_softirqs_this_cpu(unsigned int irq)
 | 
					static inline void kstat_incr_softirqs_this_cpu(unsigned int irq)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@
 | 
				
			||||||
 * of this file for your non core code.
 | 
					 * of this file for your non core code.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include <linux/irqdesc.h>
 | 
					#include <linux/irqdesc.h>
 | 
				
			||||||
 | 
					#include <linux/kernel_stat.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_SPARSE_IRQ
 | 
					#ifdef CONFIG_SPARSE_IRQ
 | 
				
			||||||
# define IRQ_BITMAP_BITS	(NR_IRQS + 8196)
 | 
					# define IRQ_BITMAP_BITS	(NR_IRQS + 8196)
 | 
				
			||||||
| 
						 | 
					@ -180,3 +181,9 @@ static inline bool irqd_has_set(struct irq_data *d, unsigned int mask)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	return d->state_use_accessors & mask;
 | 
						return d->state_use_accessors & mask;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void kstat_incr_irqs_this_cpu(unsigned int irq, struct irq_desc *desc)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						__this_cpu_inc(*desc->kstat_irqs);
 | 
				
			||||||
 | 
						__this_cpu_inc(kstat.irqs_sum);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue