mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
sparseirq: move kstat_irqs from kstat to irq_desc - fix
fix non-sparseirq architectures. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
e492c5ae85
commit
8c464a4b23
4 changed files with 40 additions and 5 deletions
|
@ -28,7 +28,7 @@ struct cpu_usage_stat {
|
|||
|
||||
struct kernel_stat {
|
||||
struct cpu_usage_stat cpustat;
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
unsigned int irqs[NR_IRQS];
|
||||
#endif
|
||||
};
|
||||
|
@ -41,7 +41,13 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
|
|||
|
||||
extern unsigned long long nr_context_switches(void);
|
||||
|
||||
#ifndef CONFIG_GENERIC_HARDIRQS
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
#define kstat_irqs_this_cpu(irq) \
|
||||
(kstat_this_cpu.irqs[irq])
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
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