Skip to content

Commit

Permalink
sched/cputime: Remove generic asm headers
Browse files Browse the repository at this point in the history
cputime_t is now only used by two architectures:

	* powerpc (when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y)
	* s390

And since the core doesn't use it anymore, we don't need any arch support
from the others. So we can remove their stub implementations.

A final cleanup would be to provide an efficient pure arch
implementation of cputime_to_nsec() for s390 and powerpc and finally
remove include/linux/cputime.h .

Signed-off-by: Frederic Weisbecker <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Wanpeng Li <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
fweisbec authored and Ingo Molnar committed Feb 1, 2017
1 parent 934ad47 commit b672592
Show file tree
Hide file tree
Showing 32 changed files with 4 additions and 41 deletions.
1 change: 0 additions & 1 deletion arch/alpha/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


generic-y += clkdev.h
generic-y += cputime.h
generic-y += exec.h
generic-y += export.h
generic-y += irq_work.h
Expand Down
1 change: 0 additions & 1 deletion arch/arc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
Expand Down
1 change: 0 additions & 1 deletion arch/arm/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += early_ioremap.h
generic-y += emergency-restart.h
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += delay.h
generic-y += div64.h
generic-y += dma.h
Expand Down
1 change: 0 additions & 1 deletion arch/avr32/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

generic-y += clkdev.h
generic-y += cputime.h
generic-y += delay.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/blackfin/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/c6x/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ generic-y += barrier.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/cris/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ generic-y += barrier.h
generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cmpxchg.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
generic-y += errno.h
Expand Down
1 change: 0 additions & 1 deletion arch/frv/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

generic-y += clkdev.h
generic-y += cputime.h
generic-y += exec.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
Expand Down
1 change: 0 additions & 1 deletion arch/h8300/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ generic-y += bugs.h
generic-y += cacheflush.h
generic-y += checksum.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += delay.h
generic-y += device.h
Expand Down
1 change: 0 additions & 1 deletion arch/hexagon/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ generic-y += barrier.h
generic-y += bug.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
4 changes: 1 addition & 3 deletions arch/ia64/include/asm/cputime.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#ifndef __IA64_CPUTIME_H
#define __IA64_CPUTIME_H

#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
# include <asm-generic/cputime.h>
#else
#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
extern void arch_vtime_task_switch(struct task_struct *tsk);
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */

Expand Down
1 change: 0 additions & 1 deletion arch/m32r/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

generic-y += clkdev.h
generic-y += cputime.h
generic-y += exec.h
generic-y += irq_work.h
generic-y += kvm_para.h
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
generic-y += barrier.h
generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += emergency-restart.h
generic-y += errno.h
Expand Down
1 change: 0 additions & 1 deletion arch/metag/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += dma.h
Expand Down
1 change: 0 additions & 1 deletion arch/microblaze/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

generic-y += barrier.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += exec.h
generic-y += irq_work.h
Expand Down
1 change: 0 additions & 1 deletion arch/mips/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# MIPS headers
generic-(CONFIG_GENERIC_CSUM) += checksum.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += dma-contiguous.h
generic-y += emergency-restart.h
Expand Down
1 change: 0 additions & 1 deletion arch/mn10300/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

generic-y += barrier.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += exec.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
Expand Down
1 change: 0 additions & 1 deletion arch/nios2/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ generic-y += bitsperlong.h
generic-y += bug.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/openrisc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ generic-y += checksum.h
generic-y += clkdev.h
generic-y += cmpxchg-local.h
generic-y += cmpxchg.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
generic-y += auxvec.h
generic-y += barrier.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += device.h
generic-y += div64.h
generic-y += emergency-restart.h
Expand Down
4 changes: 1 addition & 3 deletions arch/powerpc/include/asm/cputime.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#ifndef __POWERPC_CPUTIME_H
#define __POWERPC_CPUTIME_H

#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
#include <asm-generic/cputime.h>
#else
#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE

#include <linux/types.h>
#include <linux/time.h>
Expand Down
1 change: 0 additions & 1 deletion arch/score/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ header-y +=

generic-y += barrier.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += irq_work.h
generic-y += mcs_spinlock.h
generic-y += mm-arch-hooks.h
Expand Down
1 change: 0 additions & 1 deletion arch/sh/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += delay.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


generic-y += clkdev.h
generic-y += cputime.h
generic-y += div64.h
generic-y += emergency-restart.h
generic-y += exec.h
Expand Down
1 change: 0 additions & 1 deletion arch/tile/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ header-y += ../arch/
generic-y += bug.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += div64.h
generic-y += emergency-restart.h
generic-y += errno.h
Expand Down
1 change: 0 additions & 1 deletion arch/um/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
generic-y += barrier.h
generic-y += bug.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += delay.h
generic-y += device.h
Expand Down
1 change: 0 additions & 1 deletion arch/unicore32/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ generic-y += auxvec.h
generic-y += bitsperlong.h
generic-y += bugs.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += current.h
generic-y += device.h
generic-y += div64.h
Expand Down
1 change: 0 additions & 1 deletion arch/x86/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ generated-y += unistd_64_x32.h
generated-y += xen-hypercalls.h

generic-y += clkdev.h
generic-y += cputime.h
generic-y += dma-contiguous.h
generic-y += early_ioremap.h
generic-y += mcs_spinlock.h
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
generic-y += bitsperlong.h
generic-y += bug.h
generic-y += clkdev.h
generic-y += cputime.h
generic-y += div64.h
generic-y += dma-contiguous.h
generic-y += emergency-restart.h
Expand Down
7 changes: 0 additions & 7 deletions include/asm-generic/cputime.h

This file was deleted.

2 changes: 2 additions & 0 deletions include/linux/cputime.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#ifndef __LINUX_CPUTIME_H
#define __LINUX_CPUTIME_H

#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
#include <asm/cputime.h>

#ifndef cputime_to_nsecs
# define cputime_to_nsecs(__ct) \
(cputime_to_usecs(__ct) * NSEC_PER_USEC)
#endif

#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
#endif /* __LINUX_CPUTIME_H */

0 comments on commit b672592

Please sign in to comment.