diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-22 06:44:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-22 06:44:20 -0400 |
commit | 3568b71d46bea87da1936902b6fbb2a3b1154b3d (patch) | |
tree | 621ba4ccef15b87ce16f0fc2cc1e9b2a3f565ffc /arch | |
parent | 2a3313f494c2f3f74a27d66f0f14b38558b7dba2 (diff) | |
parent | 091069740304c979f957ceacec39c461d0192158 (diff) |
Merge commit 'v2.6.30-rc3' into x86/urgent
Merge reason: hpet.c changed upstream, make sure we test against that
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
64 files changed, 170 insertions, 151 deletions
diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percpu.h index 3495e8e00d70..e9e0bb5a23bf 100644 --- a/arch/alpha/include/asm/percpu.h +++ b/arch/alpha/include/asm/percpu.h | |||
@@ -73,6 +73,6 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
73 | 73 | ||
74 | #endif /* SMP */ | 74 | #endif /* SMP */ |
75 | 75 | ||
76 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name) | 76 | #include <asm-generic/percpu.h> |
77 | 77 | ||
78 | #endif /* __ALPHA_PERCPU_H */ | 78 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e04173c7e621..d59a0cd537f0 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -177,21 +177,12 @@ asmlinkage long sys_oabi_fstatat64(int dfd, | |||
177 | int flag) | 177 | int flag) |
178 | { | 178 | { |
179 | struct kstat stat; | 179 | struct kstat stat; |
180 | int error = -EINVAL; | 180 | int error; |
181 | 181 | ||
182 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | 182 | error = vfs_fstatat(dfd, filename, &stat, flag); |
183 | goto out; | 183 | if (error) |
184 | 184 | return error; | |
185 | if (flag & AT_SYMLINK_NOFOLLOW) | 185 | return cp_oldabi_stat64(&stat, statbuf); |
186 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
187 | else | ||
188 | error = vfs_stat_fd(dfd, filename, &stat); | ||
189 | |||
190 | if (!error) | ||
191 | error = cp_oldabi_stat64(&stat, statbuf); | ||
192 | |||
193 | out: | ||
194 | return error; | ||
195 | } | 186 | } |
196 | 187 | ||
197 | struct oabi_flock64 { | 188 | struct oabi_flock64 { |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 1ff1bda0a894..309f3511aa20 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -85,7 +85,7 @@ static struct irqaction at91rm9200_timer_irq = { | |||
85 | .handler = at91rm9200_timer_interrupt | 85 | .handler = at91rm9200_timer_interrupt |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static cycle_t read_clk32k(void) | 88 | static cycle_t read_clk32k(struct clocksource *cs) |
89 | { | 89 | { |
90 | return read_CRTR(); | 90 | return read_CRTR(); |
91 | } | 91 | } |
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c index b63e1d5f1bad..4bd56aee4370 100644 --- a/arch/arm/mach-at91/at91sam926x_time.c +++ b/arch/arm/mach-at91/at91sam926x_time.c | |||
@@ -31,7 +31,7 @@ static u32 pit_cnt; /* access only w/system irq blocked */ | |||
31 | * Clocksource: just a monotonic counter of MCK/16 cycles. | 31 | * Clocksource: just a monotonic counter of MCK/16 cycles. |
32 | * We don't care whether or not PIT irqs are enabled. | 32 | * We don't care whether or not PIT irqs are enabled. |
33 | */ | 33 | */ |
34 | static cycle_t read_pit_clk(void) | 34 | static cycle_t read_pit_clk(struct clocksource *cs) |
35 | { | 35 | { |
36 | unsigned long flags; | 36 | unsigned long flags; |
37 | u32 elapsed; | 37 | u32 elapsed; |
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c index f8bcd29d17a6..6c227d4ba998 100644 --- a/arch/arm/mach-davinci/time.c +++ b/arch/arm/mach-davinci/time.c | |||
@@ -238,7 +238,7 @@ static void __init timer_init(void) | |||
238 | /* | 238 | /* |
239 | * clocksource | 239 | * clocksource |
240 | */ | 240 | */ |
241 | static cycle_t read_cycles(void) | 241 | static cycle_t read_cycles(struct clocksource *cs) |
242 | { | 242 | { |
243 | struct timer_s *t = &timers[TID_CLOCKSOURCE]; | 243 | struct timer_s *t = &timers[TID_CLOCKSOURCE]; |
244 | 244 | ||
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index aff0ebcfa847..5aef18b599e5 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c | |||
@@ -73,7 +73,7 @@ static void __init imx_timer_hardware_init(void) | |||
73 | IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN; | 73 | IMX_TCTL(TIMER_BASE) = TCTL_FRR | TCTL_CLK_PCLK1 | TCTL_TEN; |
74 | } | 74 | } |
75 | 75 | ||
76 | cycle_t imx_get_cycles(void) | 76 | cycle_t imx_get_cycles(struct clocksource *cs) |
77 | { | 77 | { |
78 | return IMX_TCN(TIMER_BASE); | 78 | return IMX_TCN(TIMER_BASE); |
79 | } | 79 | } |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index f4656d2ac8a8..1e93dfee7543 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -401,7 +401,7 @@ void __init ixp4xx_sys_init(void) | |||
401 | /* | 401 | /* |
402 | * clocksource | 402 | * clocksource |
403 | */ | 403 | */ |
404 | cycle_t ixp4xx_get_cycles(void) | 404 | cycle_t ixp4xx_get_cycles(struct clocksource *cs) |
405 | { | 405 | { |
406 | return *IXP4XX_OSTS; | 406 | return *IXP4XX_OSTS; |
407 | } | 407 | } |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 444d9c0f5ca6..4855b8ca5101 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -57,12 +57,12 @@ static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) | |||
57 | return IRQ_HANDLED; | 57 | return IRQ_HANDLED; |
58 | } | 58 | } |
59 | 59 | ||
60 | static cycle_t msm_gpt_read(void) | 60 | static cycle_t msm_gpt_read(struct clocksource *cs) |
61 | { | 61 | { |
62 | return readl(MSM_GPT_BASE + TIMER_COUNT_VAL); | 62 | return readl(MSM_GPT_BASE + TIMER_COUNT_VAL); |
63 | } | 63 | } |
64 | 64 | ||
65 | static cycle_t msm_dgt_read(void) | 65 | static cycle_t msm_dgt_read(struct clocksource *cs) |
66 | { | 66 | { |
67 | return readl(MSM_DGT_BASE + TIMER_COUNT_VAL) >> MSM_DGT_SHIFT; | 67 | return readl(MSM_DGT_BASE + TIMER_COUNT_VAL) >> MSM_DGT_SHIFT; |
68 | } | 68 | } |
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index f201fddb594f..82801dbf0579 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c | |||
@@ -104,7 +104,7 @@ static struct irqaction netx_timer_irq = { | |||
104 | .handler = netx_timer_interrupt, | 104 | .handler = netx_timer_interrupt, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | cycle_t netx_get_cycles(void) | 107 | cycle_t netx_get_cycles(struct clocksource *cs) |
108 | { | 108 | { |
109 | return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); | 109 | return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); |
110 | } | 110 | } |
diff --git a/arch/arm/mach-ns9xxx/time-ns9360.c b/arch/arm/mach-ns9xxx/time-ns9360.c index 41df69721769..77281260358a 100644 --- a/arch/arm/mach-ns9xxx/time-ns9360.c +++ b/arch/arm/mach-ns9xxx/time-ns9360.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #define TIMER_CLOCKEVENT 1 | 25 | #define TIMER_CLOCKEVENT 1 |
26 | static u32 latch; | 26 | static u32 latch; |
27 | 27 | ||
28 | static cycle_t ns9360_clocksource_read(void) | 28 | static cycle_t ns9360_clocksource_read(struct clocksource *cs) |
29 | { | 29 | { |
30 | return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE)); | 30 | return __raw_readl(SYS_TR(TIMER_CLOCKSOURCE)); |
31 | } | 31 | } |
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 495a32c287b4..4d56408d3cff 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -198,7 +198,7 @@ static struct irqaction omap_mpu_timer2_irq = { | |||
198 | .handler = omap_mpu_timer2_interrupt, | 198 | .handler = omap_mpu_timer2_interrupt, |
199 | }; | 199 | }; |
200 | 200 | ||
201 | static cycle_t mpu_read(void) | 201 | static cycle_t mpu_read(struct clocksource *cs) |
202 | { | 202 | { |
203 | return ~omap_mpu_timer_read(1); | 203 | return ~omap_mpu_timer_read(1); |
204 | } | 204 | } |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 9fc13a2cc3f4..1cb2c0909c2b 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -138,7 +138,7 @@ static inline void __init omap2_gp_clocksource_init(void) {} | |||
138 | * clocksource | 138 | * clocksource |
139 | */ | 139 | */ |
140 | static struct omap_dm_timer *gpt_clocksource; | 140 | static struct omap_dm_timer *gpt_clocksource; |
141 | static cycle_t clocksource_read_cycles(void) | 141 | static cycle_t clocksource_read_cycles(struct clocksource *cs) |
142 | { | 142 | { |
143 | return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource); | 143 | return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource); |
144 | } | 144 | } |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 8eb3830fbb0b..750c448db672 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -125,7 +125,7 @@ static struct clock_event_device ckevt_pxa_osmr0 = { | |||
125 | .set_mode = pxa_osmr0_set_mode, | 125 | .set_mode = pxa_osmr0_set_mode, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static cycle_t pxa_read_oscr(void) | 128 | static cycle_t pxa_read_oscr(struct clocksource *cs) |
129 | { | 129 | { |
130 | return OSCR; | 130 | return OSCR; |
131 | } | 131 | } |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 9ab947c14f26..942e1a7eb9b2 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -715,7 +715,7 @@ static struct irqaction realview_timer_irq = { | |||
715 | .handler = realview_timer_interrupt, | 715 | .handler = realview_timer_interrupt, |
716 | }; | 716 | }; |
717 | 717 | ||
718 | static cycle_t realview_get_cycles(void) | 718 | static cycle_t realview_get_cycles(struct clocksource *cs) |
719 | { | 719 | { |
720 | return ~readl(timer3_va_base + TIMER_VALUE); | 720 | return ~readl(timer3_va_base + TIMER_VALUE); |
721 | } | 721 | } |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 565776680d8c..1f929c391af7 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -948,7 +948,7 @@ static struct irqaction versatile_timer_irq = { | |||
948 | .handler = versatile_timer_interrupt, | 948 | .handler = versatile_timer_interrupt, |
949 | }; | 949 | }; |
950 | 950 | ||
951 | static cycle_t versatile_get_cycles(void) | 951 | static cycle_t versatile_get_cycles(struct clocksource *cs) |
952 | { | 952 | { |
953 | return ~readl(TIMER3_VA_BASE + TIMER_VALUE); | 953 | return ~readl(TIMER3_VA_BASE + TIMER_VALUE); |
954 | } | 954 | } |
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index ef1b3cd85bd3..dab3357196fb 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -36,7 +36,7 @@ static enum clock_event_mode clockevent_mode = CLOCK_EVT_MODE_UNUSED; | |||
36 | 36 | ||
37 | /* clock source */ | 37 | /* clock source */ |
38 | 38 | ||
39 | static cycle_t mxc_get_cycles(void) | 39 | static cycle_t mxc_get_cycles(struct clocksource *cs) |
40 | { | 40 | { |
41 | return __raw_readl(TIMER_BASE + MXC_TCN); | 41 | return __raw_readl(TIMER_BASE + MXC_TCN); |
42 | } | 42 | } |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index d1797147732f..433021f3d7cc 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -185,7 +185,7 @@ console_initcall(omap_add_serial_console); | |||
185 | 185 | ||
186 | #include <linux/clocksource.h> | 186 | #include <linux/clocksource.h> |
187 | 187 | ||
188 | static cycle_t omap_32k_read(void) | 188 | static cycle_t omap_32k_read(struct clocksource *cs) |
189 | { | 189 | { |
190 | return omap_readl(TIMER_32K_SYNCHRONIZED); | 190 | return omap_readl(TIMER_32K_SYNCHRONIZED); |
191 | } | 191 | } |
@@ -207,7 +207,7 @@ unsigned long long sched_clock(void) | |||
207 | { | 207 | { |
208 | unsigned long long ret; | 208 | unsigned long long ret; |
209 | 209 | ||
210 | ret = (unsigned long long)omap_32k_read(); | 210 | ret = (unsigned long long)omap_32k_read(&clocksource_32k); |
211 | ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift; | 211 | ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift; |
212 | return ret; | 212 | return ret; |
213 | } | 213 | } |
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c index 6fa2923e6dca..2faf9dba4ef7 100644 --- a/arch/arm/plat-orion/time.c +++ b/arch/arm/plat-orion/time.c | |||
@@ -41,7 +41,7 @@ static u32 ticks_per_jiffy; | |||
41 | /* | 41 | /* |
42 | * Clocksource handling. | 42 | * Clocksource handling. |
43 | */ | 43 | */ |
44 | static cycle_t orion_clksrc_read(void) | 44 | static cycle_t orion_clksrc_read(struct clocksource *cs) |
45 | { | 45 | { |
46 | return 0xffffffff - readl(TIMER0_VAL); | 46 | return 0xffffffff - readl(TIMER0_VAL); |
47 | } | 47 | } |
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c index 0ff46bf873b0..f27aa3b259fa 100644 --- a/arch/avr32/kernel/time.c +++ b/arch/avr32/kernel/time.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <mach/pm.h> | 18 | #include <mach/pm.h> |
19 | 19 | ||
20 | 20 | ||
21 | static cycle_t read_cycle_count(void) | 21 | static cycle_t read_cycle_count(struct clocksource *cs) |
22 | { | 22 | { |
23 | return (cycle_t)sysreg_read(COUNT); | 23 | return (cycle_t)sysreg_read(COUNT); |
24 | } | 24 | } |
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c index 0ed2badfd746..27646121280a 100644 --- a/arch/blackfin/kernel/time-ts.c +++ b/arch/blackfin/kernel/time-ts.c | |||
@@ -58,16 +58,11 @@ static inline unsigned long long cycles_2_ns(cycle_t cyc) | |||
58 | return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; | 58 | return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR; |
59 | } | 59 | } |
60 | 60 | ||
61 | static cycle_t read_cycles(void) | 61 | static cycle_t read_cycles(struct clocksource *cs) |
62 | { | 62 | { |
63 | return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod); | 63 | return __bfin_cycles_off + (get_cycles() << __bfin_cycles_mod); |
64 | } | 64 | } |
65 | 65 | ||
66 | unsigned long long sched_clock(void) | ||
67 | { | ||
68 | return cycles_2_ns(read_cycles()); | ||
69 | } | ||
70 | |||
71 | static struct clocksource clocksource_bfin = { | 66 | static struct clocksource clocksource_bfin = { |
72 | .name = "bfin_cycles", | 67 | .name = "bfin_cycles", |
73 | .rating = 350, | 68 | .rating = 350, |
@@ -77,6 +72,11 @@ static struct clocksource clocksource_bfin = { | |||
77 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 72 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
78 | }; | 73 | }; |
79 | 74 | ||
75 | unsigned long long sched_clock(void) | ||
76 | { | ||
77 | return cycles_2_ns(read_cycles(&clocksource_bfin)); | ||
78 | } | ||
79 | |||
80 | static int __init bfin_clocksource_init(void) | 80 | static int __init bfin_clocksource_init(void) |
81 | { | 81 | { |
82 | set_cyc2ns_scale(get_cclk() / 1000); | 82 | set_cyc2ns_scale(get_cclk() / 1000); |
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 0669e1382383..55e4fab7c0bc 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <asm/io.h> | 46 | #include <asm/io.h> |
47 | 47 | ||
48 | #ifdef CONFIG_BLK_DEV_INITRD | 48 | #ifdef CONFIG_BLK_DEV_INITRD |
49 | #include <linux/blk.h> | ||
50 | #include <asm/pgtable.h> | 49 | #include <asm/pgtable.h> |
51 | #endif | 50 | #endif |
52 | 51 | ||
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c index 0f41c3a72da5..c0dcec65c6b7 100644 --- a/arch/frv/mb93090-mb00/pci-vdk.c +++ b/arch/frv/mb93090-mb00/pci-vdk.c | |||
@@ -31,6 +31,29 @@ struct pci_bus *__nongpreldata pci_root_bus; | |||
31 | struct pci_ops *__nongpreldata pci_root_ops; | 31 | struct pci_ops *__nongpreldata pci_root_ops; |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * The accessible PCI window does not cover the entire CPU address space, but | ||
35 | * there are devices we want to access outside of that window, so we need to | ||
36 | * insert specific PCI bus resources instead of using the platform-level bus | ||
37 | * resources directly for the PCI root bus. | ||
38 | * | ||
39 | * These are configured and inserted by pcibios_init() and are attached to the | ||
40 | * root bus by pcibios_fixup_bus(). | ||
41 | */ | ||
42 | static struct resource pci_ioport_resource = { | ||
43 | .name = "PCI IO", | ||
44 | .start = 0, | ||
45 | .end = IO_SPACE_LIMIT, | ||
46 | .flags = IORESOURCE_IO, | ||
47 | }; | ||
48 | |||
49 | static struct resource pci_iomem_resource = { | ||
50 | .name = "PCI mem", | ||
51 | .start = 0, | ||
52 | .end = -1, | ||
53 | .flags = IORESOURCE_MEM, | ||
54 | }; | ||
55 | |||
56 | /* | ||
34 | * Functions for accessing PCI configuration space | 57 | * Functions for accessing PCI configuration space |
35 | */ | 58 | */ |
36 | 59 | ||
@@ -304,6 +327,12 @@ void __init pcibios_fixup_bus(struct pci_bus *bus) | |||
304 | #if 0 | 327 | #if 0 |
305 | printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); | 328 | printk("### PCIBIOS_FIXUP_BUS(%d)\n",bus->number); |
306 | #endif | 329 | #endif |
330 | |||
331 | if (bus->number == 0) { | ||
332 | bus->resource[0] = &pci_ioport_resource; | ||
333 | bus->resource[1] = &pci_iomem_resource; | ||
334 | } | ||
335 | |||
307 | pci_read_bridge_bases(bus); | 336 | pci_read_bridge_bases(bus); |
308 | 337 | ||
309 | if (bus->number == 0) { | 338 | if (bus->number == 0) { |
@@ -350,28 +379,36 @@ int __init pcibios_init(void) | |||
350 | /* enable PCI arbitration */ | 379 | /* enable PCI arbitration */ |
351 | __reg_MB86943_pci_arbiter = MB86943_PCIARB_EN; | 380 | __reg_MB86943_pci_arbiter = MB86943_PCIARB_EN; |
352 | 381 | ||
353 | ioport_resource.start = (__reg_MB86943_sl_pci_io_base << 9) & 0xfffffc00; | 382 | pci_ioport_resource.start = (__reg_MB86943_sl_pci_io_base << 9) & 0xfffffc00; |
354 | ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff; | 383 | pci_ioport_resource.end = (__reg_MB86943_sl_pci_io_range << 9) | 0x3ff; |
355 | ioport_resource.end += ioport_resource.start; | 384 | pci_ioport_resource.end += pci_ioport_resource.start; |
356 | 385 | ||
357 | printk("PCI IO window: %08llx-%08llx\n", | 386 | printk("PCI IO window: %08llx-%08llx\n", |
358 | (unsigned long long) ioport_resource.start, | 387 | (unsigned long long) pci_ioport_resource.start, |
359 | (unsigned long long) ioport_resource.end); | 388 | (unsigned long long) pci_ioport_resource.end); |
360 | 389 | ||
361 | iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00; | 390 | pci_iomem_resource.start = (__reg_MB86943_sl_pci_mem_base << 9) & 0xfffffc00; |
391 | pci_iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff; | ||
392 | pci_iomem_resource.end += pci_iomem_resource.start; | ||
362 | 393 | ||
363 | /* Reserve somewhere to write to flush posted writes. */ | 394 | /* Reserve somewhere to write to flush posted writes. This is used by |
364 | iomem_resource.start += 0x400; | 395 | * __flush_PCI_writes() from asm/io.h to force the write FIFO in the |
365 | 396 | * CPU-PCI bridge to flush as this doesn't happen automatically when a | |
366 | iomem_resource.end = (__reg_MB86943_sl_pci_mem_range << 9) | 0x3ff; | 397 | * read is performed on the MB93090 development kit motherboard. |
367 | iomem_resource.end += iomem_resource.start; | 398 | */ |
399 | pci_iomem_resource.start += 0x400; | ||
368 | 400 | ||
369 | printk("PCI MEM window: %08llx-%08llx\n", | 401 | printk("PCI MEM window: %08llx-%08llx\n", |
370 | (unsigned long long) iomem_resource.start, | 402 | (unsigned long long) pci_iomem_resource.start, |
371 | (unsigned long long) iomem_resource.end); | 403 | (unsigned long long) pci_iomem_resource.end); |
372 | printk("PCI DMA memory: %08lx-%08lx\n", | 404 | printk("PCI DMA memory: %08lx-%08lx\n", |
373 | dma_coherent_mem_start, dma_coherent_mem_end); | 405 | dma_coherent_mem_start, dma_coherent_mem_end); |
374 | 406 | ||
407 | if (insert_resource(&iomem_resource, &pci_iomem_resource) < 0) | ||
408 | panic("Unable to insert PCI IOMEM resource\n"); | ||
409 | if (insert_resource(&ioport_resource, &pci_ioport_resource) < 0) | ||
410 | panic("Unable to insert PCI IOPORT resource\n"); | ||
411 | |||
375 | if (!pci_probe) | 412 | if (!pci_probe) |
376 | return -ENXIO; | 413 | return -ENXIO; |
377 | 414 | ||
diff --git a/arch/ia64/include/asm/paravirt_privop.h b/arch/ia64/include/asm/paravirt_privop.h index 3d2951130b5f..8f6cb11c9fae 100644 --- a/arch/ia64/include/asm/paravirt_privop.h +++ b/arch/ia64/include/asm/paravirt_privop.h | |||
@@ -445,7 +445,6 @@ paravirt_set_rr0_to_rr4(unsigned long val0, unsigned long val1, | |||
445 | register unsigned long ia64_intri_res asm ("r8"); \ | 445 | register unsigned long ia64_intri_res asm ("r8"); \ |
446 | register unsigned long __reg asm ("r8") = (reg); \ | 446 | register unsigned long __reg asm ("r8") = (reg); \ |
447 | \ | 447 | \ |
448 | BUILD_BUG_ON(!__builtin_constant_p(reg)); \ | ||
449 | asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \ | 448 | asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \ |
450 | PARAVIRT_TYPE(GETREG) \ | 449 | PARAVIRT_TYPE(GETREG) \ |
451 | + (reg)) \ | 450 | + (reg)) \ |
@@ -464,7 +463,6 @@ paravirt_set_rr0_to_rr4(unsigned long val0, unsigned long val1, | |||
464 | register unsigned long ia64_clobber1 asm ("r8"); \ | 463 | register unsigned long ia64_clobber1 asm ("r8"); \ |
465 | register unsigned long ia64_clobber2 asm ("r9"); \ | 464 | register unsigned long ia64_clobber2 asm ("r9"); \ |
466 | \ | 465 | \ |
467 | BUILD_BUG_ON(!__builtin_constant_p(reg)); \ | ||
468 | asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \ | 466 | asm volatile (paravirt_alt_bundle(__PARAVIRT_BR, \ |
469 | PARAVIRT_TYPE(SETREG) \ | 467 | PARAVIRT_TYPE(SETREG) \ |
470 | + (reg)) \ | 468 | + (reg)) \ |
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h index 598408336251..d217d1d4e051 100644 --- a/arch/ia64/include/asm/smp.h +++ b/arch/ia64/include/asm/smp.h | |||
@@ -58,7 +58,7 @@ extern struct smp_boot_data { | |||
58 | extern char no_int_routing __devinitdata; | 58 | extern char no_int_routing __devinitdata; |
59 | 59 | ||
60 | extern cpumask_t cpu_core_map[NR_CPUS]; | 60 | extern cpumask_t cpu_core_map[NR_CPUS]; |
61 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 61 | DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); |
62 | extern int smp_num_siblings; | 62 | extern int smp_num_siblings; |
63 | extern void __iomem *ipi_base_addr; | 63 | extern void __iomem *ipi_base_addr; |
64 | extern unsigned char smp_int_redirect; | 64 | extern unsigned char smp_int_redirect; |
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c index 790ef0d87e12..71e35864d2e2 100644 --- a/arch/ia64/kernel/cyclone.c +++ b/arch/ia64/kernel/cyclone.c | |||
@@ -21,7 +21,7 @@ void __init cyclone_setup(void) | |||
21 | 21 | ||
22 | static void __iomem *cyclone_mc; | 22 | static void __iomem *cyclone_mc; |
23 | 23 | ||
24 | static cycle_t read_cyclone(void) | 24 | static cycle_t read_cyclone(struct clocksource *cs) |
25 | { | 25 | { |
26 | return (cycle_t)readq((void __iomem *)cyclone_mc); | 26 | return (cycle_t)readq((void __iomem *)cyclone_mc); |
27 | } | 27 | } |
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index 2ea4199d9c57..5230eaafd83f 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -225,6 +225,7 @@ smp_send_reschedule (int cpu) | |||
225 | { | 225 | { |
226 | platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0); | 226 | platform_send_ipi(cpu, IA64_IPI_RESCHEDULE, IA64_IPI_DM_INT, 0); |
227 | } | 227 | } |
228 | EXPORT_SYMBOL_GPL(smp_send_reschedule); | ||
228 | 229 | ||
229 | /* | 230 | /* |
230 | * Called with preemption disabled. | 231 | * Called with preemption disabled. |
@@ -300,15 +301,12 @@ smp_flush_tlb_mm (struct mm_struct *mm) | |||
300 | return; | 301 | return; |
301 | } | 302 | } |
302 | 303 | ||
304 | smp_call_function_mask(mm->cpu_vm_mask, | ||
305 | (void (*)(void *))local_finish_flush_tlb_mm, mm, 1); | ||
306 | local_irq_disable(); | ||
307 | local_finish_flush_tlb_mm(mm); | ||
308 | local_irq_enable(); | ||
303 | preempt_enable(); | 309 | preempt_enable(); |
304 | /* | ||
305 | * We could optimize this further by using mm->cpu_vm_mask to track which CPUs | ||
306 | * have been running in the address space. It's not clear that this is worth the | ||
307 | * trouble though: to avoid races, we have to raise the IPI on the target CPU | ||
308 | * anyhow, and once a CPU is interrupted, the cost of local_flush_tlb_all() is | ||
309 | * rather trivial. | ||
310 | */ | ||
311 | on_each_cpu((void (*)(void *))local_finish_flush_tlb_mm, mm, 1); | ||
312 | } | 310 | } |
313 | 311 | ||
314 | void arch_send_call_function_single_ipi(int cpu) | 312 | void arch_send_call_function_single_ipi(int cpu) |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 641c8b61c4f1..604c1a35db33 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #include "fsyscall_gtod_data.h" | 34 | #include "fsyscall_gtod_data.h" |
35 | 35 | ||
36 | static cycle_t itc_get_cycles(void); | 36 | static cycle_t itc_get_cycles(struct clocksource *cs); |
37 | 37 | ||
38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { | 38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { |
39 | .lock = SEQLOCK_UNLOCKED, | 39 | .lock = SEQLOCK_UNLOCKED, |
@@ -383,7 +383,7 @@ ia64_init_itm (void) | |||
383 | } | 383 | } |
384 | } | 384 | } |
385 | 385 | ||
386 | static cycle_t itc_get_cycles(void) | 386 | static cycle_t itc_get_cycles(struct clocksource *cs) |
387 | { | 387 | { |
388 | u64 lcycle, now, ret; | 388 | u64 lcycle, now, ret; |
389 | 389 | ||
diff --git a/arch/ia64/sn/kernel/sn2/timer.c b/arch/ia64/sn/kernel/sn2/timer.c index cf67fc562054..21d6f09e3447 100644 --- a/arch/ia64/sn/kernel/sn2/timer.c +++ b/arch/ia64/sn/kernel/sn2/timer.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | extern unsigned long sn_rtc_cycles_per_second; | 24 | extern unsigned long sn_rtc_cycles_per_second; |
25 | 25 | ||
26 | static cycle_t read_sn2(void) | 26 | static cycle_t read_sn2(struct clocksource *cs) |
27 | { | 27 | { |
28 | return (cycle_t)readq(RTC_COUNTER_ADDR); | 28 | return (cycle_t)readq(RTC_COUNTER_ADDR); |
29 | } | 29 | } |
diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c index 6bafefa546e5..309f725995bf 100644 --- a/arch/m68knommu/platform/68328/timers.c +++ b/arch/m68knommu/platform/68328/timers.c | |||
@@ -75,7 +75,7 @@ static struct irqaction m68328_timer_irq = { | |||
75 | 75 | ||
76 | /***************************************************************************/ | 76 | /***************************************************************************/ |
77 | 77 | ||
78 | static cycle_t m68328_read_clk(void) | 78 | static cycle_t m68328_read_clk(struct clocksource *cs) |
79 | { | 79 | { |
80 | unsigned long flags; | 80 | unsigned long flags; |
81 | u32 cycles; | 81 | u32 cycles; |
diff --git a/arch/m68knommu/platform/coldfire/dma_timer.c b/arch/m68knommu/platform/coldfire/dma_timer.c index 772578b1084f..a5f562823d7a 100644 --- a/arch/m68knommu/platform/coldfire/dma_timer.c +++ b/arch/m68knommu/platform/coldfire/dma_timer.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #define DMA_DTMR_CLK_DIV_16 (2 << 1) | 34 | #define DMA_DTMR_CLK_DIV_16 (2 << 1) |
35 | #define DMA_DTMR_ENABLE (1 << 0) | 35 | #define DMA_DTMR_ENABLE (1 << 0) |
36 | 36 | ||
37 | static cycle_t cf_dt_get_cycles(void) | 37 | static cycle_t cf_dt_get_cycles(struct clocksource *cs) |
38 | { | 38 | { |
39 | return __raw_readl(DTCN0); | 39 | return __raw_readl(DTCN0); |
40 | } | 40 | } |
diff --git a/arch/m68knommu/platform/coldfire/pit.c b/arch/m68knommu/platform/coldfire/pit.c index 2a12e7fa9748..61b96211f8ff 100644 --- a/arch/m68knommu/platform/coldfire/pit.c +++ b/arch/m68knommu/platform/coldfire/pit.c | |||
@@ -125,7 +125,7 @@ static struct irqaction pit_irq = { | |||
125 | 125 | ||
126 | /***************************************************************************/ | 126 | /***************************************************************************/ |
127 | 127 | ||
128 | static cycle_t pit_read_clk(void) | 128 | static cycle_t pit_read_clk(struct clocksource *cs) |
129 | { | 129 | { |
130 | unsigned long flags; | 130 | unsigned long flags; |
131 | u32 cycles; | 131 | u32 cycles; |
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c index 454f25493491..1ba8a3731653 100644 --- a/arch/m68knommu/platform/coldfire/timers.c +++ b/arch/m68knommu/platform/coldfire/timers.c | |||
@@ -78,7 +78,7 @@ static struct irqaction mcftmr_timer_irq = { | |||
78 | 78 | ||
79 | /***************************************************************************/ | 79 | /***************************************************************************/ |
80 | 80 | ||
81 | static cycle_t mcftmr_read_clk(void) | 81 | static cycle_t mcftmr_read_clk(struct clocksource *cs) |
82 | { | 82 | { |
83 | unsigned long flags; | 83 | unsigned long flags; |
84 | u32 cycles; | 84 | u32 cycles; |
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c index eccf7d6096bd..2e911e3da8d3 100644 --- a/arch/mips/kernel/cevt-txx9.c +++ b/arch/mips/kernel/cevt-txx9.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr; | 23 | static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr; |
24 | 24 | ||
25 | static cycle_t txx9_cs_read(void) | 25 | static cycle_t txx9_cs_read(struct clocksource *cs) |
26 | { | 26 | { |
27 | return __raw_readl(&txx9_cs_tmrptr->trr); | 27 | return __raw_readl(&txx9_cs_tmrptr->trr); |
28 | } | 28 | } |
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c index 868745e7184b..51489f8a825e 100644 --- a/arch/mips/kernel/csrc-bcm1480.c +++ b/arch/mips/kernel/csrc-bcm1480.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include <asm/sibyte/sb1250.h> | 29 | #include <asm/sibyte/sb1250.h> |
30 | 30 | ||
31 | static cycle_t bcm1480_hpt_read(void) | 31 | static cycle_t bcm1480_hpt_read(struct clocksource *cs) |
32 | { | 32 | { |
33 | return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); | 33 | return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); |
34 | } | 34 | } |
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c index 1d5f63cf8997..b551f48d3a07 100644 --- a/arch/mips/kernel/csrc-ioasic.c +++ b/arch/mips/kernel/csrc-ioasic.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/dec/ioasic.h> | 25 | #include <asm/dec/ioasic.h> |
26 | #include <asm/dec/ioasic_addrs.h> | 26 | #include <asm/dec/ioasic_addrs.h> |
27 | 27 | ||
28 | static cycle_t dec_ioasic_hpt_read(void) | 28 | static cycle_t dec_ioasic_hpt_read(struct clocksource *cs) |
29 | { | 29 | { |
30 | return ioasic_read(IO_REG_FCTR); | 30 | return ioasic_read(IO_REG_FCTR); |
31 | } | 31 | } |
@@ -47,13 +47,13 @@ void __init dec_ioasic_clocksource_init(void) | |||
47 | while (!ds1287_timer_state()) | 47 | while (!ds1287_timer_state()) |
48 | ; | 48 | ; |
49 | 49 | ||
50 | start = dec_ioasic_hpt_read(); | 50 | start = dec_ioasic_hpt_read(&clocksource_dec); |
51 | 51 | ||
52 | while (i--) | 52 | while (i--) |
53 | while (!ds1287_timer_state()) | 53 | while (!ds1287_timer_state()) |
54 | ; | 54 | ; |
55 | 55 | ||
56 | end = dec_ioasic_hpt_read(); | 56 | end = dec_ioasic_hpt_read(&clocksource_dec); |
57 | 57 | ||
58 | freq = (end - start) * 10; | 58 | freq = (end - start) * 10; |
59 | printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq); | 59 | printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq); |
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index f1a2893931ed..e95a3cd48eea 100644 --- a/arch/mips/kernel/csrc-r4k.c +++ b/arch/mips/kernel/csrc-r4k.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <asm/time.h> | 11 | #include <asm/time.h> |
12 | 12 | ||
13 | static cycle_t c0_hpt_read(void) | 13 | static cycle_t c0_hpt_read(struct clocksource *cs) |
14 | { | 14 | { |
15 | return read_c0_count(); | 15 | return read_c0_count(); |
16 | } | 16 | } |
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c index 92212bbb8e45..d14d3d1907fa 100644 --- a/arch/mips/kernel/csrc-sb1250.c +++ b/arch/mips/kernel/csrc-sb1250.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over | 33 | * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over |
34 | * again. | 34 | * again. |
35 | */ | 35 | */ |
36 | static cycle_t sb1250_hpt_read(void) | 36 | static cycle_t sb1250_hpt_read(struct clocksource *cs) |
37 | { | 37 | { |
38 | unsigned int count; | 38 | unsigned int count; |
39 | 39 | ||
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c index 689719e34f08..ed20e7fe65e3 100644 --- a/arch/mips/kernel/i8253.c +++ b/arch/mips/kernel/i8253.c | |||
@@ -128,7 +128,7 @@ void __init setup_pit_timer(void) | |||
128 | * to just read by itself. So use jiffies to emulate a free | 128 | * to just read by itself. So use jiffies to emulate a free |
129 | * running counter: | 129 | * running counter: |
130 | */ | 130 | */ |
131 | static cycle_t pit_read(void) | 131 | static cycle_t pit_read(struct clocksource *cs) |
132 | { | 132 | { |
133 | unsigned long flags; | 133 | unsigned long flags; |
134 | int count; | 134 | int count; |
diff --git a/arch/mips/nxp/pnx8550/common/time.c b/arch/mips/nxp/pnx8550/common/time.c index cf293b279098..8df43e9e4d90 100644 --- a/arch/mips/nxp/pnx8550/common/time.c +++ b/arch/mips/nxp/pnx8550/common/time.c | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | static unsigned long cpj; | 36 | static unsigned long cpj; |
37 | 37 | ||
38 | static cycle_t hpt_read(void) | 38 | static cycle_t hpt_read(struct clocksource *cs) |
39 | { | 39 | { |
40 | return read_c0_count2(); | 40 | return read_c0_count2(); |
41 | } | 41 | } |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index f024057a35f8..f10a7cd64f7e 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -159,7 +159,7 @@ static void __init hub_rt_clock_event_global_init(void) | |||
159 | setup_irq(irq, &hub_rt_irqaction); | 159 | setup_irq(irq, &hub_rt_irqaction); |
160 | } | 160 | } |
161 | 161 | ||
162 | static cycle_t hub_rt_read(void) | 162 | static cycle_t hub_rt_read(struct clocksource *cs) |
163 | { | 163 | { |
164 | return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); | 164 | return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); |
165 | } | 165 | } |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 926ea864e34f..48571ac56fb7 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -77,7 +77,7 @@ | |||
77 | #include <linux/clockchips.h> | 77 | #include <linux/clockchips.h> |
78 | #include <linux/clocksource.h> | 78 | #include <linux/clocksource.h> |
79 | 79 | ||
80 | static cycle_t rtc_read(void); | 80 | static cycle_t rtc_read(struct clocksource *); |
81 | static struct clocksource clocksource_rtc = { | 81 | static struct clocksource clocksource_rtc = { |
82 | .name = "rtc", | 82 | .name = "rtc", |
83 | .rating = 400, | 83 | .rating = 400, |
@@ -88,7 +88,7 @@ static struct clocksource clocksource_rtc = { | |||
88 | .read = rtc_read, | 88 | .read = rtc_read, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static cycle_t timebase_read(void); | 91 | static cycle_t timebase_read(struct clocksource *); |
92 | static struct clocksource clocksource_timebase = { | 92 | static struct clocksource clocksource_timebase = { |
93 | .name = "timebase", | 93 | .name = "timebase", |
94 | .rating = 400, | 94 | .rating = 400, |
@@ -766,12 +766,12 @@ unsigned long read_persistent_clock(void) | |||
766 | } | 766 | } |
767 | 767 | ||
768 | /* clocksource code */ | 768 | /* clocksource code */ |
769 | static cycle_t rtc_read(void) | 769 | static cycle_t rtc_read(struct clocksource *cs) |
770 | { | 770 | { |
771 | return (cycle_t)get_rtc(); | 771 | return (cycle_t)get_rtc(); |
772 | } | 772 | } |
773 | 773 | ||
774 | static cycle_t timebase_read(void) | 774 | static cycle_t timebase_read(struct clocksource *cs) |
775 | { | 775 | { |
776 | return (cycle_t)get_tb(); | 776 | return (cycle_t)get_tb(); |
777 | } | 777 | } |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 6cc87d8c8682..002c70d3cb75 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -702,20 +702,12 @@ asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename, | |||
702 | struct stat64_emu31 __user* statbuf, int flag) | 702 | struct stat64_emu31 __user* statbuf, int flag) |
703 | { | 703 | { |
704 | struct kstat stat; | 704 | struct kstat stat; |
705 | int error = -EINVAL; | 705 | int error; |
706 | |||
707 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
708 | goto out; | ||
709 | |||
710 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
711 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
712 | else | ||
713 | error = vfs_stat_fd(dfd, filename, &stat); | ||
714 | 706 | ||
715 | if (!error) | 707 | error = vfs_fstatat(dfd, filename, &stat, flag); |
716 | error = cp_stat64(statbuf, &stat); | 708 | if (error) |
717 | out: | 709 | return error; |
718 | return error; | 710 | return cp_stat64(statbuf, &stat); |
719 | } | 711 | } |
720 | 712 | ||
721 | /* | 713 | /* |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 6ded50dfa75a..ef596d020573 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -201,7 +201,7 @@ unsigned long read_persistent_clock(void) | |||
201 | return ts.tv_sec; | 201 | return ts.tv_sec; |
202 | } | 202 | } |
203 | 203 | ||
204 | static cycle_t read_tod_clock(void) | 204 | static cycle_t read_tod_clock(struct clocksource *cs) |
205 | { | 205 | { |
206 | return get_clock(); | 206 | return get_clock(); |
207 | } | 207 | } |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 0e5d204bc792..406747f07dc0 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -256,7 +256,6 @@ static int __init sh7722_devices_setup(void) | |||
256 | { | 256 | { |
257 | clk_always_enable("uram0"); /* URAM */ | 257 | clk_always_enable("uram0"); /* URAM */ |
258 | clk_always_enable("xymem0"); /* XYMEM */ | 258 | clk_always_enable("xymem0"); /* XYMEM */ |
259 | clk_always_enable("rtc0"); /* RTC */ | ||
260 | clk_always_enable("veu0"); /* VEU */ | 259 | clk_always_enable("veu0"); /* VEU */ |
261 | clk_always_enable("vpu0"); /* VPU */ | 260 | clk_always_enable("vpu0"); /* VPU */ |
262 | clk_always_enable("jpu0"); /* JPU */ | 261 | clk_always_enable("jpu0"); /* JPU */ |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 5338dacbcfba..a800466b938c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -267,7 +267,6 @@ static struct platform_device *sh7723_devices[] __initdata = { | |||
267 | static int __init sh7723_devices_setup(void) | 267 | static int __init sh7723_devices_setup(void) |
268 | { | 268 | { |
269 | clk_always_enable("meram0"); /* MERAM */ | 269 | clk_always_enable("meram0"); /* MERAM */ |
270 | clk_always_enable("rtc0"); /* RTC */ | ||
271 | clk_always_enable("veu1"); /* VEU2H1 */ | 270 | clk_always_enable("veu1"); /* VEU2H1 */ |
272 | clk_always_enable("veu0"); /* VEU2H0 */ | 271 | clk_always_enable("veu0"); /* VEU2H0 */ |
273 | clk_always_enable("vpu0"); /* VPU */ | 272 | clk_always_enable("vpu0"); /* VPU */ |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 58dfc02c7af1..e3a7e36639ef 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -63,6 +63,15 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
63 | unsigned long prot, unsigned long flags, | 63 | unsigned long prot, unsigned long flags, |
64 | unsigned long fd, unsigned long pgoff) | 64 | unsigned long fd, unsigned long pgoff) |
65 | { | 65 | { |
66 | /* | ||
67 | * The shift for mmap2 is constant, regardless of PAGE_SIZE | ||
68 | * setting. | ||
69 | */ | ||
70 | if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1)) | ||
71 | return -EINVAL; | ||
72 | |||
73 | pgoff >>= PAGE_SHIFT - 12; | ||
74 | |||
66 | return do_mmap2(addr, len, prot, flags, fd, pgoff); | 75 | return do_mmap2(addr, len, prot, flags, fd, pgoff); |
67 | } | 76 | } |
68 | 77 | ||
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index c34e1e0f9b02..1700d2465f6c 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c | |||
@@ -208,7 +208,7 @@ unsigned long long sched_clock(void) | |||
208 | if (!clocksource_sh.rating) | 208 | if (!clocksource_sh.rating) |
209 | return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); | 209 | return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); |
210 | 210 | ||
211 | cycles = clocksource_sh.read(); | 211 | cycles = clocksource_sh.read(&clocksource_sh); |
212 | return cyc2ns(&clocksource_sh, cycles); | 212 | return cyc2ns(&clocksource_sh, cycles); |
213 | } | 213 | } |
214 | #endif | 214 | #endif |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index c5d3396f5960..fe8d8930ccb6 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -81,7 +81,7 @@ static int tmu_timer_stop(void) | |||
81 | */ | 81 | */ |
82 | static int tmus_are_scaled; | 82 | static int tmus_are_scaled; |
83 | 83 | ||
84 | static cycle_t tmu_timer_read(void) | 84 | static cycle_t tmu_timer_read(struct clocksource *cs) |
85 | { | 85 | { |
86 | return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled; | 86 | return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled; |
87 | } | 87 | } |
diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index e800503879e4..f5000a460c05 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c | |||
@@ -206,21 +206,12 @@ asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename, | |||
206 | struct compat_stat64 __user * statbuf, int flag) | 206 | struct compat_stat64 __user * statbuf, int flag) |
207 | { | 207 | { |
208 | struct kstat stat; | 208 | struct kstat stat; |
209 | int error = -EINVAL; | 209 | int error; |
210 | |||
211 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
212 | goto out; | ||
213 | |||
214 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
215 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
216 | else | ||
217 | error = vfs_stat_fd(dfd, filename, &stat); | ||
218 | |||
219 | if (!error) | ||
220 | error = cp_compat_stat64(&stat, statbuf); | ||
221 | 210 | ||
222 | out: | 211 | error = vfs_fstatat(dfd, filename, &stat, flag); |
223 | return error; | 212 | if (error) |
213 | return error; | ||
214 | return cp_compat_stat64(&stat, statbuf); | ||
224 | } | 215 | } |
225 | 216 | ||
226 | asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) | 217 | asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index db310aa00183..5c12e79b4bdf 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -814,6 +814,11 @@ void udelay(unsigned long usecs) | |||
814 | } | 814 | } |
815 | EXPORT_SYMBOL(udelay); | 815 | EXPORT_SYMBOL(udelay); |
816 | 816 | ||
817 | static cycle_t clocksource_tick_read(struct clocksource *cs) | ||
818 | { | ||
819 | return tick_ops->get_tick(); | ||
820 | } | ||
821 | |||
817 | void __init time_init(void) | 822 | void __init time_init(void) |
818 | { | 823 | { |
819 | unsigned long freq = sparc64_init_timers(); | 824 | unsigned long freq = sparc64_init_timers(); |
@@ -827,7 +832,7 @@ void __init time_init(void) | |||
827 | clocksource_tick.mult = | 832 | clocksource_tick.mult = |
828 | clocksource_hz2mult(freq, | 833 | clocksource_hz2mult(freq, |
829 | clocksource_tick.shift); | 834 | clocksource_tick.shift); |
830 | clocksource_tick.read = tick_ops->get_tick; | 835 | clocksource_tick.read = clocksource_tick_read; |
831 | 836 | ||
832 | printk("clocksource: mult[%x] shift[%d]\n", | 837 | printk("clocksource: mult[%x] shift[%d]\n", |
833 | clocksource_tick.mult, clocksource_tick.shift); | 838 | clocksource_tick.mult, clocksource_tick.shift); |
diff --git a/arch/um/Kconfig.rest b/arch/um/Kconfig.rest index 7b5cea75a6c4..0ccad0ff6d6e 100644 --- a/arch/um/Kconfig.rest +++ b/arch/um/Kconfig.rest | |||
@@ -36,7 +36,7 @@ source "drivers/leds/Kconfig" | |||
36 | 36 | ||
37 | #This is just to shut up some Kconfig warnings, so no prompt. | 37 | #This is just to shut up some Kconfig warnings, so no prompt. |
38 | config INPUT | 38 | config INPUT |
39 | bool | 39 | tristate |
40 | default n | 40 | default n |
41 | 41 | ||
42 | source "arch/um/Kconfig.debug" | 42 | source "arch/um/Kconfig.debug" |
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index b13a87a3ec95..c8b9c469fcd7 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -65,7 +65,7 @@ static irqreturn_t um_timer(int irq, void *dev) | |||
65 | return IRQ_HANDLED; | 65 | return IRQ_HANDLED; |
66 | } | 66 | } |
67 | 67 | ||
68 | static cycle_t itimer_read(void) | 68 | static cycle_t itimer_read(struct clocksource *cs) |
69 | { | 69 | { |
70 | return os_nsecs() / 1000; | 70 | return os_nsecs() / 1000; |
71 | } | 71 | } |
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c index efac92fd1efb..085a8c35f149 100644 --- a/arch/x86/ia32/sys_ia32.c +++ b/arch/x86/ia32/sys_ia32.c | |||
@@ -129,21 +129,12 @@ asmlinkage long sys32_fstatat(unsigned int dfd, char __user *filename, | |||
129 | struct stat64 __user *statbuf, int flag) | 129 | struct stat64 __user *statbuf, int flag) |
130 | { | 130 | { |
131 | struct kstat stat; | 131 | struct kstat stat; |
132 | int error = -EINVAL; | 132 | int error; |
133 | 133 | ||
134 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | 134 | error = vfs_fstatat(dfd, filename, &stat, flag); |
135 | goto out; | 135 | if (error) |
136 | 136 | return error; | |
137 | if (flag & AT_SYMLINK_NOFOLLOW) | 137 | return cp_stat64(statbuf, &stat); |
138 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
139 | else | ||
140 | error = vfs_stat_fd(dfd, filename, &stat); | ||
141 | |||
142 | if (!error) | ||
143 | error = cp_stat64(statbuf, &stat); | ||
144 | |||
145 | out: | ||
146 | return error; | ||
147 | } | 138 | } |
148 | 139 | ||
149 | /* | 140 | /* |
diff --git a/arch/x86/include/asm/desc.h b/arch/x86/include/asm/desc.h index 5623c50d67b2..c45f415ce315 100644 --- a/arch/x86/include/asm/desc.h +++ b/arch/x86/include/asm/desc.h | |||
@@ -37,7 +37,7 @@ extern gate_desc idt_table[]; | |||
37 | struct gdt_page { | 37 | struct gdt_page { |
38 | struct desc_struct gdt[GDT_ENTRIES]; | 38 | struct desc_struct gdt[GDT_ENTRIES]; |
39 | } __attribute__((aligned(PAGE_SIZE))); | 39 | } __attribute__((aligned(PAGE_SIZE))); |
40 | DECLARE_PER_CPU(struct gdt_page, gdt_page); | 40 | DECLARE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page); |
41 | 41 | ||
42 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) | 42 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) |
43 | { | 43 | { |
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index 039db6aa8e02..37555e52f980 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h | |||
@@ -26,7 +26,7 @@ typedef struct { | |||
26 | #endif | 26 | #endif |
27 | } ____cacheline_aligned irq_cpustat_t; | 27 | } ____cacheline_aligned irq_cpustat_t; |
28 | 28 | ||
29 | DECLARE_PER_CPU(irq_cpustat_t, irq_stat); | 29 | DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat); |
30 | 30 | ||
31 | /* We can have at most NR_VECTORS irqs routed to a cpu at a time */ | 31 | /* We can have at most NR_VECTORS irqs routed to a cpu at a time */ |
32 | #define MAX_HARDIRQS_PER_CPU NR_VECTORS | 32 | #define MAX_HARDIRQS_PER_CPU NR_VECTORS |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index fcf4d92e7e04..c2cceae709c8 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -138,7 +138,7 @@ extern struct tss_struct doublefault_tss; | |||
138 | extern __u32 cleared_cpu_caps[NCAPINTS]; | 138 | extern __u32 cleared_cpu_caps[NCAPINTS]; |
139 | 139 | ||
140 | #ifdef CONFIG_SMP | 140 | #ifdef CONFIG_SMP |
141 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); | 141 | DECLARE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
142 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) | 142 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) |
143 | #define current_cpu_data __get_cpu_var(cpu_info) | 143 | #define current_cpu_data __get_cpu_var(cpu_info) |
144 | #else | 144 | #else |
@@ -270,7 +270,7 @@ struct tss_struct { | |||
270 | 270 | ||
271 | } ____cacheline_aligned; | 271 | } ____cacheline_aligned; |
272 | 272 | ||
273 | DECLARE_PER_CPU(struct tss_struct, init_tss); | 273 | DECLARE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss); |
274 | 274 | ||
275 | /* | 275 | /* |
276 | * Save the original ist values for checking stack pointers during debugging | 276 | * Save the original ist values for checking stack pointers during debugging |
@@ -393,7 +393,7 @@ union irq_stack_union { | |||
393 | }; | 393 | }; |
394 | }; | 394 | }; |
395 | 395 | ||
396 | DECLARE_PER_CPU(union irq_stack_union, irq_stack_union); | 396 | DECLARE_PER_CPU_FIRST(union irq_stack_union, irq_stack_union); |
397 | DECLARE_INIT_PER_CPU(irq_stack_union); | 397 | DECLARE_INIT_PER_CPU(irq_stack_union); |
398 | 398 | ||
399 | DECLARE_PER_CPU(char *, irq_stack_ptr); | 399 | DECLARE_PER_CPU(char *, irq_stack_ptr); |
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index d3539f998f88..16a5c84b0329 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h | |||
@@ -152,7 +152,7 @@ struct tlb_state { | |||
152 | struct mm_struct *active_mm; | 152 | struct mm_struct *active_mm; |
153 | int state; | 153 | int state; |
154 | }; | 154 | }; |
155 | DECLARE_PER_CPU(struct tlb_state, cpu_tlbstate); | 155 | DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate); |
156 | 156 | ||
157 | static inline void reset_lazy_tlbstate(void) | 157 | static inline void reset_lazy_tlbstate(void) |
158 | { | 158 | { |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 648b3a2a3a44..3f0019e0a229 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -722,7 +722,7 @@ static int hpet_cpuhp_notify(struct notifier_block *n, | |||
722 | /* | 722 | /* |
723 | * Clock source related code | 723 | * Clock source related code |
724 | */ | 724 | */ |
725 | static cycle_t read_hpet(void) | 725 | static cycle_t read_hpet(struct clocksource *cs) |
726 | { | 726 | { |
727 | return (cycle_t)hpet_readl(HPET_COUNTER); | 727 | return (cycle_t)hpet_readl(HPET_COUNTER); |
728 | } | 728 | } |
@@ -756,7 +756,7 @@ static int hpet_clocksource_register(void) | |||
756 | hpet_restart_counter(); | 756 | hpet_restart_counter(); |
757 | 757 | ||
758 | /* Verify whether hpet counter works */ | 758 | /* Verify whether hpet counter works */ |
759 | t1 = read_hpet(); | 759 | t1 = hpet_readl(HPET_COUNTER); |
760 | rdtscll(start); | 760 | rdtscll(start); |
761 | 761 | ||
762 | /* | 762 | /* |
@@ -770,7 +770,7 @@ static int hpet_clocksource_register(void) | |||
770 | rdtscll(now); | 770 | rdtscll(now); |
771 | } while ((now - start) < 200000UL); | 771 | } while ((now - start) < 200000UL); |
772 | 772 | ||
773 | if (t1 == read_hpet()) { | 773 | if (t1 == hpet_readl(HPET_COUNTER)) { |
774 | printk(KERN_WARNING | 774 | printk(KERN_WARNING |
775 | "HPET counter not counting. HPET disabled\n"); | 775 | "HPET counter not counting. HPET disabled\n"); |
776 | return -ENODEV; | 776 | return -ENODEV; |
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index 3475440baa54..c2e0bb0890d4 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c | |||
@@ -129,7 +129,7 @@ void __init setup_pit_timer(void) | |||
129 | * to just read by itself. So use jiffies to emulate a free | 129 | * to just read by itself. So use jiffies to emulate a free |
130 | * running counter: | 130 | * running counter: |
131 | */ | 131 | */ |
132 | static cycle_t pit_read(void) | 132 | static cycle_t pit_read(struct clocksource *cs) |
133 | { | 133 | { |
134 | static int old_count; | 134 | static int old_count; |
135 | static u32 old_jifs; | 135 | static u32 old_jifs; |
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 137f2e8132df..223af43f1526 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -77,6 +77,11 @@ static cycle_t kvm_clock_read(void) | |||
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
79 | 79 | ||
80 | static cycle_t kvm_clock_get_cycles(struct clocksource *cs) | ||
81 | { | ||
82 | return kvm_clock_read(); | ||
83 | } | ||
84 | |||
80 | /* | 85 | /* |
81 | * If we don't do that, there is the possibility that the guest | 86 | * If we don't do that, there is the possibility that the guest |
82 | * will calibrate under heavy load - thus, getting a lower lpj - | 87 | * will calibrate under heavy load - thus, getting a lower lpj - |
@@ -107,7 +112,7 @@ static void kvm_get_preset_lpj(void) | |||
107 | 112 | ||
108 | static struct clocksource kvm_clock = { | 113 | static struct clocksource kvm_clock = { |
109 | .name = "kvm-clock", | 114 | .name = "kvm-clock", |
110 | .read = kvm_clock_read, | 115 | .read = kvm_clock_get_cycles, |
111 | .rating = 400, | 116 | .rating = 400, |
112 | .mask = CLOCKSOURCE_MASK(64), | 117 | .mask = CLOCKSOURCE_MASK(64), |
113 | .mult = 1 << KVM_SCALE, | 118 | .mult = 1 << KVM_SCALE, |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 7a567ebe6361..d57de05dc430 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -699,7 +699,7 @@ static struct clocksource clocksource_tsc; | |||
699 | * code, which is necessary to support wrapping clocksources like pm | 699 | * code, which is necessary to support wrapping clocksources like pm |
700 | * timer. | 700 | * timer. |
701 | */ | 701 | */ |
702 | static cycle_t read_tsc(void) | 702 | static cycle_t read_tsc(struct clocksource *cs) |
703 | { | 703 | { |
704 | cycle_t ret = (cycle_t)get_cycles(); | 704 | cycle_t ret = (cycle_t)get_cycles(); |
705 | 705 | ||
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index d303369a7bad..2b3eb82efeeb 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c | |||
@@ -283,7 +283,7 @@ void __devinit vmi_time_ap_init(void) | |||
283 | /** vmi clocksource */ | 283 | /** vmi clocksource */ |
284 | static struct clocksource clocksource_vmi; | 284 | static struct clocksource clocksource_vmi; |
285 | 285 | ||
286 | static cycle_t read_real_cycles(void) | 286 | static cycle_t read_real_cycles(struct clocksource *cs) |
287 | { | 287 | { |
288 | cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); | 288 | cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); |
289 | return max(ret, clocksource_vmi.cycle_last); | 289 | return max(ret, clocksource_vmi.cycle_last); |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index a2085368a3dc..ca7ec44bafc3 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -663,7 +663,7 @@ static unsigned long lguest_tsc_khz(void) | |||
663 | 663 | ||
664 | /* If we can't use the TSC, the kernel falls back to our lower-priority | 664 | /* If we can't use the TSC, the kernel falls back to our lower-priority |
665 | * "lguest_clock", where we read the time value given to us by the Host. */ | 665 | * "lguest_clock", where we read the time value given to us by the Host. */ |
666 | static cycle_t lguest_clock_read(void) | 666 | static cycle_t lguest_clock_read(struct clocksource *cs) |
667 | { | 667 | { |
668 | unsigned long sec, nsec; | 668 | unsigned long sec, nsec; |
669 | 669 | ||
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index 14f240623497..0a5aa44299a5 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c | |||
@@ -213,6 +213,11 @@ cycle_t xen_clocksource_read(void) | |||
213 | return ret; | 213 | return ret; |
214 | } | 214 | } |
215 | 215 | ||
216 | static cycle_t xen_clocksource_get_cycles(struct clocksource *cs) | ||
217 | { | ||
218 | return xen_clocksource_read(); | ||
219 | } | ||
220 | |||
216 | static void xen_read_wallclock(struct timespec *ts) | 221 | static void xen_read_wallclock(struct timespec *ts) |
217 | { | 222 | { |
218 | struct shared_info *s = HYPERVISOR_shared_info; | 223 | struct shared_info *s = HYPERVISOR_shared_info; |
@@ -241,7 +246,7 @@ int xen_set_wallclock(unsigned long now) | |||
241 | static struct clocksource xen_clocksource __read_mostly = { | 246 | static struct clocksource xen_clocksource __read_mostly = { |
242 | .name = "xen", | 247 | .name = "xen", |
243 | .rating = 400, | 248 | .rating = 400, |
244 | .read = xen_clocksource_read, | 249 | .read = xen_clocksource_get_cycles, |
245 | .mask = ~0, | 250 | .mask = ~0, |
246 | .mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */ | 251 | .mult = 1<<XEN_SHIFT, /* time directly in nanoseconds */ |
247 | .shift = XEN_SHIFT, | 252 | .shift = XEN_SHIFT, |