From patchwork Tue Mar 19 12:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 13596614 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2063.outbound.protection.outlook.com [40.107.244.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C610C7F480; Tue, 19 Mar 2024 12:00:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849655; cv=fail; b=jxdObHRpwF4Ac93Kf0XintfUb52FUOMTCiprRhrMIngjS1huOWhpONv1SrNhGdXvA0RgqOdt3nRq3OLzaAVP9kKXIcWKn0AiXmjy2TiQsd/OJuBnz83RWHE0LC8eBeFG0uEH2R405J7J3jGIWqnLpbXR1PbeH4Fr4mGPuXPqjLw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849655; c=relaxed/simple; bh=jXOOtK2+vCx6xjiIExgzIAHy/1O++JBXYB0f8C05tM4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qSWm+71At4X7MxGarfgcnsbpWQaNmFkpBzAn8LdEIiJ1D8cEcSnriaCxyaL8wyGOvzBBsfjk4ot7y42L6TtuLfaRAS3zhmmds2xjbxF+IVpO/Tql2mJdjzG5ulUAZ9AIMBn7G0YU38Hv2UFd33GK3xrcPOMCrRnbRSoY6h6LBVk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=VoHAIdJ9; arc=fail smtp.client-ip=40.107.244.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="VoHAIdJ9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nQrRa+jyG74MOx4tsxve9kAIVgwAYJAZOPdPos3Ir9e5B0AdJ0NtPDTwPkOEFQm9K9YAqHAQ2sFeDbFrMw/ImBvyrpKTXlYWG6F/wjDmps+cJqX9SNFh/rUOMsYK6V1kpS0X8Ui95YR9J/H423FVO0/HxwJEuJYw84QTh09Wqiys62VczvyhjBgxsZSjPOyCo5E547QsfiN+9UOuAF0iPiU0qRtWy7p6LlgreT8J9OayidrsdoXr0jYZko78hAjCbqEL6A9ioebEZcRRsLYOIjjDKOzgGf+iaDMCMYmG21oHEJ8c0i+wwIf3nMiDvHoWc69uUoOnqSrnH+R4TrcdLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y9j2IkI+5IZXKPenT2L9vuY4Na/KtvP6/SeBk0zyXrU=; b=UAU0ByhGNV586gjBspHreDOj7Hbnrt3gVR0EZMSPPuLiSPPvWCdFpIsSvxPV27RjRyGg9ERQ0IGt1iaNsrW1Crh4MPZ9ss9dl9YvWXxKz+8qUPvRjH33CXSmfuZTsX7BwjLNaKilFZJfyOVZ/r627pFv+DEn3A538nV5P0HWBabgwuPOgwwgO88/ndbLrsVWtwAQ2xozG2d0feVY0e/FOFrmPT/0H9ieHZTKqZHE7u326ZnLP3+i15UcpKu/Kq55d9arJaCRCZ1SgPpcsgwxu2UirWk9SoIWwb2UzXq25R9BnRZMQ2HO64Cw84GkRyKijA8BJIPdc1MeoglnEu6i+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y9j2IkI+5IZXKPenT2L9vuY4Na/KtvP6/SeBk0zyXrU=; b=VoHAIdJ9Mjq3JHQ638QJthgQtCeP8Z+pyc6lyIoQSuuYFKo/d/kxK7ykUlkmGuQPsqr5ifr15Bbcfz8nafOFacd4NvblJLrvd9D0YJB/T0wa6GB4a5yTcjl1CyqwTD4dahQI8c5Oyi88wWfNZgr2vLqxTTxyWPKD/OExBq9LtwI= Received: from CH2PR18CA0050.namprd18.prod.outlook.com (2603:10b6:610:55::30) by CY5PR12MB6249.namprd12.prod.outlook.com (2603:10b6:930:23::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 12:00:51 +0000 Received: from CH1PEPF0000AD82.namprd04.prod.outlook.com (2603:10b6:610:55:cafe::2b) by CH2PR18CA0050.outlook.office365.com (2603:10b6:610:55::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.37 via Frontend Transport; Tue, 19 Mar 2024 12:00:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000AD82.mail.protection.outlook.com (10.167.244.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 19 Mar 2024 12:00:51 +0000 Received: from rric.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 19 Mar 2024 07:00:47 -0500 From: Robert Richter To: "Rafael J. Wysocki" , Dave Hansen , Andy Lutomirski , "Peter Zijlstra" , Thomas Gleixner , "Ingo Molnar" , Borislav Petkov , , Dan Williams , Alison Schofield CC: , , , Robert Richter , Derick Marks , "H. Peter Anvin" Subject: [PATCH v2 1/3] x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks() Date: Tue, 19 Mar 2024 13:00:23 +0100 Message-ID: <20240319120026.2246389-2-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240319120026.2246389-1-rrichter@amd.com> References: <20240319120026.2246389-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD82:EE_|CY5PR12MB6249:EE_ X-MS-Office365-Filtering-Correlation-Id: 58e168c4-7a82-47b1-0dbf-08dc480c3948 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AHeDJpDiWBzuva+pX4jncPCZsSRga4SDefDWpg88v1NQAlsmIgF1hGWVCopDyghd/g78yxj3M5g3fdujGOBhFyYK47pOh1t9vrOjMg2x+RB4NSO7Ncn7/yRM6BGtheNJJQyvk5etwNJaR3mOqn7w+/FMJE5+WNKOqBX+egTJqu7fXkk4WmNJw34i2sL1itHpbAcGQ8qSlS/MWTP4n3MqdzWr5PSi46BN4+CCBRun9b54k8i0dr4477Z71Ce/6KTJ0RCInWG/qe6fzsuNNpnV/Wac0SMq0fxxbzvNLfbVBTyv+0AFzb2zeASWKpbGZB8u/TyCLWaGDGqT3idMZGIgcCSIuL2iY43rsJ4bbmqkfUEf5KS6Fp3PEqK9JRaxaJKDaWLPROt2y1eSG1EaYWIhEq/8lpEYC6kEp4LT4jYC4afk4URDaFYRaBPUdR441mWrz/JTpkDkLBXDWlfoPoe7+QoXySozTHzHN5WvuYCm+b8ONqqBMfvRAV3Qw74uJ68k5LA0BQ7LE1YruCNfVmaqERYja3NJCej0Lo42Rz3fZizFhHtYs1ko5B8PSyEMpe5r1gAdXA4fI4Gp/mHl6iY9RdBlb+h1X9NDsMYaWJKzes0vdfseuNcvoKyu4/ArR9XF58fOs9avUC9siQODxiLY80TgAiTI56GDg+SjRSJd0slx1Ak87DvqxfViHdmqGUbREkvrlusk2XvfMjR49bd0APWcHf0tRes0iEDxl9p/tbS51oG+WBwKKvc/jBhpHtT0OUfta/l1ljHj9hhRaSSRug== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(36860700004)(376005)(82310400014)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2024 12:00:51.6973 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 58e168c4-7a82-47b1-0dbf-08dc480c3948 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD82.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6249 For configurations that have the kconfig option NUMA_KEEP_MEMINFO disabled, the SRAT lookup done with numa_fill_memblks() fails returning NUMA_NO_MEMBLK (-1). An existing SRAT memory range cannot be found for a CFMWS address range. This causes the addition of a duplicate numa_memblk with a different node id and a subsequent page fault and kernel crash during boot. numa_fill_memblks() is implemented and used in the init section only. The option NUMA_KEEP_MEMINFO is only for the case when NUMA data will be used outside of init. So fix the SRAT lookup by moving numa_fill_memblks() out of the NUMA_KEEP_MEMINFO block to make it always available in the init section. Note that the issue was initially introduced with [1]. But since phys_to_target_node() was originally used that returned the valid node 0, an additional numa_memblk was not added. Though, the node id was wrong too. [1] fd49f99c1809 ("ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT") Fixes: 8f1004679987 ("ACPI/NUMA: Apply SRAT proximity domain to entire CFMWS window") Cc: Derick Marks Cc: Dan Williams Cc: Alison Schofield Signed-off-by: Robert Richter --- arch/x86/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 65e9a6e391c0..ce84ba86e69e 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -929,6 +929,8 @@ int memory_add_physaddr_to_nid(u64 start) } EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); +#endif + static int __init cmp_memblk(const void *a, const void *b) { const struct numa_memblk *ma = *(const struct numa_memblk **)a; @@ -1001,5 +1003,3 @@ int __init numa_fill_memblks(u64 start, u64 end) } return 0; } - -#endif From patchwork Tue Mar 19 12:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 13596615 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2076.outbound.protection.outlook.com [40.107.220.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65D0B7FBA5; Tue, 19 Mar 2024 12:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849661; cv=fail; b=bijMMOLuBFVjTngckHSqe14OT1E4/pbC1MBCViVokme9K8DMJx5faXbOaVtgyEGdvuKgAd5aNx/eJy67YaQjU28AZKKLXdbyYpn9EQgYBenb6PQJts8/eq1PrYvLdZWNa7YfAbfLu6nYMQ7Rm4hdmDC8RLhIxIdkQWhlERbx7JI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849661; c=relaxed/simple; bh=l2m1bnbrTTCkx/CENgd0NhaNMcXWzJYKNa6R76senbw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lqoLDgZ9VDnI2ViZnpvROQCmwRcA2fieuTpTqsScSmnp60Ce3TnKyI71s3CxRAa4n/FCLz6X35zZVNRtI8P8loToOdTmRzDlEy3D5TzJ2NPmUbfVIeqfkJxvnwdCLA2rqFFwcqQZQ0Fs5wxNuX+GrKBNA/irqpavSIo/taqQeQw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=ysP0sa9u; arc=fail smtp.client-ip=40.107.220.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="ysP0sa9u" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PsAgywPsKNS+7+uQFG6jgXrSgOpq9dzBcR9XJMQBzzy5jCmYlhNIBnJ8oq/MsAU9Mzpp1RI3jraSw0QTTQbBk3OXeK8CxQz0jVXe8qVaUPk8PKTwHKhkzXBZyysm2qDBalOaKPpfxV97Inm3ei81A/i49CvtY2L3m6h0urady7cg0zK31VU7vx3nVdmDMoXQAWxkgiEQdvLIkeX62ystPe9LeBRkOTLN1TxqokGpybqoFlkSkWkyCjRVA0g9XsBUekPe3NbLIkDXpwJdUo622vdUyfL1dZqyYuCeVrmKdoZGtqiE2wUFEDBY/++fNLpPcHfF4y1QfcDwxTVkD6itrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0EBbmY+EBezwVQPkDMJqdiHHAQP3kBoX9VkXI55EaPg=; b=PX2+4+Zpftg7QYq0u1Ymp3vj4+beHHNNRGJkCg2XqZ8LbznWGUCBYTrKnthYU4M4qE/PXAFo2LR+CYVrcQOEKnFmlVsGZUJGo5K/NkeiTWFzyEF6fc5PjhEjZUvhbbpFuJqptnPlLrhp64t6nE22xoVQRzVw+CLFjANgVA70lfdtATZpM4yseW/XDZxE8XsPZJaMYXFTmdUcCL0jIvNoWYNPsnAZZS2gHdDmsihLxdhJ9NaMOG+G2ILbqBZTIe/OZEDh4hQSeOCPWZ+54fMTQ4s3zE559pPfCPF9Wmy6ZhMcLgGTwr3jYceLvVFr4vvhtEUBley+dDyS9ECpNLIkPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0EBbmY+EBezwVQPkDMJqdiHHAQP3kBoX9VkXI55EaPg=; b=ysP0sa9ufmji8KvjnnBlmDY+FesBKF+z2gQhzpErEnvKeWNhFPz4jsZBhoYBa5+OkCEp1EmX4OAh/iB9DxAvASsSX+nwrWokOgWrQFzrylPs04loCPD4ltAqCEroHA/RlEP5m+k2n2PVPoVb7HcBGIeupze4iOCY0RZgUIc7NQ8= Received: from CH5PR05CA0021.namprd05.prod.outlook.com (2603:10b6:610:1f0::18) by PH0PR12MB8030.namprd12.prod.outlook.com (2603:10b6:510:28d::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.30; Tue, 19 Mar 2024 12:00:55 +0000 Received: from CH1PEPF0000AD7F.namprd04.prod.outlook.com (2603:10b6:610:1f0:cafe::40) by CH5PR05CA0021.outlook.office365.com (2603:10b6:610:1f0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.12 via Frontend Transport; Tue, 19 Mar 2024 12:00:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000AD7F.mail.protection.outlook.com (10.167.244.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 19 Mar 2024 12:00:54 +0000 Received: from rric.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 19 Mar 2024 07:00:52 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v2 2/3] ACPI/NUMA: Print CXL Early Discovery Table (CEDT) Date: Tue, 19 Mar 2024 13:00:24 +0100 Message-ID: <20240319120026.2246389-3-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240319120026.2246389-1-rrichter@amd.com> References: <20240319120026.2246389-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD7F:EE_|PH0PR12MB8030:EE_ X-MS-Office365-Filtering-Correlation-Id: 390452fe-fc47-44f1-0be4-08dc480c3b18 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8jHezV6S0pOMyf+NMZj72yV3VNLupamX0guELmnLLMJn8dLz5+IfxFzLeka7lmUXNUFQ6qKEGz7BLM0ePDFgM3P05i9dDObIiYgLN/HhOoHkdnNXpb5dSgUMhvythtO0vWl3d+hhrleHhV1ZW0VLArtNCYV3vpc9Jh7srv0ZM2o0n3W0dUF924UhlnpOZ5Dv5UwIvYvu4tLzJUl0lQ7gZzfXKzSjedMClLHB5lrg4Q3y+yE9iqiejZC0KRp02Jtwl2844AlUO9c9R1sXIReX19+XMXSQGqaAjBuNFDJIlX1EVYvqCeOG93VeQwI875UhmccJ9ONDs1w8QOlYyT3YSve1NeqnyL4crkfts5fSXBDwoJ2KrUYhSZdDBh0cqswE3If4iKMm11stYWe/KktdxzR3ZfjZ00zc4ruBdt4iQlxkRGnmeDIVbOlqEq2Jk7frNez+aKSMMin0yMaGDGN0Cbs0EfzbXvUCaXd2GGKMCY77SxhmhqSiDWCdVpDfnoOOtcsDqcBaiZ7jmrYZ0sv5E9R9i/Jiu4huDvaKDkYBzORdt9yveSUtKWaeLVndAEGD/3Lt6/rUYlTehZVeC3lCGydR8NZ8YWVp/WRQohtg7NMvQiCjDO3tbcnJ5BFcwHIisKnJTKf/O/afOpxqyXl5gKhTUaZCF3DlcVyuOMvWoLTq2AOGU3u2zpMSlenZZufn8VBL9yKEk5JybIBVemO3eSFBjVHp2NX6h6cED41nRc6jnoLK2Ol+sTJ/CkP2LGyi X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(1800799015)(376005)(36860700004)(82310400014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2024 12:00:54.7381 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 390452fe-fc47-44f1-0be4-08dc480c3b18 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD7F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8030 The CEDT contains similar entries as the SRAT. For diagnostic reasons print the CEDT same style as the SRAT. Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 112 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index e45e64993c50..50ae8557e8d1 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -300,6 +300,114 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) return -EINVAL; } +static int __init +__acpi_table_print_cedt_entry(union acpi_subtable_headers *__header, + void *arg, const unsigned long table_end) +{ + struct acpi_cedt_header *header = (struct acpi_cedt_header *)__header; + + switch (header->type) { + case ACPI_CEDT_TYPE_CHBS: + { + struct acpi_cedt_chbs *p = + (struct acpi_cedt_chbs *)header; + + if (header->length < sizeof(struct acpi_cedt_chbs)) { + pr_warn("CEDT: unsupported CHBS entry: size %d\n", + header->length); + break; + } + + pr_info("CEDT: CHBS (0x%llx length 0x%llx uid %lu) %s (%d)\n", + (unsigned long long)p->base, + (unsigned long long)p->length, + (unsigned long)p->uid, + (p->cxl_version == ACPI_CEDT_CHBS_VERSION_CXL11) ? + "cxl11" : + (p->cxl_version == ACPI_CEDT_CHBS_VERSION_CXL20) ? + "cxl20" : + "unsupported version", + p->cxl_version); + } + break; + case ACPI_CEDT_TYPE_CFMWS: + { + struct acpi_cedt_cfmws *p = + (struct acpi_cedt_cfmws *)header; + int eiw_to_ways[] = {1, 2, 4, 8, 16, 3, 6, 12}; + int targets = -1; + + if (header->length < sizeof(struct acpi_cedt_cfmws)) { + pr_warn("CEDT: unsupported CFMWS entry: size %d\n", + header->length); + break; + } + + if (p->interleave_ways < ARRAY_SIZE(eiw_to_ways)) + targets = eiw_to_ways[p->interleave_ways]; + if (header->length < struct_size( + p, interleave_targets, targets)) + targets = -1; + + pr_info("CEDT: CFMWS (0x%llx length 0x%llx) with %d target%s", + (unsigned long long)p->base_hpa, + (unsigned long long)p->window_size, + targets, targets > 1 ? "s" : ""); + for (int i = 0; i < targets; i++) + pr_cont("%s%lu", i ? ", " : " (", + (unsigned long)p->interleave_targets[i]); + pr_cont("%s%s%s%s%s%s\n", + targets > 0 ? ")" : "", + (p->restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE2) ? + " type2" : "", + (p->restrictions & ACPI_CEDT_CFMWS_RESTRICT_TYPE3) ? + " type3" : "", + (p->restrictions & ACPI_CEDT_CFMWS_RESTRICT_VOLATILE) ? + " volatile" : "", + (p->restrictions & ACPI_CEDT_CFMWS_RESTRICT_PMEM) ? + " pmem" : "", + (p->restrictions & ACPI_CEDT_CFMWS_RESTRICT_FIXED) ? + " fixed" : ""); + } + break; + case ACPI_CEDT_TYPE_CXIMS: + { + struct acpi_cedt_cxims *p = + (struct acpi_cedt_cxims *)header; + + if (header->length < sizeof(struct acpi_cedt_cxims)) { + pr_warn("CEDT: unsupported CXIMS entry: size %d\n", + header->length); + break; + } + + pr_info("CEDT: CXIMS (hbig %u nr_xormaps %u)\n", + (unsigned int)p->hbig, + (unsigned int)p->nr_xormaps); + } + break; + default: + pr_warn("CEDT: Found unsupported entry (type = 0x%x)\n", + header->type); + break; + } + + return 0; +} + +static void __init acpi_table_print_cedt_entry(enum acpi_cedt_type id) +{ + acpi_table_parse_cedt(id, __acpi_table_print_cedt_entry, NULL); +} + +static void __init acpi_table_print_cedt(void) +{ + /* Print only implemented CEDT types */ + acpi_table_print_cedt_entry(ACPI_CEDT_TYPE_CHBS); + acpi_table_print_cedt_entry(ACPI_CEDT_TYPE_CFMWS); + acpi_table_print_cedt_entry(ACPI_CEDT_TYPE_CXIMS); +} + static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, void *arg, const unsigned long table_end) { @@ -341,6 +449,7 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, return 0; } #else +static inline void acpi_table_print_cedt(void) {} static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, void *arg, const unsigned long table_end) { @@ -526,6 +635,9 @@ int __init acpi_numa_init(void) /* SLIT: System Locality Information Table */ acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit); + /* CEDT: CXL Early Discovery Table */ + acpi_table_print_cedt(); + /* * CXL Fixed Memory Window Structures (CFMWS) must be parsed * after the SRAT. Create NUMA Nodes for CXL memory ranges that From patchwork Tue Mar 19 12:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 13596616 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2054.outbound.protection.outlook.com [40.107.223.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 013A17FBA6; Tue, 19 Mar 2024 12:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849661; cv=fail; b=KI2aQ0d7Z5eV5aZ/US96tyH0oTFdJ/1T32LLk1Uuxqe2huF6D17DQ3w30SUBuoyFR1GwK4shS7E+J3zSkgjCm7aowFgFmIp5qwitqB62zsxVngirdHJX81lESMN87UYZkQy89bhKuZ/GjD6D2KdQhqQYMgb5asR5o3uMBzgwUow= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710849661; c=relaxed/simple; bh=KNZGmdsVCrLf3seRR2GfWIW1FELjR4OvC92jm/nXvNg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aJdg+wgc6ygkq+8ggKtrpxsa7iH1XzlvWq84ahpgeJTpjR78XVwv80FfdmWssNGi1EuTdD7A5TgDu96G6yWS5dEcXWdDke5e2Uto/VtGH1tlJjDhAsp3OiBQs8N/nw64v1cXdMUcFLElFgS1OYxyqxyldhPpJ1VWk3l3px14D60= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=GKnI6DPX; arc=fail smtp.client-ip=40.107.223.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="GKnI6DPX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YY/qIbtqGsBZshVVhghDdMn0TZ5IY/TuAi9PbjVZAfISOwb8aucv9vANCh14q4IJxFVw+ii+5Yt1uS2kf0gHDm2sQhIhzh4EBGwckOzTqiDNk3gdY8rDtcBOc8RtxiBqTAGpTY+OkidmVlrDdqehf5J24CwOYrt/MSXNiVfitIfzSmVaLEw2vwTUhb6d43wzIFK8k2fwgmuI+Nc+34rQkgj3aj/adspPrtRF9d3GKgCNcJWnjcypeBxWWYIfIAgcFn4drxJlivbQMYQoK3qrY+29n7/tkwegBM5a/LmGXIpDSYanHteU9utkkC5BNkPGobZJ8vVWaMxhTwoEa3ynmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wDxjGRs+Pnxp2qPVtzcKnQXIHHdNTBtT0ek0PmSYo4U=; b=BKe+ulz22RQMyVnYPTV1gh8oMAb61dvQA8tZWx/+fNbCh3W3ocj15BldTefxTpaNwjbD/JkgLRRDrb6kj02D/7D6mWE22/2zQYcKEvx8xGCHfIPxhzOQ2y8TxlD4UjU8rpMUK5DohJeAh+ry8tWnJbG2co6Dux6s17vO5ooP001zapcZkIj0GHWMFBlAV1reJaURiKJrwFiISIFrG1oyWe7jgI2CI1lh3m/4h1m/A0RxM1RjLU+MwK46sx3E2ihkW4lcRyW/gqmxzyWss26nflDF26qlme7nx+KaCegGT26sEUziLThEg+3g4xG5TgHZEF/Gt05P6+fM6JFubTWbMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wDxjGRs+Pnxp2qPVtzcKnQXIHHdNTBtT0ek0PmSYo4U=; b=GKnI6DPXNGbE0+65P+ZdLJEImLR9vi8Uo1BsluoTTLJnbb6MB60IVWetfoys7SkT92dbTNkAAt3x/vQdDPxy2S7wtL9bFFMHsqN+wfuIbG7VVpAGPsM5q0mcr7p/Ii4KDePHbHclvTtLocIX0OCjFay5lRGrzmTw8EVTW6SHe5c= Received: from CH2PR07CA0037.namprd07.prod.outlook.com (2603:10b6:610:5b::11) by DM4PR12MB5722.namprd12.prod.outlook.com (2603:10b6:8:5d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.27; Tue, 19 Mar 2024 12:00:57 +0000 Received: from CH1PEPF0000AD7E.namprd04.prod.outlook.com (2603:10b6:610:5b:cafe::2d) by CH2PR07CA0037.outlook.office365.com (2603:10b6:610:5b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20 via Frontend Transport; Tue, 19 Mar 2024 12:00:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000AD7E.mail.protection.outlook.com (10.167.244.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7409.10 via Frontend Transport; Tue, 19 Mar 2024 12:00:57 +0000 Received: from rric.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 19 Mar 2024 07:00:55 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v2 3/3] ACPI/NUMA: Remove architecture dependent remainings Date: Tue, 19 Mar 2024 13:00:25 +0100 Message-ID: <20240319120026.2246389-4-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240319120026.2246389-1-rrichter@amd.com> References: <20240319120026.2246389-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD7E:EE_|DM4PR12MB5722:EE_ X-MS-Office365-Filtering-Correlation-Id: e6d920ba-331f-4633-39ab-08dc480c3cc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q27NAso0DdBrUak0JDKZP6a/xXRbOvXYyOip0R8+uL9eiZBAS7sIHrrF9TiOwd2Vd1DWlwu4LSx7zZoVhcCwcQUO7sGFKJ8FmTN//mpS5WzHqRjSSNiGRq+rv4Q22jvO6igBjHJcc6z+98s9qFszi21Mw0XU5Si/0EHa1zDMMq1WZxry27bHF6rDsOT4LASXT2tbJX8rUb3MTxpXDUmSwClOt//WAb9WIjGcgx2116pQGBVsLAab/5e6qxNHWS85E4XtSVDxqqv7666ixm7kYFc96hxBg5KHTTi7ADkr6CZ2lzw3fxm50JweiFVMOEDKMzYkM3YHPKPMWuLOUEesOg4OhSKFTOJYkTxrRRxQMC9wBnYQP0rgejXDJdyugnjQN8jYMF8M2gb5ZO/f55dWTDFJKDglgLZu3/tObSHyNhCYZ24We99uHfN7eTixlhWZK5w/L3w8U4ljSKQKxdi6W8uSbLtfAo3elbxfr69OYNlbtRJDiV+2dqxHsOqfI+F0aT4u7I7pUXSb2ho2KfWbJ0ELMn6mjT4M2SRGQTONIGsXRwQNG9uUZXMW6a8DtN79AJl4EhXvoIypD7335wwpVtt5peKtW+xaes2MVsjkio7w+6+p+Q6VhcPw+OV39e0FMVlikdmP8lgaLEH277HGX5VewK63aSqLu3VjwIAo/ZUYTSLEwIewB615ehTolwaghOHyiw6YVh+XeAayiS/U4LyxUkX35lkCCy4qPIk6wAX5vd+KbNttRo+7rFOg+erv X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400014)(1800799015)(36860700004)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2024 12:00:57.5795 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6d920ba-331f-4633-39ab-08dc480c3cc7 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD7E.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5722 With the removal of the Itanium architecture [1] the last architecture dependent functions: acpi_numa_slit_init(), acpi_numa_memory_affinity_init() were removed. Remove its remainings in the header files too an make them static. [1] cf8e8658100d arch: Remove Itanium (IA-64) architecture Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 68 +++++++++++++--------------------------- include/linux/acpi.h | 5 --- 2 files changed, 21 insertions(+), 52 deletions(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 50ae8557e8d1..910609a9754b 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -208,16 +208,21 @@ int __init srat_disabled(void) return acpi_numa < 0; } -#if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH) /* * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for * I/O localities since SRAT does not list them. I/O localities are * not supported at this point. */ -void __init acpi_numa_slit_init(struct acpi_table_slit *slit) +static int __init acpi_parse_slit(struct acpi_table_header *table) { + struct acpi_table_slit *slit = (struct acpi_table_slit *)table; int i, j; + if (!slit_valid(slit)) { + pr_info("SLIT table looks invalid. Not used.\n"); + return -EINVAL; + } + for (i = 0; i < slit->locality_count; i++) { const int from_node = pxm_to_node(i); @@ -234,19 +239,25 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit) slit->entry[slit->locality_count * i + j]); } } + + return 0; } -/* - * Default callback for parsing of the Proximity Domain <-> Memory - * Area mappings - */ -int __init -acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) +static int __initdata parsed_numa_memblks; + +static int __init +acpi_parse_memory_affinity(union acpi_subtable_headers * header, + const unsigned long table_end) { + struct acpi_srat_mem_affinity *ma; u64 start, end; u32 hotpluggable; int node, pxm; + ma = (struct acpi_srat_mem_affinity *)header; + + acpi_table_print_srat_entry(&header->common); + if (srat_disabled()) goto out_err; if (ma->header.length < sizeof(struct acpi_srat_mem_affinity)) { @@ -293,6 +304,8 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) max_possible_pfn = max(max_possible_pfn, PFN_UP(end - 1)); + parsed_numa_memblks++; + return 0; out_err_bad_srat: bad_srat(); @@ -448,27 +461,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, (*fake_pxm)++; return 0; } -#else -static inline void acpi_table_print_cedt(void) {} -static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, - void *arg, const unsigned long table_end) -{ - return 0; -} -#endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ - -static int __init acpi_parse_slit(struct acpi_table_header *table) -{ - struct acpi_table_slit *slit = (struct acpi_table_slit *)table; - - if (!slit_valid(slit)) { - pr_info("SLIT table looks invalid. Not used.\n"); - return -EINVAL; - } - acpi_numa_slit_init(slit); - - return 0; -} void __init __weak acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) @@ -559,24 +551,6 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header, } #endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ -static int __initdata parsed_numa_memblks; - -static int __init -acpi_parse_memory_affinity(union acpi_subtable_headers * header, - const unsigned long end) -{ - struct acpi_srat_mem_affinity *memory_affinity; - - memory_affinity = (struct acpi_srat_mem_affinity *)header; - - acpi_table_print_srat_entry(&header->common); - - /* let architecture-dependent part to do it */ - if (!acpi_numa_memory_affinity_init(memory_affinity)) - parsed_numa_memblks++; - return 0; -} - static int __init acpi_parse_srat(struct acpi_table_header *table) { struct acpi_table_srat *srat = (struct acpi_table_srat *)table; diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 2a7c4b90d589..5f6472a7997c 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -242,9 +242,6 @@ static inline bool acpi_gicc_is_usable(struct acpi_madt_generic_interrupt *gicc) return gicc->flags & ACPI_MADT_ENABLED; } -/* the following numa functions are architecture-dependent */ -void acpi_numa_slit_init (struct acpi_table_slit *slit); - #if defined(CONFIG_X86) || defined(CONFIG_LOONGARCH) void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); #else @@ -267,8 +264,6 @@ static inline void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { } #endif -int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); - #ifndef PHYS_CPUID_INVALID typedef u32 phys_cpuid_t; #define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)