[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET


  • To: "Wei, Gang" <gang.wei@xxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
  • From: "Wei, Gang" <gang.wei@xxxxxxxxx>
  • Date: Fri, 16 Oct 2009 10:19:08 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Delivery-date: Thu, 15 Oct 2009 19:20:24 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcpNvDMUBU1ytQ26QECrTK/0zVK1mgAQNI4gAAHssOA=
  • Thread-topic: [Xen-devel] [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET

Wei, Gang wrote:
> Jeremy Fitzhardinge wrote:
>> Well, making disable_hpet() non-static and calling it from Xen setup
>> is the same as appending nohpet to the command line, but less hacky.
> 
> Yes, you are right. I mixed disable_hpet() with hpet_disable(). I
> just try to avoid changes in normal kernel code. If such slight
> change is acceptable, please just make it this way.  

Here is the new patch.

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 9b32c88..366e1e5 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -96,7 +96,7 @@ static int __init hpet_setup(char *str)
 }
 __setup("hpet=", hpet_setup);
 
-static int __init disable_hpet(char *str)
+int __init disable_hpet(char *str)
 {
        boot_hpet_disable = 1;
        return 1;
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 5eeeedb..3774578 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -34,6 +34,10 @@ extern void xen_sysenter_target(void);
 extern void xen_syscall_target(void);
 extern void xen_syscall32_target(void);
 
+#ifdef CONFIG_HPET_TIMER
+extern int __init disable_hpet(char *str);
+#endif
+
 static unsigned long __init xen_release_chunk(phys_addr_t start_addr, 
phys_addr_t end_addr)
 {
        struct xen_memory_reservation reservation = {
@@ -280,6 +284,10 @@ void __init xen_arch_setup(void)
                printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
                disable_acpi();
        }
+#endif 
+
+#ifdef CONFIG_HPET_TIMER
+       disable_hpet(NULL);
 #endif
 
        memcpy(boot_command_line, xen_start_info->cmd_line,

Jimmy

Attachment: pv-dom0-nohpet-v2.patch
Description: pv-dom0-nohpet-v2.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.