sched/vtime: Consolidate IRQ time accounting
authorFrederic Weisbecker <frederic@kernel.org>
Wed, 2 Dec 2020 11:57:30 +0000 (12:57 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 2 Dec 2020 19:20:05 +0000 (20:20 +0100)
commit8a6a5920d3286eb0eae9f36a4ec4fc9df511eccb
treef4ac64d3a1a6b8d3fe72162d7f88596afacb638f
parent2b91ec9f551b56751cde48792f1c0a1130358844
sched/vtime: Consolidate IRQ time accounting

The 3 architectures implementing CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
all have their own version of irq time accounting that dispatch the
cputime to the appropriate index: hardirq, softirq, system, idle,
guest... from an all-in-one function.

Instead of having these ad-hoc versions, move the cputime destination
dispatch decision to the core code and leave only the actual per-index
cputime accounting to the architecture.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201202115732.27827-4-frederic@kernel.org
arch/ia64/kernel/time.c
arch/powerpc/kernel/time.c
arch/s390/kernel/vtime.c
include/linux/vtime.h
kernel/sched/cputime.c