mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
irq: clean up irq stat methods
David Miller suggested, related to a kstat_irqs related build breakage: > Either linux/kernel_stat.h provides the kstat_incr_irqs_this_cpu > interface or linux/irq.h does, not both. So move them to kernel_stat.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
e81838d255
commit
d52a61c04c
2 changed files with 6 additions and 9 deletions
|
@ -202,12 +202,6 @@ extern struct irq_desc irq_desc[NR_IRQS];
|
||||||
extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
|
extern struct irq_desc *move_irq_desc(struct irq_desc *old_desc, int cpu);
|
||||||
#endif /* CONFIG_SPARSE_IRQ */
|
#endif /* CONFIG_SPARSE_IRQ */
|
||||||
|
|
||||||
#define kstat_irqs_this_cpu(DESC) \
|
|
||||||
((DESC)->kstat_irqs[smp_processor_id()])
|
|
||||||
#define kstat_incr_irqs_this_cpu(irqno, DESC) \
|
|
||||||
((DESC)->kstat_irqs[smp_processor_id()]++)
|
|
||||||
|
|
||||||
|
|
||||||
extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
|
extern struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu);
|
||||||
|
|
||||||
static inline struct irq_desc *
|
static inline struct irq_desc *
|
||||||
|
|
|
@ -52,16 +52,19 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
|
||||||
{
|
{
|
||||||
kstat_this_cpu.irqs[irq]++;
|
kstat_this_cpu.irqs[irq]++;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
|
||||||
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
|
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
|
||||||
{
|
{
|
||||||
return kstat_cpu(cpu).irqs[irq];
|
return kstat_cpu(cpu).irqs[irq];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
#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);
|
||||||
|
#define kstat_irqs_this_cpu(DESC) \
|
||||||
|
((DESC)->kstat_irqs[smp_processor_id()])
|
||||||
|
#define kstat_incr_irqs_this_cpu(irqno, DESC) \
|
||||||
|
((DESC)->kstat_irqs[smp_processor_id()]++)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue