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: catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
	Jonathan.Cameron@huawei.com, baolin.wang7@gmail.com,
	Will Deacon <will@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, 12 Nov 2020 17:05:46 +0000	[thread overview]
Message-ID: <20201112170546.GA26282@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <fd8b8138-c3f8-59f6-d57f-704ef5d28d46@linux.alibaba.com>

[+Jonathan]

On Mon, Nov 09, 2020 at 08:27:09PM +0800, Baolin Wang wrote:

[...]

> I did some investigation for this issue. I am sorry I made some
> misleading description in the commit message. The issue is, when we
> want to disable the NUMA from firmware, we usually just remove the SRAT
> table from the BIOS. But the devices' proximity domain information is
> still remain in the ACPI tables.

I understand and it should not.

> For example, the IORT table still contains the proximity domain
> information for the SMMU devices, so in this case, the SMMU devices still
> can get incorrect NUMA nodes if we remove the SRAT table. But
> the SMMU devices will validate the numa node in
> arm_smmu_v3_set_proximity() to avoid this issue.
> 
> static int  __init arm_smmu_v3_set_proximity(struct device *dev,
> 					      struct acpi_iort_node *node)
> {
> 	struct acpi_iort_smmu_v3 *smmu;
> 
> 	smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
> 	if (smmu->flags & ACPI_IORT_SMMU_V3_PXM_VALID) {
> 		int dev_node = pxm_to_node(smmu->pxm);
> 
> 		if (dev_node != NUMA_NO_NODE && !node_online(dev_node))
> 			return -EINVAL;
> 
> 		set_dev_node(dev, dev_node);
> 		pr_info("SMMU-v3[%llx] Mapped to Proximity domain %d\n",
> 			smmu->base_address,
> 			smmu->pxm);
> 	}
> 	return 0;
> }
> 
> So similar with SMMU devices, the DSDT table will still contain the PCI
> root host devices' proximity domain though we already remove the SRAT
> table. So I think we still need this validation in
> pcibios_root_bridge_prepare() to avoid this issue like other devices did.
No. The right thing to do is to fix the PXM handling and that's what
Jonathan did:

https://lore.kernel.org/linux-mm/20200818142430.1156547-2-Jonathan.Cameron@huawei.com

Can you try booting with v5.10-rc* and report back the *full* boot log
please ?

> I can update the commit message in next version if you think this is
> reasonable. Thanks.

See above.

Thanks,
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-11-12 17:06 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
2020-10-03  9:35           ` Baolin Wang
2020-11-09 12:27             ` Baolin Wang
2020-11-12 17:05               ` Lorenzo Pieralisi [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=20201112170546.GA26282@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=Jonathan.Cameron@huawei.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).