diff options
-rw-r--r-- | arch/mips/Kconfig | 12 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-time.c | 14 |
2 files changed, 8 insertions, 18 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 5cd695f905a1..5e0014e864f3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1756,14 +1756,14 @@ config KVM_GUEST | |||
1756 | help | 1756 | help |
1757 | Select this option if building a guest kernel for KVM (Trap & Emulate) mode | 1757 | Select this option if building a guest kernel for KVM (Trap & Emulate) mode |
1758 | 1758 | ||
1759 | config KVM_HOST_FREQ | 1759 | config KVM_GUEST_TIMER_FREQ |
1760 | int "KVM Host Processor Frequency (MHz)" | 1760 | int "Count/Compare Timer Frequency (MHz)" |
1761 | depends on KVM_GUEST | 1761 | depends on KVM_GUEST |
1762 | default 500 | 1762 | default 100 |
1763 | help | 1763 | help |
1764 | Select this option if building a guest kernel for KVM to skip | 1764 | Set this to non-zero if building a guest kernel for KVM to skip RTC |
1765 | RTC emulation when determining guest CPU Frequency. Instead, the guest | 1765 | emulation when determining guest CPU Frequency. Instead, the guest's |
1766 | processor frequency is automatically derived from the host frequency. | 1766 | timer frequency is specified directly. |
1767 | 1767 | ||
1768 | choice | 1768 | choice |
1769 | prompt "Kernel page size" | 1769 | prompt "Kernel page size" |
diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index 319009912142..3778a359f3ad 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c | |||
@@ -74,18 +74,8 @@ static void __init estimate_frequencies(void) | |||
74 | unsigned int giccount = 0, gicstart = 0; | 74 | unsigned int giccount = 0, gicstart = 0; |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ) | 77 | #if defined(CONFIG_KVM_GUEST) && CONFIG_KVM_GUEST_TIMER_FREQ |
78 | unsigned int prid = read_c0_prid() & (PRID_COMP_MASK | PRID_IMP_MASK); | 78 | mips_hpt_frequency = CONFIG_KVM_GUEST_TIMER_FREQ * 1000000; |
79 | |||
80 | /* | ||
81 | * XXXKYMA: hardwire the CPU frequency to Host Freq/4 | ||
82 | */ | ||
83 | count = (CONFIG_KVM_HOST_FREQ * 1000000) >> 3; | ||
84 | if ((prid != (PRID_COMP_MIPS | PRID_IMP_20KC)) && | ||
85 | (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) | ||
86 | count *= 2; | ||
87 | |||
88 | mips_hpt_frequency = count; | ||
89 | return; | 79 | return; |
90 | #endif | 80 | #endif |
91 | 81 | ||