linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: baolin.wang7@gmail.com, catalin.marinas@arm.com,
	Will Deacon <will@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: PCI: Validate the node before setting node id for root bus
Date: Thu, 1 Oct 2020 09:55:38 +0100	[thread overview]
Message-ID: <20201001085538.GA5142@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <26284ca5-ea05-0496-629d-9951f49dda8f@linux.alibaba.com>

On Tue, Sep 29, 2020 at 11:41:29PM +0800, Baolin Wang wrote:
> Hi,
> 
> 锟斤拷 2020/9/28 23:23, Lorenzo Pieralisi 写锟斤拷:
> > On Mon, Sep 28, 2020 at 10:49:57PM +0800, Baolin Wang wrote:
> > > On Mon, Sep 28, 2020 at 03:00:55PM +0100, Will Deacon wrote:
> > > > [+ Lorenzo]
> > > > 
> > > > On Tue, Sep 22, 2020 at 06:33:24PM +0800, Baolin Wang wrote:
> > > > > If the BIOS disabled the NUMA configuration, but did not change the
> > > > > proximity domain description in the SRAT table, so the PCI root bus
> > > > > device may get a incorrect node id by acpi_get_node().
> > > > 
> > > > How "incorrect" are we talking here? What actually goes wrong? At some
> > > > point, we have to trust what the firmware is telling us.
> > > 
> > > What I mean is, if we disable the NUMA from BIOS
> > 
> > Please define what this means ie are you removing SRAT from ACPI static
> > tables ?
> 
> Yes.
> 
> > 
> > > but we did not change the PXM for the PCI devices,
> > 
> > If a _PXM maps to a proximity domain that is not described in the SRAT
> > your firmware is buggy.
> 
> Sorry for confusing, that's not what I mean. When the BIOS disable the NUMA
> (remove the SRAT table), but the PCI devices' _PXM description is still
> available, which means we can still get the pxm from acpi_evaluate_integer()
> in this case.

There should not be a _PXM object if the SRAT is not available, that's
a firmware bug.

> So we can get below inconsistent log on ARM platform:
> "No NUMA configuration found
> PCI_bus 0000:00 on NUMA node 0
> ...
> PCI_bus 0000:e3 on NUMA node 1"
> 
> On X86, the pci_acpi_root_get_node() will validate the node before setting
> the node id for root bus. So I think we can add this validation for ARM
> platform. Or anything else I missed?

We are not adding checks because x86 does it, it is certainly to paper
over a firmware bug that you hopefully still have a chance to fix,
let's do that instead of adding code that is not necessary.

Lorenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-01  8:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 10:33 [PATCH] arm64: PCI: Validate the node before setting node id for root bus Baolin Wang
2020-09-28 14:00 ` Will Deacon
2020-09-28 14:49   ` Baolin Wang
2020-09-28 15:23     ` Lorenzo Pieralisi
2020-09-29 15:41       ` Baolin Wang
2020-10-01  8:55         ` Lorenzo Pieralisi [this message]
2020-10-03  9:35           ` Baolin Wang
2020-11-09 12:27             ` Baolin Wang
2020-11-12 17:05               ` Lorenzo Pieralisi

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=20201001085538.GA5142@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=baolin.wang7@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@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).