mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
sparseirq: make some func to be used with genirq
Impact: clean up sparseirq fallout on random.c Ingo suggested to change some ifdef from SPARSE_IRQ to GENERIC_HARDIRQS so we could some #ifdef later if all arch support genirq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
e8b722f487
commit
d7e51e6689
5 changed files with 11 additions and 12 deletions
|
@ -28,7 +28,7 @@ struct cpu_usage_stat {
|
|||
|
||||
struct kernel_stat {
|
||||
struct cpu_usage_stat cpustat;
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
unsigned int irqs[NR_IRQS];
|
||||
#endif
|
||||
};
|
||||
|
@ -41,7 +41,7 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
|
|||
|
||||
extern unsigned long long nr_context_switches(void);
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
#define kstat_irqs_this_cpu(irq) \
|
||||
(kstat_this_cpu.irqs[irq])
|
||||
|
||||
|
@ -55,7 +55,7 @@ static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
|
|||
#endif
|
||||
|
||||
|
||||
#ifndef CONFIG_SPARSE_IRQ
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
|
||||
{
|
||||
return kstat_cpu(cpu).irqs[irq];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue