From: Ingo Molnar <mingo@kernel.org>
To: Feng Tang <feng.tang@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: tglx@lintronix.de, Clemens Ladisch <clemens@ladisch.de>,
tglx@linutronix.de, mingo@elte.hu, hpa@zytor.com,
linux-kernel@vger.kernel.org,
John Stultz <john.stultz@linaro.org>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [RFC PATCH] x86, hpet: Add quirk to disable HPET for baytrail platform
Date: Fri, 18 Apr 2014 10:15:24 +0200 [thread overview]
Message-ID: <20140418081524.GB14560@gmail.com> (raw)
In-Reply-To: <20140418074955.GA3482@feng-snb>
* Feng Tang <feng.tang@intel.com> wrote:
> Hi All,
>
> Please help to review this RFC patch, if you are ok with it. I'll separte them into
> 2 and repost.
> 1. make the boot_hpet_disable extern
> 2. add quirk for baytrail HPET.
> thanks!
>
> - Feng
>
>
>
> From 4b8c370649f1d2b320aa46a005b8b61eb59a539e Mon Sep 17 00:00:00 2001
> From: Feng Tang <feng.tang@intel.com>
> Date: Fri, 18 Apr 2014 15:43:22 +0800
> Subject: [PATCH] x86, hpet: Add quirk to disable HPET for baytrail platform
>
> HPET on current baytrail platform has accuracy problem to be used as
> reliable clocksource/clockevent, so add a early quirk to disable it.
>
> Signed-off-by: Feng Tang <feng.tang@intel.com>
> ---
> arch/x86/include/asm/hpet.h | 1 +
> arch/x86/kernel/early-quirks.c | 14 ++++++++++++++
> arch/x86/kernel/hpet.c | 2 +-
> 3 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h
> index b18df57..36f7125 100644
> --- a/arch/x86/include/asm/hpet.h
> +++ b/arch/x86/include/asm/hpet.h
> @@ -63,6 +63,7 @@
> /* hpet memory map physical address */
> extern unsigned long hpet_address;
> extern unsigned long force_hpet_address;
> +extern int boot_hpet_disable;
> extern u8 hpet_blockid;
> extern int hpet_force_user;
> extern u8 hpet_msi_disable;
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index bc4a088..1e5f6bc 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -17,6 +17,7 @@
> #include <asm/dma.h>
> #include <asm/io_apic.h>
> #include <asm/apic.h>
> +#include <asm/hpet.h>
> #include <asm/iommu.h>
> #include <asm/gart.h>
> #include <asm/irq_remapping.h>
> @@ -380,6 +381,13 @@ static void __init intel_graphics_stolen(int num, int slot, int func)
> }
> }
>
> +static void __init force_disable_hpet(int num, int slot, int func)
> +{
> + boot_hpet_disable = 1;
> + pr_info("Will Disable HPET for this platform\n");
> +}
> +
> +
> #define QFLAG_APPLY_ONCE 0x1
> #define QFLAG_APPLIED 0x2
> #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED)
> @@ -417,6 +425,12 @@ static struct chipset early_qrk[] __initdata = {
> PCI_BASE_CLASS_BRIDGE, 0, intel_remapping_check },
> { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA, PCI_ANY_ID,
> QFLAG_APPLY_ONCE, intel_graphics_stolen },
> + /*
> + * HPET on current version of Baytrail platform has accuracy
> + * problem, disable it for now
> + */
> + { PCI_VENDOR_ID_INTEL, 0x0f00,
> + PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet},
> {}
> };
>
> diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
> index da85a8e..913e207 100644
> --- a/arch/x86/kernel/hpet.c
> +++ b/arch/x86/kernel/hpet.c
> @@ -88,7 +88,7 @@ static inline void hpet_clear_mapping(void)
> /*
> * HPET command line enable / disable
> */
> -static int boot_hpet_disable;
> +int boot_hpet_disable;
> int hpet_force_user;
> static int hpet_verbose;
As long as all those PCI IDs have a buggy HPET, this looks good to me.
hpa, tglx, any preferences?
Thanks,
Ingo
prev parent reply other threads:[~2014-04-18 8:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 2:55 [PATCH v2] x86: hpet: Don't default CONFIG_HPET_TIMER to be y for X86_64 Feng Tang
2014-03-28 7:17 ` Ingo Molnar
2014-03-28 7:37 ` Feng Tang
2014-03-28 8:08 ` Clemens Ladisch
2014-03-28 8:11 ` Ingo Molnar
2014-03-28 8:20 ` Feng Tang
2014-04-15 7:44 ` Feng Tang
2014-04-15 9:00 ` Ingo Molnar
2014-04-15 9:55 ` Feng Tang
2014-04-15 10:42 ` Ingo Molnar
2014-04-15 14:12 ` Feng Tang
2014-04-16 6:51 ` Ingo Molnar
2014-04-18 7:18 ` Feng Tang
2014-04-18 7:49 ` [RFC PATCH] x86, hpet: Add quirk to disable HPET for baytrail platform Feng Tang
2014-04-18 8:15 ` Ingo Molnar [this message]
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=20140418081524.GB14560@gmail.com \
--to=mingo@kernel.org \
--cc=clemens@ladisch.de \
--cc=feng.tang@intel.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@elte.hu \
--cc=tglx@lintronix.de \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).