提交 d17a55de 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

irq: make irqs in kernel stat use per_cpu_dyn_array

Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 fa42d10d
......@@ -28,7 +28,11 @@ struct cpu_usage_stat {
struct kernel_stat {
struct cpu_usage_stat cpustat;
#ifdef CONFIG_HAVE_DYN_ARRAY
unsigned int *irqs;
#else
unsigned int irqs[NR_IRQS];
#endif
};
DECLARE_PER_CPU(struct kernel_stat, kstat);
......
......@@ -4048,9 +4048,12 @@ static inline void idle_balance(int cpu, struct rq *rq)
#endif
DEFINE_PER_CPU(struct kernel_stat, kstat);
EXPORT_PER_CPU_SYMBOL(kstat);
#ifdef CONFIG_HAVE_DYN_ARRAY
DEFINE_PER_CPU_DYN_ARRAY_ADDR(per_cpu__kstat_irqs, per_cpu__kstat.irqs, sizeof(unsigned int), nr_irqs, sizeof(unsigned long), NULL);
#endif
/*
* Return p->sum_exec_runtime plus any more ns on the sched_clock
* that have not yet been banked in case the task is currently running.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册