diff options
36 files changed, 45 insertions, 38 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 49d993cee512..53d3a356f61f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -14,6 +14,7 @@ config ARM | |||
14 | select GENERIC_IRQ_PROBE | 14 | select GENERIC_IRQ_PROBE |
15 | select GENERIC_IRQ_SHOW | 15 | select GENERIC_IRQ_SHOW |
16 | select GENERIC_PCI_IOMAP | 16 | select GENERIC_PCI_IOMAP |
17 | select GENERIC_SCHED_CLOCK | ||
17 | select GENERIC_SMP_IDLE_THREAD | 18 | select GENERIC_SMP_IDLE_THREAD |
18 | select GENERIC_IDLE_POLL_SETUP | 19 | select GENERIC_IDLE_POLL_SETUP |
19 | select GENERIC_STRNCPY_FROM_USER | 20 | select GENERIC_STRNCPY_FROM_USER |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index ddc740769601..023ee63827a2 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -28,8 +28,8 @@ | |||
28 | #include <linux/of.h> | 28 | #include <linux/of.h> |
29 | #include <linux/of_address.h> | 29 | #include <linux/of_address.h> |
30 | #include <linux/of_irq.h> | 30 | #include <linux/of_irq.h> |
31 | #include <linux/sched_clock.h> | ||
31 | 32 | ||
32 | #include <asm/sched_clock.h> | ||
33 | #include <asm/hardware/arm_timer.h> | 33 | #include <asm/hardware/arm_timer.h> |
34 | #include <asm/hardware/timer-sp.h> | 34 | #include <asm/hardware/timer-sp.h> |
35 | 35 | ||
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 5f3338eacad2..97cb0576d07c 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -16,7 +16,7 @@ CFLAGS_REMOVE_return_address.o = -pg | |||
16 | # Object file lists. | 16 | # Object file lists. |
17 | 17 | ||
18 | obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ | 18 | obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ |
19 | process.o ptrace.o return_address.o sched_clock.o \ | 19 | process.o ptrace.o return_address.o \ |
20 | setup.o signal.o stacktrace.o sys_arm.o time.o traps.o | 20 | setup.o signal.o stacktrace.o sys_arm.o time.o traps.o |
21 | 21 | ||
22 | obj-$(CONFIG_ATAGS) += atags_parse.o | 22 | obj-$(CONFIG_ATAGS) += atags_parse.o |
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c index 59dcdced6e30..221f07b11ccb 100644 --- a/arch/arm/kernel/arch_timer.c +++ b/arch/arm/kernel/arch_timer.c | |||
@@ -11,9 +11,9 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/sched_clock.h> | ||
14 | 15 | ||
15 | #include <asm/delay.h> | 16 | #include <asm/delay.h> |
16 | #include <asm/sched_clock.h> | ||
17 | 17 | ||
18 | #include <clocksource/arm_arch_timer.h> | 18 | #include <clocksource/arm_arch_timer.h> |
19 | 19 | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index abff4e9aaee0..98aee3258398 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <linux/clocksource.h> | 25 | #include <linux/clocksource.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/sched_clock.h> | ||
27 | 28 | ||
28 | #include <asm/thread_info.h> | 29 | #include <asm/thread_info.h> |
29 | #include <asm/sched_clock.h> | ||
30 | #include <asm/stacktrace.h> | 30 | #include <asm/stacktrace.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
@@ -120,6 +120,4 @@ void __init time_init(void) | |||
120 | machine_desc->init_time(); | 120 | machine_desc->init_time(); |
121 | else | 121 | else |
122 | clocksource_of_init(); | 122 | clocksource_of_init(); |
123 | |||
124 | sched_clock_postinit(); | ||
125 | } | 123 | } |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index bad361ec1666..7a55b5c95971 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/sched_clock.h> | ||
21 | 22 | ||
22 | #include <asm/sched_clock.h> | ||
23 | #include <asm/mach/irq.h> | 23 | #include <asm/mach/irq.h> |
24 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
25 | 25 | ||
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index fea91313678b..cd46529e9eaa 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c | |||
@@ -26,8 +26,8 @@ | |||
26 | #include <linux/clockchips.h> | 26 | #include <linux/clockchips.h> |
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/sched_clock.h> | ||
29 | 30 | ||
30 | #include <asm/sched_clock.h> | ||
31 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | 32 | ||
33 | #include "common.h" | 33 | #include "common.h" |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index b23c8e4f28e8..aa4346227c41 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/stat.h> | 41 | #include <linux/stat.h> |
42 | #include <linux/sys_soc.h> | 42 | #include <linux/sys_soc.h> |
43 | #include <linux/termios.h> | 43 | #include <linux/termios.h> |
44 | #include <linux/sched_clock.h> | ||
44 | #include <video/vga.h> | 45 | #include <video/vga.h> |
45 | 46 | ||
46 | #include <mach/hardware.h> | 47 | #include <mach/hardware.h> |
@@ -49,7 +50,6 @@ | |||
49 | #include <asm/setup.h> | 50 | #include <asm/setup.h> |
50 | #include <asm/param.h> /* HZ */ | 51 | #include <asm/param.h> /* HZ */ |
51 | #include <asm/mach-types.h> | 52 | #include <asm/mach-types.h> |
52 | #include <asm/sched_clock.h> | ||
53 | 53 | ||
54 | #include <mach/lm.h> | 54 | #include <mach/lm.h> |
55 | #include <mach/irqs.h> | 55 | #include <mach/irqs.h> |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 6600cff6bd92..58307cff1f18 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/export.h> | 30 | #include <linux/export.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
33 | #include <linux/sched_clock.h> | ||
33 | 34 | ||
34 | #include <mach/udc.h> | 35 | #include <mach/udc.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
@@ -38,7 +39,6 @@ | |||
38 | #include <asm/pgtable.h> | 39 | #include <asm/pgtable.h> |
39 | #include <asm/page.h> | 40 | #include <asm/page.h> |
40 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
41 | #include <asm/sched_clock.h> | ||
42 | #include <asm/system_misc.h> | 42 | #include <asm/system_misc.h> |
43 | 43 | ||
44 | #include <asm/mach/map.h> | 44 | #include <asm/mach/map.h> |
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c index 86a18b3d252e..7ac41e83cfef 100644 --- a/arch/arm/mach-mmp/time.c +++ b/arch/arm/mach-mmp/time.c | |||
@@ -28,8 +28,8 @@ | |||
28 | #include <linux/of.h> | 28 | #include <linux/of.h> |
29 | #include <linux/of_address.h> | 29 | #include <linux/of_address.h> |
30 | #include <linux/of_irq.h> | 30 | #include <linux/of_irq.h> |
31 | #include <linux/sched_clock.h> | ||
31 | 32 | ||
32 | #include <asm/sched_clock.h> | ||
33 | #include <mach/addr-map.h> | 33 | #include <mach/addr-map.h> |
34 | #include <mach/regs-timers.h> | 34 | #include <mach/regs-timers.h> |
35 | #include <mach/regs-apbc.h> | 35 | #include <mach/regs-apbc.h> |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 284313f3e02c..b6418fd5fe0d 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <linux/of.h> | 23 | #include <linux/of.h> |
24 | #include <linux/of_address.h> | 24 | #include <linux/of_address.h> |
25 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
26 | #include <linux/sched_clock.h> | ||
26 | 27 | ||
27 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
28 | #include <asm/localtimer.h> | 29 | #include <asm/localtimer.h> |
29 | #include <asm/sched_clock.h> | ||
30 | 30 | ||
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 726ec23d29c7..80603d2fef77 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -43,9 +43,9 @@ | |||
43 | #include <linux/clocksource.h> | 43 | #include <linux/clocksource.h> |
44 | #include <linux/clockchips.h> | 44 | #include <linux/clockchips.h> |
45 | #include <linux/io.h> | 45 | #include <linux/io.h> |
46 | #include <linux/sched_clock.h> | ||
46 | 47 | ||
47 | #include <asm/irq.h> | 48 | #include <asm/irq.h> |
48 | #include <asm/sched_clock.h> | ||
49 | 49 | ||
50 | #include <mach/hardware.h> | 50 | #include <mach/hardware.h> |
51 | #include <asm/mach/irq.h> | 51 | #include <asm/mach/irq.h> |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index f8b23b8040d9..4c069b0cab21 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -41,10 +41,10 @@ | |||
41 | #include <linux/of_irq.h> | 41 | #include <linux/of_irq.h> |
42 | #include <linux/platform_device.h> | 42 | #include <linux/platform_device.h> |
43 | #include <linux/platform_data/dmtimer-omap.h> | 43 | #include <linux/platform_data/dmtimer-omap.h> |
44 | #include <linux/sched_clock.h> | ||
44 | 45 | ||
45 | #include <asm/mach/time.h> | 46 | #include <asm/mach/time.h> |
46 | #include <asm/smp_twd.h> | 47 | #include <asm/smp_twd.h> |
47 | #include <asm/sched_clock.h> | ||
48 | 48 | ||
49 | #include "omap_hwmod.h" | 49 | #include "omap_hwmod.h" |
50 | #include "omap_device.h" | 50 | #include "omap_device.h" |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 8f1ee92aea30..9aa852a8fab9 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -16,11 +16,11 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/clockchips.h> | 18 | #include <linux/clockchips.h> |
19 | #include <linux/sched_clock.h> | ||
19 | 20 | ||
20 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
21 | #include <asm/mach/irq.h> | 22 | #include <asm/mach/irq.h> |
22 | #include <asm/mach/time.h> | 23 | #include <asm/mach/time.h> |
23 | #include <asm/sched_clock.h> | ||
24 | #include <mach/regs-ost.h> | 24 | #include <mach/regs-ost.h> |
25 | #include <mach/irqs.h> | 25 | #include <mach/irqs.h> |
26 | 26 | ||
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index a59a13a665a6..713c86cd3d64 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -14,9 +14,9 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <linux/timex.h> | 15 | #include <linux/timex.h> |
16 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
17 | #include <linux/sched_clock.h> | ||
17 | 18 | ||
18 | #include <asm/mach/time.h> | 19 | #include <asm/mach/time.h> |
19 | #include <asm/sched_clock.h> | ||
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
22 | 22 | ||
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index d9e73209c9b8..af771b76fe1c 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c | |||
@@ -18,12 +18,12 @@ | |||
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/sched_clock.h> | ||
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
24 | 25 | ||
25 | /* Generic stuff */ | 26 | /* Generic stuff */ |
26 | #include <asm/sched_clock.h> | ||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
29 | 29 | ||
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c index 837a2d52e9db..29606bd75f3f 100644 --- a/arch/arm/plat-iop/time.c +++ b/arch/arm/plat-iop/time.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
23 | #include <linux/clockchips.h> | 23 | #include <linux/clockchips.h> |
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | #include <linux/sched_clock.h> | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
27 | #include <asm/sched_clock.h> | ||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | #include <asm/mach/time.h> | 30 | #include <asm/mach/time.h> |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 5b0b86bb34bb..d9bc98eb2a6b 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -18,9 +18,9 @@ | |||
18 | #include <linux/err.h> | 18 | #include <linux/err.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/clocksource.h> | 20 | #include <linux/clocksource.h> |
21 | #include <linux/sched_clock.h> | ||
21 | 22 | ||
22 | #include <asm/mach/time.h> | 23 | #include <asm/mach/time.h> |
23 | #include <asm/sched_clock.h> | ||
24 | 24 | ||
25 | #include <plat/counter-32k.h> | 25 | #include <plat/counter-32k.h> |
26 | 26 | ||
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 5d5ac0f05422..9d2b2ac74938 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <asm/sched_clock.h> | 19 | #include <linux/sched_clock.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * MBus bridge block registers. | 22 | * MBus bridge block registers. |
diff --git a/arch/arm/plat-samsung/samsung-time.c b/arch/arm/plat-samsung/samsung-time.c index f899cbc9b288..2957075ca836 100644 --- a/arch/arm/plat-samsung/samsung-time.c +++ b/arch/arm/plat-samsung/samsung-time.c | |||
@@ -15,12 +15,12 @@ | |||
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/clockchips.h> | 16 | #include <linux/clockchips.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/sched_clock.h> | ||
18 | 19 | ||
19 | #include <asm/smp_twd.h> | 20 | #include <asm/smp_twd.h> |
20 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
23 | #include <asm/sched_clock.h> | ||
24 | 24 | ||
25 | #include <mach/map.h> | 25 | #include <mach/map.h> |
26 | #include <plat/devs.h> | 26 | #include <plat/devs.h> |
diff --git a/arch/arm/plat-versatile/sched-clock.c b/arch/arm/plat-versatile/sched-clock.c index b33b74c87232..51b109e3b6c3 100644 --- a/arch/arm/plat-versatile/sched-clock.c +++ b/arch/arm/plat-versatile/sched-clock.c | |||
@@ -20,8 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sched_clock.h> | ||
23 | 24 | ||
24 | #include <asm/sched_clock.h> | ||
25 | #include <plat/sched_clock.h> | 25 | #include <plat/sched_clock.h> |
26 | 26 | ||
27 | static void __iomem *ctr; | 27 | static void __iomem *ctr; |
diff --git a/drivers/clocksource/bcm2835_timer.c b/drivers/clocksource/bcm2835_timer.c index 766611d29945..07ea7ce900dc 100644 --- a/drivers/clocksource/bcm2835_timer.c +++ b/drivers/clocksource/bcm2835_timer.c | |||
@@ -28,8 +28,8 @@ | |||
28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/string.h> | 30 | #include <linux/string.h> |
31 | #include <linux/sched_clock.h> | ||
31 | 32 | ||
32 | #include <asm/sched_clock.h> | ||
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | 34 | ||
35 | #define REG_CONTROL 0x00 | 35 | #define REG_CONTROL 0x00 |
diff --git a/drivers/clocksource/clksrc-dbx500-prcmu.c b/drivers/clocksource/clksrc-dbx500-prcmu.c index 54f3d119d99c..0a7fb2440e29 100644 --- a/drivers/clocksource/clksrc-dbx500-prcmu.c +++ b/drivers/clocksource/clksrc-dbx500-prcmu.c | |||
@@ -14,8 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/clockchips.h> | 15 | #include <linux/clockchips.h> |
16 | #include <linux/clksrc-dbx500-prcmu.h> | 16 | #include <linux/clksrc-dbx500-prcmu.h> |
17 | 17 | #include <linux/sched_clock.h> | |
18 | #include <asm/sched_clock.h> | ||
19 | 18 | ||
20 | #define RATE_32K 32768 | 19 | #define RATE_32K 32768 |
21 | 20 | ||
diff --git a/drivers/clocksource/dw_apb_timer_of.c b/drivers/clocksource/dw_apb_timer_of.c index af13b8559b61..a97b4065dacf 100644 --- a/drivers/clocksource/dw_apb_timer_of.c +++ b/drivers/clocksource/dw_apb_timer_of.c | |||
@@ -20,8 +20,7 @@ | |||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/of_address.h> | 21 | #include <linux/of_address.h> |
22 | #include <linux/of_irq.h> | 22 | #include <linux/of_irq.h> |
23 | 23 | #include <linux/sched_clock.h> | |
24 | #include <asm/sched_clock.h> | ||
25 | 24 | ||
26 | static void timer_get_base_and_rate(struct device_node *np, | 25 | static void timer_get_base_and_rate(struct device_node *np, |
27 | void __iomem **base, u32 *rate) | 26 | void __iomem **base, u32 *rate) |
diff --git a/drivers/clocksource/mxs_timer.c b/drivers/clocksource/mxs_timer.c index 02af4204af86..0f5e65f74dc3 100644 --- a/drivers/clocksource/mxs_timer.c +++ b/drivers/clocksource/mxs_timer.c | |||
@@ -29,9 +29,9 @@ | |||
29 | #include <linux/of_address.h> | 29 | #include <linux/of_address.h> |
30 | #include <linux/of_irq.h> | 30 | #include <linux/of_irq.h> |
31 | #include <linux/stmp_device.h> | 31 | #include <linux/stmp_device.h> |
32 | #include <linux/sched_clock.h> | ||
32 | 33 | ||
33 | #include <asm/mach/time.h> | 34 | #include <asm/mach/time.h> |
34 | #include <asm/sched_clock.h> | ||
35 | 35 | ||
36 | /* | 36 | /* |
37 | * There are 2 versions of the timrot on Freescale MXS-based SoCs. | 37 | * There are 2 versions of the timrot on Freescale MXS-based SoCs. |
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c index e405531e1cc5..8864c17841c8 100644 --- a/drivers/clocksource/nomadik-mtu.c +++ b/drivers/clocksource/nomadik-mtu.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/platform_data/clocksource-nomadik-mtu.h> | 20 | #include <linux/platform_data/clocksource-nomadik-mtu.h> |
21 | #include <linux/sched_clock.h> | ||
21 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
22 | #include <asm/sched_clock.h> | ||
23 | 23 | ||
24 | /* | 24 | /* |
25 | * The MTU device hosts four different counters, with 4 set of | 25 | * The MTU device hosts four different counters, with 4 set of |
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 0234c8d2c8f2..584b5472eea3 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c | |||
@@ -21,10 +21,10 @@ | |||
21 | #include <linux/of_irq.h> | 21 | #include <linux/of_irq.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/sched_clock.h> | ||
24 | 25 | ||
25 | #include <clocksource/samsung_pwm.h> | 26 | #include <clocksource/samsung_pwm.h> |
26 | 27 | ||
27 | #include <asm/sched_clock.h> | ||
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Clocksource driver | 30 | * Clocksource driver |
diff --git a/drivers/clocksource/tegra20_timer.c b/drivers/clocksource/tegra20_timer.c index ae877b021b54..93961703b887 100644 --- a/drivers/clocksource/tegra20_timer.c +++ b/drivers/clocksource/tegra20_timer.c | |||
@@ -26,10 +26,10 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/of_irq.h> | 28 | #include <linux/of_irq.h> |
29 | #include <linux/sched_clock.h> | ||
29 | 30 | ||
30 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
31 | #include <asm/smp_twd.h> | 32 | #include <asm/smp_twd.h> |
32 | #include <asm/sched_clock.h> | ||
33 | 33 | ||
34 | #define RTC_SECONDS 0x08 | 34 | #define RTC_SECONDS 0x08 |
35 | #define RTC_SHADOW_SECONDS 0x0c | 35 | #define RTC_SHADOW_SECONDS 0x0c |
diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c index 47a673070d70..efdca3263afe 100644 --- a/drivers/clocksource/time-armada-370-xp.c +++ b/drivers/clocksource/time-armada-370-xp.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
28 | #include <linux/irq.h> | 28 | #include <linux/irq.h> |
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <linux/sched_clock.h> | ||
30 | 31 | ||
31 | #include <asm/sched_clock.h> | ||
32 | #include <asm/localtimer.h> | 32 | #include <asm/localtimer.h> |
33 | #include <linux/percpu.h> | 33 | #include <linux/percpu.h> |
34 | /* | 34 | /* |
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c index 97738dbf3e3b..e5dc9129ca26 100644 --- a/drivers/clocksource/timer-marco.c +++ b/drivers/clocksource/timer-marco.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_irq.h> | 18 | #include <linux/of_irq.h> |
19 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
20 | #include <asm/sched_clock.h> | 20 | #include <linux/sched_clock.h> |
21 | #include <asm/localtimer.h> | 21 | #include <asm/localtimer.h> |
22 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
23 | 23 | ||
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c index 760882665d7a..ef3cfb269d8b 100644 --- a/drivers/clocksource/timer-prima2.c +++ b/drivers/clocksource/timer-prima2.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/of.h> | 18 | #include <linux/of.h> |
19 | #include <linux/of_irq.h> | 19 | #include <linux/of_irq.h> |
20 | #include <linux/of_address.h> | 20 | #include <linux/of_address.h> |
21 | #include <asm/sched_clock.h> | 21 | #include <linux/sched_clock.h> |
22 | #include <asm/mach/time.h> | 22 | #include <asm/mach/time.h> |
23 | 23 | ||
24 | #define SIRFSOC_TIMER_COUNTER_LO 0x0000 | 24 | #define SIRFSOC_TIMER_COUNTER_LO 0x0000 |
diff --git a/arch/arm/include/asm/sched_clock.h b/include/linux/sched_clock.h index 3d520ddca61b..fa7922c80a41 100644 --- a/arch/arm/include/asm/sched_clock.h +++ b/include/linux/sched_clock.h | |||
@@ -5,10 +5,15 @@ | |||
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | #ifndef ASM_SCHED_CLOCK | 8 | #ifndef LINUX_SCHED_CLOCK |
9 | #define ASM_SCHED_CLOCK | 9 | #define LINUX_SCHED_CLOCK |
10 | 10 | ||
11 | #ifdef CONFIG_GENERIC_SCHED_CLOCK | ||
11 | extern void sched_clock_postinit(void); | 12 | extern void sched_clock_postinit(void); |
13 | #else | ||
14 | static inline void sched_clock_postinit(void) { } | ||
15 | #endif | ||
16 | |||
12 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); | 17 | extern void setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate); |
13 | 18 | ||
14 | extern unsigned long long (*sched_clock_func)(void); | 19 | extern unsigned long long (*sched_clock_func)(void); |
diff --git a/init/Kconfig b/init/Kconfig index 9d3a7887a6d3..1a3f93329a67 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -757,6 +757,9 @@ config LOG_BUF_SHIFT | |||
757 | config HAVE_UNSTABLE_SCHED_CLOCK | 757 | config HAVE_UNSTABLE_SCHED_CLOCK |
758 | bool | 758 | bool |
759 | 759 | ||
760 | config GENERIC_SCHED_CLOCK | ||
761 | bool | ||
762 | |||
760 | # | 763 | # |
761 | # For architectures that want to enable the support for NUMA-affine scheduler | 764 | # For architectures that want to enable the support for NUMA-affine scheduler |
762 | # balancing logic: | 765 | # balancing logic: |
diff --git a/init/main.c b/init/main.c index 9484f4ba88d0..bef4a6ac7c76 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -74,6 +74,7 @@ | |||
74 | #include <linux/ptrace.h> | 74 | #include <linux/ptrace.h> |
75 | #include <linux/blkdev.h> | 75 | #include <linux/blkdev.h> |
76 | #include <linux/elevator.h> | 76 | #include <linux/elevator.h> |
77 | #include <linux/sched_clock.h> | ||
77 | 78 | ||
78 | #include <asm/io.h> | 79 | #include <asm/io.h> |
79 | #include <asm/bugs.h> | 80 | #include <asm/bugs.h> |
@@ -555,6 +556,7 @@ asmlinkage void __init start_kernel(void) | |||
555 | softirq_init(); | 556 | softirq_init(); |
556 | timekeeping_init(); | 557 | timekeeping_init(); |
557 | time_init(); | 558 | time_init(); |
559 | sched_clock_postinit(); | ||
558 | profile_init(); | 560 | profile_init(); |
559 | call_function_init(); | 561 | call_function_init(); |
560 | WARN(!irqs_disabled(), "Interrupts were enabled early\n"); | 562 | WARN(!irqs_disabled(), "Interrupts were enabled early\n"); |
diff --git a/kernel/time/Makefile b/kernel/time/Makefile index d52ac8bf0006..9250130646f5 100644 --- a/kernel/time/Makefile +++ b/kernel/time/Makefile | |||
@@ -4,6 +4,7 @@ obj-y += timeconv.o posix-clock.o alarmtimer.o | |||
4 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BUILD) += clockevents.o | 4 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BUILD) += clockevents.o |
5 | obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o | 5 | obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o |
6 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += tick-broadcast.o | 6 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += tick-broadcast.o |
7 | obj-$(CONFIG_GENERIC_SCHED_CLOCK) += sched_clock.o | ||
7 | obj-$(CONFIG_TICK_ONESHOT) += tick-oneshot.o | 8 | obj-$(CONFIG_TICK_ONESHOT) += tick-oneshot.o |
8 | obj-$(CONFIG_TICK_ONESHOT) += tick-sched.o | 9 | obj-$(CONFIG_TICK_ONESHOT) += tick-sched.o |
9 | obj-$(CONFIG_TIMER_STATS) += timer_stats.o | 10 | obj-$(CONFIG_TIMER_STATS) += timer_stats.o |
diff --git a/arch/arm/kernel/sched_clock.c b/kernel/time/sched_clock.c index a781c59b93c0..aad1ae6077ef 100644 --- a/arch/arm/kernel/sched_clock.c +++ b/kernel/time/sched_clock.c | |||
@@ -13,8 +13,7 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/syscore_ops.h> | 14 | #include <linux/syscore_ops.h> |
15 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
16 | 16 | #include <linux/sched_clock.h> | |
17 | #include <asm/sched_clock.h> | ||
18 | 17 | ||
19 | struct clock_data { | 18 | struct clock_data { |
20 | u64 epoch_ns; | 19 | u64 epoch_ns; |