linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	Feng Tang <feng.tang@intel.com>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: Re: [PATCH] x86/PCI: Convert force_disable_hpet() to standard quirk
Date: Thu, 26 Nov 2020 01:50:39 +0100	[thread overview]
Message-ID: <87lfepj600.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20201125191327.GA653914@bjorn-Precision-5520>

On Wed, Nov 25 2020 at 13:13, Bjorn Helgaas wrote:
> On Wed, Nov 25, 2020 at 01:46:23PM +0100, Thomas Gleixner wrote:
>> Now the more interesting question is why this needs to be a PCI quirk in
>> the first place. Can't we just disable the HPET based on family/model
>> quirks?
>
> You mean like a CPUID check or something?  I'm all in favor of doing
> something that doesn't depend on PCI.

The reason why these are PCI quirks is that the HPET is not part of the
CPU core. It's usually part of 00:00:0 (aka. host bridge) and the legacy
mess which resides there.

OTOH that thing is integrated into the actual chip nowadays and these
quirks are platform quirks, so the CPUID and the PCI vendor/device codes
should be the same for a particular model.

But what do I know. This whole platform/cpuid mess is inpenetrable even
for people who have access to the Intel internal documentation...

But, the point is that HPET does not provide any value on contemporary
CPUs assumed that Intel finally decided that TSC and the TSC deadline
timer are crucial system components along with the ability to get the
correct frequency of these beasts from firmware/cpuid.

So if parts of a particular chip generation, which we can determine by
CPUID (family, model) has issues with HPET, then there is no value in
preserving HPET for the N out of M submodels which are not affected even
if we can differentiate them by the host bridge device id.

But as I said above, what do I know. The Intel wizards which might have
better insight into this should speak up and come forth with objections.

Otherwise I just go and disable HPET support for the CPU models which
are covered by these PCI quirks today.

Ideally we can just disable it for anything more modern as well, but of
course that requires that future devices have proper frequency
enumeration and Intel prevents the OEMs to screw that up with their
"value add" BIOS/SMM machinery. Hope dies last...

Thanks,

        tglx

  reply	other threads:[~2020-11-26  0:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 18:19 [PATCH] x86/PCI: Convert force_disable_hpet() to standard quirk Bjorn Helgaas
2020-11-24 23:27 ` Bjorn Helgaas
2020-11-25 12:46 ` Thomas Gleixner
2020-11-25 19:13   ` Bjorn Helgaas
2020-11-26  0:50     ` Thomas Gleixner [this message]
2020-11-26  1:24   ` Feng Tang
2020-11-26 23:27     ` Thomas Gleixner
2020-11-27  6:11       ` Feng Tang
2020-11-30 19:21         ` Thomas Gleixner
2020-12-01  8:34           ` Feng Tang
2020-12-02  7:28           ` Zhang Rui

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=87lfepj600.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=feng.tang@intel.com \
    --cc=helgaas@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=x86@kernel.org \
    /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).