diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-04-15 08:40:12 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-04-15 08:40:12 +0100 |
commit | e2d6c4bd8adb3e8a87590c2815bb3f648af312db (patch) | |
tree | 0beb43439448eaa322188c522d3428c1ccfa8329 | |
parent | b7bcf6c3bec7e75fc18b6bf078c2fbc1441e0d50 (diff) | |
download | xen-e2d6c4bd8adb3e8a87590c2815bb3f648af312db.tar.gz xen-e2d6c4bd8adb3e8a87590c2815bb3f648af312db.tar.bz2 xen-e2d6c4bd8adb3e8a87590c2815bb3f648af312db.zip |
x86: Disable cpuidle by default unless hpet broadcast is available.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r-- | xen/arch/x86/setup.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/time.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 5da0b33039..8f2e5eedd4 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -89,7 +89,7 @@ boolean_param("noapic", skip_ioapic_setup); /* **** Linux config option: propagated to domain0. */ /* xen_cpuidle: xen control cstate. */ -/*static*/ int xen_cpuidle = 1; +/*static*/ int xen_cpuidle = -1; boolean_param("cpuidle", xen_cpuidle); int early_boot = 1; diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index ffe90ed1b9..b44871e139 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1279,8 +1279,17 @@ static int disable_pit_irq(void) hpet_broadcast_init(); if ( !hpet_broadcast_is_available() ) { - printk("HPET broadcast init failed, turn to PIT broadcast.\n"); - return 0; + if ( xen_cpuidle == -1 ) + { + xen_cpuidle = 0; + printk("CPUIDLE: disabled due to no HPET. " + "Force enable with 'cpuidle'.\n"); + } + else + { + printk("HPET broadcast init failed, turn to PIT broadcast.\n"); + return 0; + } } } |