From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32CF3C56201 for ; Thu, 12 Nov 2020 17:06:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A72B020709 for ; Thu, 12 Nov 2020 17:06:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="3TEhuMRO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A72B020709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VgtfxDy5hZmahH4GPzPMI1z6K3RoMnhTQNXhsl9nx9Y=; b=3TEhuMRO8zQ474ZY0lwASECL2 gIvy/AQtZuXAerv18ydCgI1jYLkweQo+XSoBIbZuBL/eB3sNHSU7nVCXE4425/rklUWrKSdpy/FZJ HVgNhjp/l702pEU4CnkqqCfdGylEDPUyh3Zq521Hwoeg3VNQFA5P6KA1GaFE96lMhQr/Ysv8KigqJ 722XRZrQZiq8qV/j+y3j7dxgASmKuV94t23iwWYtl2oZUnLqya6SkbBA7wiqRQPtxukCoj05+6CA7 6okrBGySBF3Sw6SNTmfPTWks5yz9rKdpRlns//nPgUjdyju/bTBO++6VfOG/urgYQFzpVbdOeeGMF oHli3d6oA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdG2r-0003GP-8M; Thu, 12 Nov 2020 17:06:01 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdG2n-0003Fd-Vz for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 17:05:59 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DD6F139F; Thu, 12 Nov 2020 09:05:53 -0800 (PST) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8D8543F73C; Thu, 12 Nov 2020 09:05:52 -0800 (PST) Date: Thu, 12 Nov 2020 17:05:46 +0000 From: Lorenzo Pieralisi To: Baolin Wang Subject: Re: [PATCH] arm64: PCI: Validate the node before setting node id for root bus Message-ID: <20201112170546.GA26282@e121166-lin.cambridge.arm.com> References: <1600770804-116365-1-git-send-email-baolin.wang@linux.alibaba.com> <20200928140054.GA11500@willie-the-truck> <20200928144957.GA90366@VM20190228-100.tbsite.net> <20200928152326.GA15640@e121166-lin.cambridge.arm.com> <26284ca5-ea05-0496-629d-9951f49dda8f@linux.alibaba.com> <20201001085538.GA5142@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_120558_121608_B811A99D X-CRM114-Status: GOOD ( 19.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, linux-kernel@vger.kernel.org, Jonathan.Cameron@huawei.com, baolin.wang7@gmail.com, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [+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