From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Wei, Gang" <gang.wei@intel.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>,
Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET
Date: Thu, 15 Oct 2009 19:31:45 -0700 [thread overview]
Message-ID: <4AD7DB11.2070207@goop.org> (raw)
In-Reply-To: <8FED46E8A9CA574792FC7AACAC38FE7714FCC2F556@PDSMSX501.ccr.corp.intel.com>
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
next prev parent reply other threads:[~2009-10-16 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-14 9:26 [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET Wei, Gang
2009-10-14 10:07 ` Keir Fraser
2009-10-14 19:58 ` Jeremy Fitzhardinge
2009-10-15 2:13 ` Wei, Gang
2009-10-15 3:31 ` Wei, Gang
2009-10-15 17:23 ` Jeremy Fitzhardinge
2009-10-16 1:13 ` Wei, Gang
2009-10-16 2:19 ` Wei, Gang
2009-10-16 2:31 ` Jeremy Fitzhardinge [this message]
2009-10-16 2:51 ` Wei, Gang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD7DB11.2070207@goop.org \
--to=jeremy@goop.org \
--cc=gang.wei@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.