diff options
-rw-r--r-- | arch/sparc64/kernel/time.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 24681b9b4426..7041146f86f0 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -193,16 +193,22 @@ struct sparc64_tick_ops *tick_ops __read_mostly = &tick_operations; | |||
193 | 193 | ||
194 | static void stick_init_tick(unsigned long offset) | 194 | static void stick_init_tick(unsigned long offset) |
195 | { | 195 | { |
196 | tick_disable_protection(); | 196 | /* Writes to the %tick and %stick register are not |
197 | 197 | * allowed on sun4v. The Hypervisor controls that | |
198 | /* Let the user get at STICK too. */ | 198 | * bit, per-strand. |
199 | __asm__ __volatile__( | 199 | */ |
200 | " rd %%asr24, %%g2\n" | 200 | if (tlb_type != hypervisor) { |
201 | " andn %%g2, %0, %%g2\n" | 201 | tick_disable_protection(); |
202 | " wr %%g2, 0, %%asr24" | 202 | |
203 | : /* no outputs */ | 203 | /* Let the user get at STICK too. */ |
204 | : "r" (TICK_PRIV_BIT) | 204 | __asm__ __volatile__( |
205 | : "g1", "g2"); | 205 | " rd %%asr24, %%g2\n" |
206 | " andn %%g2, %0, %%g2\n" | ||
207 | " wr %%g2, 0, %%asr24" | ||
208 | : /* no outputs */ | ||
209 | : "r" (TICK_PRIV_BIT) | ||
210 | : "g1", "g2"); | ||
211 | } | ||
206 | 212 | ||
207 | __asm__ __volatile__( | 213 | __asm__ __volatile__( |
208 | " rd %%asr24, %%g1\n" | 214 | " rd %%asr24, %%g1\n" |