Re: [PATCH] x86: HPET force enable for Soekris net6501

Thomas Gleixner
2014-09-12T10:38:00Z

On Fri, 12 Sep 2014, Eric Sesterhenn wrote:
> On 09/09/2014 05:26 PM, H. Peter Anvin wrote:
> > On 09/09/2014 07:54 AM, Thomas Gleixner wrote:
> >>
> >> @hpa: You asked whether this might affect any other e6xx devices.
> >>
> >> According to the atom e6xx-series datasheet the HPET is non optional
> >> and always memory mapped to 0xfed00000. I don't see how that would
> >> harm any machine which has the hpet proper advertised via ACPI.
> >>
> >
> > That seems straightforward then.
>
> this means the original patch written by Conrad is going to be applied?
> Is there anything we can do to help regarding this issue?

Yes, it needs some massaging.

> Subject: [PATCH] x86: HPET force enable for Soekris net6501

This change is not soekris specific. It enables the force mechanism
for all e6xx based systems.

> Original patch by Peter Neubauer, slightly modified by me.
> -> http://www.mail-archive.com/soekris-tech@lists.soekris.com/msg06462.html

> Signed-off-by: Peter Neubauer <pneubauer@bluerwhite.org>

I can't see a SOB from Peter in his post on the soekris list, but he's
clearly the original author. So the patch is missing a From: .... line
at the top of the mail body.

> Signed-off-by: Conrad Kostecki <ck@conrad-kostecki.de>

--- a/arch/x86/kernel/quirks.c 2014-02-14 11:13:27.703432732 +0100
+++ b/arch/x86/kernel/quirks.c 2014-02-14 11:14:32.327496474 +0100
@@ -498,6 +498,25 @@ void force_hpet_resume(void)
}

> /*
> + * Soekris net6501, based on Atom E6xx series, does not have ACPI.
> + * HPET should be force enabled on such platforms.
> + */

Again this is not soekris specific. We rather want an explanation WHY
it is safe to do so, e.g. something like:

/*
* According to datasheet e6xx systems have the HPET hardwired to
* 0xfed00000
*/

That's the information we need and which avoids questions about the
correctness of the approach. Its clear that ACPI did not populate HPET
if hpet_address is 0.

> +static void e6xx_force_enable_hpet(struct pci_dev *dev)
> +{
> + if (hpet_address || force_hpet_address)
> + return;
> +
> + force_hpet_address = 0xFED00000;
> + force_hpet_resume_type = NONE_FORCE_HPET_RESUME;
> + dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at "
> + "0x%lx\n", force_hpet_address);
> + return;
> +}
> +

Remove the new line please.

> +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E6XX_CU,
> + e6xx_force_enable_hpet);

Thanks,

tglx