diff options
Diffstat (limited to 'arch/mips/mti-malta/malta-time.c')
-rw-r--r-- | arch/mips/mti-malta/malta-time.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index 79e5169eabd3..0ad305f75802 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c | |||
@@ -75,6 +75,21 @@ static void __init estimate_frequencies(void) | |||
75 | unsigned int giccount = 0, gicstart = 0; | 75 | unsigned int giccount = 0, gicstart = 0; |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ) | ||
79 | unsigned int prid = read_c0_prid() & 0xffff00; | ||
80 | |||
81 | /* | ||
82 | * XXXKYMA: hardwire the CPU frequency to Host Freq/4 | ||
83 | */ | ||
84 | count = (CONFIG_KVM_HOST_FREQ * 1000000) >> 3; | ||
85 | if ((prid != (PRID_COMP_MIPS | PRID_IMP_20KC)) && | ||
86 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) | ||
87 | count *= 2; | ||
88 | |||
89 | mips_hpt_frequency = count; | ||
90 | return; | ||
91 | #endif | ||
92 | |||
78 | local_irq_save(flags); | 93 | local_irq_save(flags); |
79 | 94 | ||
80 | /* Start counter exactly on falling edge of update flag. */ | 95 | /* Start counter exactly on falling edge of update flag. */ |