diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-05-09 17:56:40 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-09 17:56:40 +0200 |
commit | 5e0e61dd2c89c673f89fb57dcd3cc746dc0c1706 (patch) | |
tree | 5ebe6156cbc8620625b736a5c9f4d3f47e6d9ebc /arch/mips/mti-malta | |
parent | 9b3539e0e545e4c2f338acfc1ce52033a6f5e7f7 (diff) | |
parent | 50c8308538dc9671490d6cb65259ef0ed79f5d13 (diff) |
Merge branch 'next/kvm' into mips-for-linux-next
Diffstat (limited to 'arch/mips/mti-malta')
-rw-r--r-- | arch/mips/mti-malta/Platform | 6 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-time.c | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/arch/mips/mti-malta/Platform b/arch/mips/mti-malta/Platform index 5b548b5a4fc..2cc72c9b38e 100644 --- a/arch/mips/mti-malta/Platform +++ b/arch/mips/mti-malta/Platform @@ -3,5 +3,9 @@ # platform-$(CONFIG_MIPS_MALTA) += mti-malta/ cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta -load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 +ifdef CONFIG_KVM_GUEST + load-$(CONFIG_MIPS_MALTA) += 0x0000000040100000 +else + load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000 +endif all-$(CONFIG_MIPS_MALTA) := $(COMPRESSION_FNAME).bin diff --git a/arch/mips/mti-malta/malta-time.c b/arch/mips/mti-malta/malta-time.c index a144b89cf9b..bc6ac00c0d5 100644 --- a/arch/mips/mti-malta/malta-time.c +++ b/arch/mips/mti-malta/malta-time.c @@ -76,6 +76,21 @@ static void __init estimate_frequencies(void) unsigned int count, start; unsigned int giccount = 0, gicstart = 0; +#if defined (CONFIG_KVM_GUEST) && defined (CONFIG_KVM_HOST_FREQ) + unsigned int prid = read_c0_prid() & 0xffff00; + + /* + * XXXKYMA: hardwire the CPU frequency to Host Freq/4 + */ + count = (CONFIG_KVM_HOST_FREQ * 1000000) >> 3; + if ((prid != (PRID_COMP_MIPS | PRID_IMP_20KC)) && + (prid != (PRID_COMP_MIPS | PRID_IMP_25KF))) + count *= 2; + + mips_hpt_frequency = count; + return; +#endif + local_irq_save(flags); /* Start counter exactly on falling edge of update flag. */ |