diff options
Diffstat (limited to 'arch/mips/kernel/cevt-r4k.c')
-rw-r--r-- | arch/mips/kernel/cevt-r4k.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index 07b847d77f5d..02033eaf8825 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -23,7 +23,6 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #ifndef CONFIG_MIPS_MT_SMTC | 25 | #ifndef CONFIG_MIPS_MT_SMTC |
26 | |||
27 | static int mips_next_event(unsigned long delta, | 26 | static int mips_next_event(unsigned long delta, |
28 | struct clock_event_device *evt) | 27 | struct clock_event_device *evt) |
29 | { | 28 | { |
@@ -49,7 +48,6 @@ DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device); | |||
49 | int cp0_timer_irq_installed; | 48 | int cp0_timer_irq_installed; |
50 | 49 | ||
51 | #ifndef CONFIG_MIPS_MT_SMTC | 50 | #ifndef CONFIG_MIPS_MT_SMTC |
52 | |||
53 | irqreturn_t c0_compare_interrupt(int irq, void *dev_id) | 51 | irqreturn_t c0_compare_interrupt(int irq, void *dev_id) |
54 | { | 52 | { |
55 | const int r2 = cpu_has_mips_r2; | 53 | const int r2 = cpu_has_mips_r2; |
@@ -74,6 +72,9 @@ irqreturn_t c0_compare_interrupt(int irq, void *dev_id) | |||
74 | /* Clear Count/Compare Interrupt */ | 72 | /* Clear Count/Compare Interrupt */ |
75 | write_c0_compare(read_c0_compare()); | 73 | write_c0_compare(read_c0_compare()); |
76 | cd = &per_cpu(mips_clockevent_device, cpu); | 74 | cd = &per_cpu(mips_clockevent_device, cpu); |
75 | #ifdef CONFIG_CEVT_GIC | ||
76 | if (!gic_present) | ||
77 | #endif | ||
77 | cd->event_handler(cd); | 78 | cd->event_handler(cd); |
78 | } | 79 | } |
79 | 80 | ||
@@ -118,6 +119,10 @@ int c0_compare_int_usable(void) | |||
118 | unsigned int delta; | 119 | unsigned int delta; |
119 | unsigned int cnt; | 120 | unsigned int cnt; |
120 | 121 | ||
122 | #ifdef CONFIG_KVM_GUEST | ||
123 | return 1; | ||
124 | #endif | ||
125 | |||
121 | /* | 126 | /* |
122 | * IP7 already pending? Try to clear it by acking the timer. | 127 | * IP7 already pending? Try to clear it by acking the timer. |
123 | */ | 128 | */ |
@@ -166,7 +171,6 @@ int c0_compare_int_usable(void) | |||
166 | } | 171 | } |
167 | 172 | ||
168 | #ifndef CONFIG_MIPS_MT_SMTC | 173 | #ifndef CONFIG_MIPS_MT_SMTC |
169 | |||
170 | int __cpuinit r4k_clockevent_init(void) | 174 | int __cpuinit r4k_clockevent_init(void) |
171 | { | 175 | { |
172 | unsigned int cpu = smp_processor_id(); | 176 | unsigned int cpu = smp_processor_id(); |
@@ -206,6 +210,9 @@ int __cpuinit r4k_clockevent_init(void) | |||
206 | cd->set_mode = mips_set_clock_mode; | 210 | cd->set_mode = mips_set_clock_mode; |
207 | cd->event_handler = mips_event_handler; | 211 | cd->event_handler = mips_event_handler; |
208 | 212 | ||
213 | #ifdef CONFIG_CEVT_GIC | ||
214 | if (!gic_present) | ||
215 | #endif | ||
209 | clockevents_register_device(cd); | 216 | clockevents_register_device(cd); |
210 | 217 | ||
211 | if (cp0_timer_irq_installed) | 218 | if (cp0_timer_irq_installed) |