[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
On 10/15/09 19:19, Wei, Gang wrote: > 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 > It would be better to add #else static inline int disable_hpet(char *str) { return 0; } #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 > and do without the #ifdef here. Also, it wouldn't hurt to put a small explanatory message here. J _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |