From nobody Sat May 18 05:34:48 2024 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2087.outbound.protection.outlook.com [40.107.100.87]) (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 E2E241635D1; Wed, 24 Apr 2024 15:49:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973759; cv=fail; b=fx+Isd52qNlJrIsetdmCR8sgLRhy/EBgHgcGGO1sW9p71WkaHRo6UR+cNhg+CvfF5vcOr6UQOhtdd0RBR9P5mJ5GO7MG7A7qrVjqFPu+xWTpSAN0lsN7xHf20HkVVIK/zbQI/PjIynQFdMgk3o741lWtIrR28hMxUEBfmyLzGmk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973759; c=relaxed/simple; bh=dd0tKGKBoKI1rwsSWTq7OWwHw4VnHS6sPoRxGqOtTN8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pGGeDc9ojCHUVa6bpYVZy7VDneAnPmh2x+uaWs0yXZgAiPE9swPcWtzlkGzHArlVp96W65SfTaYFtSS4IHiTZAel6YDQyHPSxagXRe+ZYR44ak9hxO3iZngQ9cZP5qRdCPPc4C5Dgeyzfq101QdOVuv16w577mvgdJcpCJl1HA0= 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=jDCdF9nr; arc=fail smtp.client-ip=40.107.100.87 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="jDCdF9nr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iE4llrQprReHH3kPh728Oa/7UOcAHRQGrvozCsemybuLhmWgt8xctIOB2sqKYzP+S4FBIiuuHlsN0MdExcIpA+1gu2B7QnprOenYnT21xY0oIcDgf0dUj0mDQpNw2oLMCnazY+aT3piM29Y83Ew3H04XqC1kRIw5HzFUZnAt5yKdV7vQrLadwCCJ+bKMyteWov4Gz7EHcpfpB+LjPH+VTdqexzKKUKY/9DRVD58E9WpTx1ytNcX1i1uv09aQcZNisirbAnrROI0IoD8n5E4994oO2JKnqjz6CfIAnlCjulidphZdS2bZPTJKo1ChvzO3KqTV3osJT91hgKEHyoOr4Q== 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=UvaCGtiHWaORjixNRU9ZbaKC4cBZaEY/1U0UPRPmq0E=; b=E/vQgUtC1g+oMJOALIiFTp5hVYaZkZJ2Ap9NoXkhYXGA5lF6LMXGT2JrtPweHNveZg1Ex4HW4F5oHQjr4IOrQdZW1/PGEM3w9+M+kPBHGh0HNu8jpl4ARyPo44tUg/yV1u+OqILcOt6A9EQ7JC0DyLlSiMAaQr4MEDCNYTU9DUg8sy3BpDLAw4JQvB0OuHcOL0dc+dxVR9j3K3aVdn6jp72om6UbvmJHSIdOXiNj2Pu1ckfWuVHGMDNZK4mG/XPj5+gwtFR67emsI8VQs7oR8uMqa0PJRFgo+JSqPElGWzT5Ph2i6Oi1bq92WVSU05uP8+wb5GNfku29d8ti7twwJw== 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=UvaCGtiHWaORjixNRU9ZbaKC4cBZaEY/1U0UPRPmq0E=; b=jDCdF9nrZa+6PeHdmSE1K80ufDhtxZG+auC0kuAjJxdz9kEoFlu6B0m5L+f5V7DYaVs3XwMDmu3zNu03vZXhw/3cmUDBCHb4Qpb5oNi2i82aCn48DHRMSJNkXXOZBUGCpQfXDxvHmsWbF8Pq8nbeOo0/tmZhjPeam8PqlXz4aII= Received: from BL1PR13CA0350.namprd13.prod.outlook.com (2603:10b6:208:2c6::25) by PH8PR12MB7375.namprd12.prod.outlook.com (2603:10b6:510:215::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.24; Wed, 24 Apr 2024 15:49:11 +0000 Received: from BL6PEPF0001AB54.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::4d) by BL1PR13CA0350.outlook.office365.com (2603:10b6:208:2c6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22 via Frontend Transport; Wed, 24 Apr 2024 15:49:11 +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 BL6PEPF0001AB54.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:10 +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; Wed, 24 Apr 2024 10:49:07 -0500 From: Robert Richter To: "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , Andy Lutomirski , Peter Zijlstra , "Dan Williams" , Alison Schofield CC: , , , Robert Richter , Derick Marks , "H. Peter Anvin" Subject: [PATCH v4 1/7] x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks() Date: Wed, 24 Apr 2024 17:48:40 +0200 Message-ID: <20240424154846.2152750-2-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB54:EE_|PH8PR12MB7375:EE_ X-MS-Office365-Filtering-Correlation-Id: 6156c87d-5cf9-4a31-1779-08dc6476158a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|82310400014|376005|7416005|36860700004|921011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?IfuLX8QjiSTebDVPo6AZZU90V599bfGG9V9DEnozNMknf+PS5ctefS37lIpO?= =?us-ascii?Q?qIWbeLN5NNqbEp2IkXXXbO4riMiIm6f3KSyIi6LWeymdYxdcmjURsgsIQj6x?= =?us-ascii?Q?ztn0VvH+p2FWlgEfcchChF00gLMYwdKKIe682Gb5exTZoILmVVAuurLXI0Mw?= =?us-ascii?Q?yDfDVetJfaykEH6HLt4rcNVtkjpGJxdI0leTSujjySK3m+hA9NdUoo0/7yQF?= =?us-ascii?Q?bTDVnXMBl4P7CYkWZGsnub+EvgvXVJ52t4HUAXFRCw/ya3H5r59az7Eb6jlH?= =?us-ascii?Q?T59vPgxGXSp2iioln1XQIj/Etrz70jETYoS8K33W4DHENuh3jOqrqg4Vd/AW?= =?us-ascii?Q?dP8iIcFs5O7X51WMa962mXkA3cjPZuSY9wlPhv5MhErDOncGWJziKpbaSuFV?= =?us-ascii?Q?+iHi+VFT1WoTN5aUX+KdtyEBZncWmf6WmYnKvM4+n6Q6O7m7N0294Iy3evZg?= =?us-ascii?Q?aeMzQiRb8CqdsheH10lw2C9gh/vQsrV+danjG39YK0UyKgggAnMqHNAXe6s2?= =?us-ascii?Q?BuenHTCzhFQ48ryBU0oQyVnInsGu8IIMDdm8iJU5EHewFi7x2iHtcxZ/zsei?= =?us-ascii?Q?FOYoo+wjbw3BvzsMXUQ4cKdbUt1yg2eOjHiS/H/ahM1UiCzcIAje2nCKtoYZ?= =?us-ascii?Q?FHDljRfb75zRji4YsOialF7Ec23uSofdNUfqxlZhKrlVTIhKJNwJZ2b81guI?= =?us-ascii?Q?Q3HkBEubzLl2bUQp2YjlvJHtbZRe/GzaBJIvVYMEKOxSggvItohj2MprCCZt?= =?us-ascii?Q?AOIpNqJNQY79zgQ686fTOo2D0fQ0hKI5347z02CLgFABdCCFEasmrHeCJD5O?= =?us-ascii?Q?AkZ1lunM06G4BiYydq6dQlGqTWPf4JqCliBXdNUhhJvM3qYzEIwDpNMv3X0r?= =?us-ascii?Q?T0frxP/pqYm6NrMcsS3hMubPuRvx8ts5VTauzedEwimBUO6d7fygMQAEd9cJ?= =?us-ascii?Q?FK5VYbPIyH/1udFpk7fvD4S2qL+mWbMT8bYJ8cb9BsfRIY1uv/Z86ACHGNtV?= =?us-ascii?Q?tucNX0Gl8NpGHImcUoKXZZHMjjyUZTuB6+/PRsqqS+seX7JTXO5u+4iwgK7l?= =?us-ascii?Q?HSs2aQXwqhZGzVb1EK4UFQSCOrMns7rj59m7oXUHFmP3NINcrKFOM08b5MU9?= =?us-ascii?Q?/xXumd08iaR0rEyGUZVJjk10ltBlNMMhr2l0drF14NNDiLic0g476wh3d7UC?= =?us-ascii?Q?ld/5fjIJlyg7iYe1/w/0vheqWJZ8/XGBszsbFUyz+qGNLrDHGWNoeSHUWjuM?= =?us-ascii?Q?wrI246XOlaA94aPc2rq+/I17vn9/JEvivY9e+zL627ar1/oDxefd0DnxB9ik?= =?us-ascii?Q?k3yDupIP3JX5O4iId7F0kpFjMXUWypUG99FeWdRrJUh6N8fnFNFyrPRSH5I2?= =?us-ascii?Q?RBk3Yqp6mK4f8TpSAskYlzEWjVkg?= 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)(82310400014)(376005)(7416005)(36860700004)(921011);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:10.9745 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6156c87d-5cf9-4a31-1779-08dc6476158a 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: BL6PEPF0001AB54.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7375 Content-Type: text/plain; charset="utf-8" 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, a message is seen then in the logs: kernel/numa.c: pr_info_once("Unknown target node for memory at 0x%llx, as= suming node 0\n", [1] commit fd49f99c1809 ("ACPI: NUMA: Add a node and memblk for each CFMWS not in SRAT") Fixes: 8f1004679987 ("ACPI/NUMA: Apply SRAT proximity domain to entire CFMW= S window") Cc: Derick Marks Cc: Dan Williams Cc: Alison Schofield Signed-off-by: Robert Richter --- Also note this patch is intended for stable, please tag it. The next patch (using __weak instead) fixes the issue too, but is more complex. So if this patch will not be used for stable it can be dropped entirely in favour of the next. --- arch/x86/include/asm/sparsemem.h | 2 +- arch/x86/mm/numa.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparse= mem.h index 1be13b2dfe8b..1aaa447ef24b 100644 --- a/arch/x86/include/asm/sparsemem.h +++ b/arch/x86/include/asm/sparsemem.h @@ -37,9 +37,9 @@ extern int phys_to_target_node(phys_addr_t start); #define phys_to_target_node phys_to_target_node extern int memory_add_physaddr_to_nid(u64 start); #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid +#endif extern int numa_fill_memblks(u64 start, u64 end); #define numa_fill_memblks numa_fill_memblks -#endif #endif /* __ASSEMBLY__ */ =20 #endif /* _ASM_X86_SPARSEMEM_H */ 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); =20 +#endif + static int __init cmp_memblk(const void *a, const void *b) { const struct numa_memblk *ma =3D *(const struct numa_memblk **)a; @@ -1001,5 +1003,3 @@ int __init numa_fill_memblks(u64 start, u64 end) } return 0; } - -#endif --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2053.outbound.protection.outlook.com [40.107.93.53]) (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 A2C2D15B158; Wed, 24 Apr 2024 15:49:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973760; cv=fail; b=SuCxA9BBPM04O12CG7t/KmvjTpFZurRlD4oqhv4x75F4CoV5Bb+8PxqOYJWc424iLCC8Y2iK9Y9qsxlfqtWQ1IkdAkttY3nyApow388ItSDMD6iLwSQfO2A32WBLTjIxrqXC/hVBdgwk/BHl9Kwdy/Gcc0LGa4ERWLUV+BBUTjY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973760; c=relaxed/simple; bh=ryIvTGaKwLrqKTHCwTIriXWr9WIeb7OGpLLqzdmsKlw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lbhWXLFmFfXLQMIRQpyF/zRUrQ9PPDcrJomsRJXrnDtlb8KiXr1dGWcqZRfc9wgBghIfYDCaapcULvtfF5yXka90vlrKT+8S1iGcp1+RCNJ7kfkJUPUcuua1mdVsnxQmCieoQr8Hgz9/BpxURCYnEsE+xP6l520MCDRRtx3V01k= 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=iZ77HPPT; arc=fail smtp.client-ip=40.107.93.53 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="iZ77HPPT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eXjQ8FdJ53y0jyD8rPuWz5wR02jV/BAq/AKeru4URGWH/RTqYKHfeN1ZFWSPASHQLBO+T2E9WOu/omtPt9rEDe1izm21f2rOYMsy6ewo+vFatXmna/eaoHEwWYJcvPnufpterbLbUSh/LgFWnrjk8+erMPOqjHq6Lp2VJIJaMP+LtsiH5FIEn7bgkp8T0v+v9R6OflgnbwvPHQ6ZjbLHAi7/1+/9Cmu5aupQRiray5GlpGn1dPDGAPiuslgLpbf734Eu7U60q1wJZ+egHOXQtXQtnt9eIVTDnjguv61BtIn5YSNUOxry1hMW6WLbwtmpQ2G9FayFtAKXcLquAgl89A== 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=3cr09hc8g7GLfv5BRixzfJAo2HFsjgg0Zq6vMKGdUGg=; b=l1QYbLDFEYpbMt/d2se+6XP3zpnlgu2pMBbW5D7oryyzSVwPY03Nhipvr2LaZSSV3pFZBIeOM8xQtsFep71sWqiclmc8fSDFQ07kaiY6n7jsIWpat/RatLLVVDb+nrOd915mjM45sYxZskJQfwW3j8H3eu3jUkWoSM7JFYygW6oApjmZmkf70Vkv3CJh2shPVspiwhqY+i9PR1m+erKmg6aIkchQ2lszQq29VqA43u4HcTc7rrmHBspZ4qSH3SJtv47/oZGwbyNgwz0AFUSGEg8Oc4l66KczJFhmOPlNFv/RRNTb7brzo7utcuP1eoVa6uUW4llzWMfPrswxkqKWFg== 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=3cr09hc8g7GLfv5BRixzfJAo2HFsjgg0Zq6vMKGdUGg=; b=iZ77HPPT+93qMk7WlPy6iIRksNjrqIym5uw5X5uChbpc52KIZzDiaDEXgmsMQ/eFj5wGQD3YBdHwOMoLIClRrlWtQ4k3rNcYXzuGDfxsq59UOXICnNni740SoRUulrSZs0OM6dfyeDDD3frWxsNdbkXBVTN7pwrgEs7ui3PD9+0= Received: from BL1PR13CA0446.namprd13.prod.outlook.com (2603:10b6:208:2c3::31) by DS7PR12MB5958.namprd12.prod.outlook.com (2603:10b6:8:7d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Wed, 24 Apr 2024 15:49:15 +0000 Received: from BL6PEPF0001AB55.namprd02.prod.outlook.com (2603:10b6:208:2c3:cafe::a) by BL1PR13CA0446.outlook.office365.com (2603:10b6:208:2c3::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22 via Frontend Transport; Wed, 24 Apr 2024 15:49:15 +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 BL6PEPF0001AB55.mail.protection.outlook.com (10.167.241.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:15 +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; Wed, 24 Apr 2024 10:49:12 -0500 From: Robert Richter To: "Rafael J. Wysocki" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , CC: Dan Williams , Alison Schofield , , , , Robert Richter , "H. Peter Anvin" , Len Brown Subject: [PATCH v4 2/7] x86/numa: Remove numa_fill_memblks() from sparsemem.h using __weak Date: Wed, 24 Apr 2024 17:48:41 +0200 Message-ID: <20240424154846.2152750-3-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB55:EE_|DS7PR12MB5958:EE_ X-MS-Office365-Filtering-Correlation-Id: 827809dd-2ed1-421e-54e8-08dc64761823 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|36860700004|82310400014|7416005|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?js1asoeQ5iBYpRVsryVPBMEi8I5uxrchDnKYOP3RfqLzNzZKWq7wlytWKgKF?= =?us-ascii?Q?P+h7op1xfhVAijaSrHnfSwWUjT5l/kd3iAa7yIo99fGGQgkxPPtZqPgOqAH2?= =?us-ascii?Q?k6F4zyIAHipunSpIUndzzlLyVDXNb9UgFILfeTUQlOr2DilJgY7RtK1zYi5V?= =?us-ascii?Q?YuCVu7t2YB/LldX8dz6xT6XdAy39JDnxHqaLD17J59EiY/OYTECHpdPfHYJ6?= =?us-ascii?Q?eXrLLSoTIYRRTY2WYVsCjc2L6fJf9sWUycnarjnOEL+wYtwFWuyWwjTAzqO3?= =?us-ascii?Q?T3bwDkGWFo0kF9EjbnItwy2FVQILG5rppSNbRDqwrr8stcBKsvphjhlJl+Ry?= =?us-ascii?Q?2DH4eeBxcFSnd/hi/M55Urn/Gj9MGzeLgyEPIc6apG0IBq2lpExTG5QAj/+j?= =?us-ascii?Q?OtnTF3zJqoFJfB0briJH9/Pz1F7DZzhb93kbcABaxlEZO4y5DPk2AG/L3lOL?= =?us-ascii?Q?PEDFyOQpWaTTFkygb+YYvD6PNmj3snSI0IO8SYl3BevWWsLJLnUdhjpvw5GM?= =?us-ascii?Q?ScUVkkxAvCd9RkeknscgZhK7n78bBeyzQ1CXv3Qz/nNkqomf0RwbmVaZILsW?= =?us-ascii?Q?uMXNhugpsQLJ4u0MU9+/EKQAOwWeX8JRD7jjez3Kh0xuZTsfespxU28vPttG?= =?us-ascii?Q?f2IdmVe/Kpzw6N+fRCE4YW7TIyBfTUp7YoajJEcFntgGiZf3ZcHmApjebZRm?= =?us-ascii?Q?kddeWKFIw2SnnG7lxfI+kN98ke0082/xczuOFmuBelMk7S/QRe2dTmQYZw0b?= =?us-ascii?Q?94svV9f/1hZatk0CYeZ4VV8jaZdm0XVs6rI0DjsgnYA33DQKFcZt/9eFf2iK?= =?us-ascii?Q?5PHktc5nsCqTM2ZeLYTR0EHVE9W2aXZG0b+d12nsbdu4jyC+xxPkDT583lsu?= =?us-ascii?Q?/N3K7xWfqbIC6Qr2GbSrv/PsusGjUXZUfFHLwa44yw0GrwDY1ttmxmCb4mTV?= =?us-ascii?Q?TYhlyJ0odeA6LeiZWf4Enf/U9+C4RzWgRnWiI3SVAbhqbCNvgsOxrwhjQaqX?= =?us-ascii?Q?LZkUlTZYuYEasP1tUppTAbg2WmRD18RxTd0kz6dHjCTXinFalzq7vk9PCC66?= =?us-ascii?Q?oqdsOHQELU7YNZs6RaR94YATPA5jHW//mOq1GLt8Ut8tKFFlJCrPmzPQqwb/?= =?us-ascii?Q?1HpMv5BDcyy+SrsUt598nE4bt+WleZT6oxgZM9MbezSl0h2UVUfqrDIWteRd?= =?us-ascii?Q?wv5R1cchyFux5a6VG0em6x8vSSUcEw/h3nOSFjIHut15pvwUgiRALII9T0jc?= =?us-ascii?Q?NzMqiMTXBvQgnWkqE7oagAPAIvj1XG3g5rU9+e4fJZgcJ5AcCSRvoQN1xwda?= =?us-ascii?Q?VueuoT+ad9WOAAlYlZLwfJdu?= 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)(36860700004)(82310400014)(7416005)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:15.3342 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 827809dd-2ed1-421e-54e8-08dc64761823 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: BL6PEPF0001AB55.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5958 Content-Type: text/plain; charset="utf-8" From Dan: It just feels like numa_fill_memblks() has absolutely no business being defined in arch/x86/include/asm/sparsemem.h. The only use for numa_fill_memblks() is to arrange for NUMA nodes to be applied to memory ranges hot-onlined by the CXL driver. It belongs right next to numa_add_memblk(), and I suspect arch/x86/include/asm/sparsemem.h was only chosen to avoid figuring out what to do about the fact that linux/numa.h does not include asm/numa.h and that all implementations either provide numa_add_memblk() or select the generic implementation. So I would prefer that this do the proper fix and get numa_fill_memblks() completely out of the sparsemem.h path. Something like the following which boots for me. Suggested-by: Dan Williams Link: https://lore.kernel.org/all/66271b0072317_69102944c@dwillia2-xfh.jf.i= ntel.com.notmuch/ Signed-off-by: Robert Richter --- Authorship can be changed to Dan's if he wants to but that needs his Signed-off-by. --- arch/x86/include/asm/numa.h | 1 + arch/x86/include/asm/sparsemem.h | 2 -- drivers/acpi/numa/srat.c | 5 +++++ include/linux/numa.h | 7 ------- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h index ef2844d69173..12a93a3466c4 100644 --- a/arch/x86/include/asm/numa.h +++ b/arch/x86/include/asm/numa.h @@ -26,6 +26,7 @@ extern s16 __apicid_to_node[MAX_LOCAL_APIC]; extern nodemask_t numa_nodes_parsed __initdata; =20 extern int __init numa_add_memblk(int nodeid, u64 start, u64 end); +extern int __init numa_fill_memblks(u64 start, u64 end); extern void __init numa_set_distance(int from, int to, int distance); =20 static inline void set_apicid_to_node(int apicid, s16 node) diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparse= mem.h index 1aaa447ef24b..64df897c0ee3 100644 --- a/arch/x86/include/asm/sparsemem.h +++ b/arch/x86/include/asm/sparsemem.h @@ -38,8 +38,6 @@ extern int phys_to_target_node(phys_addr_t start); extern int memory_add_physaddr_to_nid(u64 start); #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid #endif -extern int numa_fill_memblks(u64 start, u64 end); -#define numa_fill_memblks numa_fill_memblks #endif /* __ASSEMBLY__ */ =20 #endif /* _ASM_X86_SPARSEMEM_H */ diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index e45e64993c50..3b09fd39eeb4 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -208,6 +208,11 @@ int __init srat_disabled(void) return acpi_numa < 0; } =20 +__weak int __init numa_fill_memblks(u64 start, u64 end) +{ + return NUMA_NO_MEMBLK; +} + #if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGAR= CH) /* * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for diff --git a/include/linux/numa.h b/include/linux/numa.h index 915033a75731..8485d98e554d 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h @@ -36,13 +36,6 @@ int memory_add_physaddr_to_nid(u64 start); int phys_to_target_node(u64 start); #endif =20 -#ifndef numa_fill_memblks -static inline int __init numa_fill_memblks(u64 start, u64 end) -{ - return NUMA_NO_MEMBLK; -} -#endif - #else /* !CONFIG_NUMA */ static inline int numa_nearest_node(int node, unsigned int state) { --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2053.outbound.protection.outlook.com [40.107.236.53]) (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 DE93B16ABCD; Wed, 24 Apr 2024 15:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973763; cv=fail; b=chnKLcoBEUKp6jeyXLwcZrX56DXq19e24cVdDAHPTO628r+Roa6EF3XzGOm6oz8EAKhkD7lC+16iwnsTs6q6NhyJO0gMVAyu7cIxUktwdz1B4RRDwK9r51oyvaRxe1AO07TXn2uI7hgTmGgk/b+O76KJPBH/pjS6uzjrcv7ODrs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973763; c=relaxed/simple; bh=647u1z3wRbEbaOeS0NL+K0zW6YDbrE4mrsl+FRUBytA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oyTx5tyKtHw7h5tD9U0rB8SwIvxjmsl+XMyNsL6clxBcF19m6n0/z4toRsROdwAaMlQBCmAXcc0o5exfiGl96JEK+CK6v3ZJyGTL7i+Mzky8vLHIijODBkafLJRRnCR7sk+hHHMgL056m/hkyNMUUd3j4hebcFHrelnL0IB9MxE= 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=RRn1o1dt; arc=fail smtp.client-ip=40.107.236.53 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="RRn1o1dt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PL4lYMwhnUMVUfdyU8fni5VsPnUJ1OyRwS3xbRJHJkEQDxId9vasd6Vvr8hEDUtgKgLynoYBjwqmK3y2rSv3i4W4ViYbjx59y+kHcmgz6BVWCZpQg+vhmF3gfBmH/lYe5uV4A4ba6BVxrB6B/PVPqJd49sQyAVWQVVBKZI1kWNGXi/bSY9HeVfeCeDKA9uZSTasSs/JsPbslmVpbHZw8Aur96yktirPOc56sa6LfxovTEa8APAsYwxUD3JobKfRZCHxyb3Le0psuUERZalgmmBlXQypN8PsRpoQmQeJDwxm16KKrk4Ky7iZK+RewZz8CsmaXJIK5Vi8sN0skVwV07w== 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=Rbiu9B8dMh2GCmUdkxKoTB+BVLOyjvHNhJoJbm+eYlg=; b=QL+8wRXmZlmBTLJ3Q6Mbc/vEslp+y1jSjm/71tyXT0DBv01KxgiyFzGEXmkpPhqMw4p+0DrYvh7V+pNFh761xfeK0SIfnejw/Qm9X2vHyYF5r/Np+kzk/r6RLKJFHLTr8yHo1L4GXf1pB3QxYZmGBL1H1ep+kIx/fJRfuewlSu31dsY8+0JwjCzfZ8FDWMsQ0ZVIG6ycYydoQu4OlyDEbqdC8tFpIrCRaOC8LtV8s/IKMAgDEMBbK85V03PSZ5jK5+rYSGTIZrRq++hNNpTRy3pUFUNks17Y6tJ4I/Df2XbjDDk9F02XrrFIh2jQd6aEeUfpYryVaJr9x05UPoqv8w== 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=Rbiu9B8dMh2GCmUdkxKoTB+BVLOyjvHNhJoJbm+eYlg=; b=RRn1o1dt/hXPu8rTsTpDWDWD1J0YOs6tY2QhQ1V6XCITAVQ+d+J2o0e+cCq5OzEmPg/PCKcFqZln8SdGbSolbezQR8eIdg0P3UrfZcUgbCfhp0wVuR1vQlYEqoY59p1ztGTcrK/XkJi4yS/2Q6hdCc26C/t/iALRYBSFD4K+wlo= Received: from BL1PR13CA0347.namprd13.prod.outlook.com (2603:10b6:208:2c6::22) by LV3PR12MB9233.namprd12.prod.outlook.com (2603:10b6:408:194::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.23; Wed, 24 Apr 2024 15:49:19 +0000 Received: from BL6PEPF0001AB54.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::b) by BL1PR13CA0347.outlook.office365.com (2603:10b6:208:2c6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22 via Frontend Transport; Wed, 24 Apr 2024 15:49:19 +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 BL6PEPF0001AB54.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:19 +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; Wed, 24 Apr 2024 10:49:16 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v4 3/7] ACPI/NUMA: Remove architecture dependent remainings Date: Wed, 24 Apr 2024 17:48:42 +0200 Message-ID: <20240424154846.2152750-4-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB54:EE_|LV3PR12MB9233:EE_ X-MS-Office365-Filtering-Correlation-Id: 8fc9021f-eb06-4b89-57df-08dc64761a58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400014|376005|1800799015|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+OvQaahEyw9jjWFNe62WUZYto192QNCU/ncdZCTlveTUpbak26AH/uNwPqMg?= =?us-ascii?Q?V9B02qIgUfitK/dt9UglDPJVJcXrPtL7y4cJJEG98oL8QdbERV47n1i0437y?= =?us-ascii?Q?MHb2VS8wYXmWnsDq+t5Hal2lIl9jUbYpYH0WZLiHL+2KOAS+H3bn3E2oAhCl?= =?us-ascii?Q?kRKD9puO4+dDJRjHajKUiqbmwiQP5QIwixohd3B8J+HwcgjXM3E7RsAalyrh?= =?us-ascii?Q?cje07veV/mlOXcIZxzWfZlcCW7QmshnuhYSIwCgV0Y+EAuopeasioWt2ed5Q?= =?us-ascii?Q?M62qBwlTFyGqGcZrqnJ1l4RlXowvzrPRvvDcNTBr0chFmMtFYcF3Y64Ab+wS?= =?us-ascii?Q?cXijp/YMKxLfZowKydfusSxtsuJSGQem3GHSb86o+0PjDcMyQZs5AvRwtbAt?= =?us-ascii?Q?tUxtCB2bC/9TIEfiuAhgkEW8NXg4/lZ1vXoU37ANOAUdumXENem5+uSAScs7?= =?us-ascii?Q?lYXesQ+FDbaqXr6RvzUMHkZ3sKZo/wB/UbQKi9hNPHDZgr77jBRB1ouJgb47?= =?us-ascii?Q?VR8oq/fIXgba4WhocxbJuXEcestUHNL4hDLefdn4KNO6r15KkdceVSH8/lg4?= =?us-ascii?Q?VaogfbSqnKUPlH4TrKwPsD9hQ/gBWcunWz6nkDNzmQRg3X5KHRmP96Eeszk1?= =?us-ascii?Q?WyRF8xXk7rYIj9KM0YmzoOji5WtYOPj3ft2DAraMLp/qU83G+s/XyKuPs51D?= =?us-ascii?Q?COyGli9LXXi7CqWm1ljmxHKSHCAK5cvC0q25ZQq7TJv53a611GuXxs0FzIfc?= =?us-ascii?Q?19vr9kmM15cuOpPlIQSzwmc/I7+IcK/Wrh1++cNwY9yUSiBfuXPhPc8JX00M?= =?us-ascii?Q?p/T85wdJm4movTsp36rrDQ5dutO0cRjWV4v90aTIllMKn3DxoM3hiMiZhRj9?= =?us-ascii?Q?oBWJJSMtu14TUs1WOkXzTgTRWPG28tmKprdD0xLGEZSkRy2IpvaiHotYRppK?= =?us-ascii?Q?gXFSk3t87vHIFX7DAFzCRqh74kjF56y7gmW5o59KbfTjjCHj4lDNQDh8t6Vy?= =?us-ascii?Q?g49muC+ysLh+ELg2eEVroYArQE1w82rFVm5M6ngy1e6O+Om57i8tIqjNqPbj?= =?us-ascii?Q?Sz84zPKUtdFX507zfs19m+4gj6YHvhqdcyJnyM24FjmX1S9RkHl5FmBbkC/N?= =?us-ascii?Q?MFPyNgNEp98nCzm5GuZF1AIWiAsACaZcMj+zldWl6avFCMP9SeZE5hVzi7RX?= =?us-ascii?Q?xKSZGciC0oIaKRW8xdfF++DO99iA0jtBiAib90zGBXW8FNJgUxE4m1uo8X4j?= =?us-ascii?Q?PxsNj5kNb5LB/+6GgbJIO4Y/ArcLa2Q3/8swSQbRSn9buV64np+4eQBS48Ck?= =?us-ascii?Q?6c4pXdnLmxd6CoUXP/bsLswxPc3PfiEcHVzRu1gTpIKgebPp8J1nT8RZnG98?= =?us-ascii?Q?N5gxVdl3fSQMm1g8jcnPH+j1Ol/W?= 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)(376005)(1800799015)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:19.0214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fc9021f-eb06-4b89-57df-08dc64761a58 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: BL6PEPF0001AB54.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9233 Content-Type: text/plain; charset="utf-8" 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 and make them static. [1] commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture") Reviewed-by: Dan Williams Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 16 ++-------------- include/linux/acpi.h | 5 ----- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 3b09fd39eeb4..e4d53e3660fd 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -213,13 +213,12 @@ __weak int __init numa_fill_memblks(u64 start, u64 en= d) return NUMA_NO_MEMBLK; } =20 -#if defined(CONFIG_X86) || defined(CONFIG_ARM64) || defined(CONFIG_LOONGAR= CH) /* * 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 void __init acpi_numa_slit_init(struct acpi_table_slit *slit) { int i, j; =20 @@ -241,11 +240,7 @@ void __init acpi_numa_slit_init(struct acpi_table_slit= *slit) } } =20 -/* - * Default callback for parsing of the Proximity Domain <-> Memory - * Area mappings - */ -int __init +static int __init acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) { u64 start, end; @@ -345,13 +340,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable= _headers *header, (*fake_pxm)++; return 0; } -#else -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) */ =20 static int __init acpi_parse_slit(struct acpi_table_header *table) { diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 34829f2c517a..2c227b61a452 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; } =20 -/* 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 =20 -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) --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2068.outbound.protection.outlook.com [40.107.101.68]) (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 19054168B02; Wed, 24 Apr 2024 15:49:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973766; cv=fail; b=lcNzppLnVLk8r3PIKJw9229ZigpED41KUH4fLRJzltZ01Xq4yYm+/OGvsD7RzD8NoaiQD2A6/WI5dCOX4+lg+U4nzEcKFamAin0/TaUg1n7elX5gINvhCXedtsOJOj9ExRcEj2bEmpcAEyh5WrJ0PaHDgQ9R1TYE4g4vW6vvkdI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973766; c=relaxed/simple; bh=3A0QL/Q2ZLGYAxVW0jdhOQ0VW3DumNN9kZB9MQttzwQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uxZDFHdZ/z0Juqaw9+JOG20Jt1O6256rF74CUJBEbR/m3i0PxgPVc7Z/jst9oS/WK/WRM6KE9zvJLK2nd0X+Px2KSWKvLJ1S1z0htmwc2EIef8dSnEjhhy8xWlafWF6APsjOepUtv+b7E2TYOwewAq50OI+A7nCx1Kurm4dhdRc= 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=dZzP5BeO; arc=fail smtp.client-ip=40.107.101.68 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="dZzP5BeO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hoiXVDGKomQTOS5SOuMgMkSNZM+effaoOdVgWvKXwY8ShYe9gRgTsApzE5++EaZUhn3tXtX0FXwgl8KnX9AP+vszJEUxsfH6sX711gl4mtb6xoj915rbfbbD+CdtlEzsZbQKMWwTaNWdZannu1fDMsAzrrqLuMb7FHE5GlZ7aSudG1CeqynxKtSIk1GHVrZGoTDL4Lk21W1U/HF+V6N1mGXeaOMfJa34l8jKmean9M2ENNkEpf5kHGwXn0VnGmfJflEPm/X8x6uw+LkAD9ONF98KRk5AjQDzQVPWeXdPsGFZMWO+oGJJ0OQfQ/fzBWu3BqO4po/3k/tcZG4I15mjyA== 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=6UISV2JCdeG71+wO8w7lSn249sa+w/Qr4NBQ9V5O2Ko=; b=iNl/jNC6MeLWVqdiObfSfPglLbMvto3qKVW5GHYaPCuSHQ3oemj23ZWE3LWTQrcm4fnt3LGTNHo+XcYnppMeLAbAaSQ0TsaVC5wWpug9LVjM+I8aVtxl7O0fps0dskfE64EirPIiffss/tiYKXLJtDFtsJ19f/jcPhcQ8D93srYOmdKn2mAUie1+zxV9jzGa2hlSCCF2kigH+rMVNk/lZQrSREVM7eNNBtygJWBiNDNxJqqlRx1pbNGj5FW+7tdtmvbVCM6FK18b75QOKxVHdJk17zXDsHwW1N+7edmxSOvLya0nh7zANDDP4AyGErHnaAILsnP5l9osTLEMHCtT5A== 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=6UISV2JCdeG71+wO8w7lSn249sa+w/Qr4NBQ9V5O2Ko=; b=dZzP5BeO5lld13oezXpZ+nTHiA1Zy8AWLqkF1uNG85fmzqIMYA9jcnVRx3B3MBYxbMglLK9ITN5ZFkPqE5CMxIyTVJGKG2oeApDp5Vu7Nawm83BD6fFYwCE5w7jeehBMwd3k0Q/WW9h2X3gV8gSHIxpZ/vgGRv/l7rkPuCi90gE= Received: from BL1PR13CA0358.namprd13.prod.outlook.com (2603:10b6:208:2c6::33) by MW4PR12MB7165.namprd12.prod.outlook.com (2603:10b6:303:21b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Wed, 24 Apr 2024 15:49:22 +0000 Received: from BL6PEPF0001AB54.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::3d) by BL1PR13CA0358.outlook.office365.com (2603:10b6:208:2c6::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.25 via Frontend Transport; Wed, 24 Apr 2024 15:49:22 +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 BL6PEPF0001AB54.mail.protection.outlook.com (10.167.241.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:22 +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; Wed, 24 Apr 2024 10:49:19 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v4 4/7] ACPI/NUMA: Squash acpi_numa_slit_init() into acpi_parse_slit() Date: Wed, 24 Apr 2024 17:48:43 +0200 Message-ID: <20240424154846.2152750-5-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB54:EE_|MW4PR12MB7165:EE_ X-MS-Office365-Filtering-Correlation-Id: 3eda9d6e-459a-4433-43ac-08dc64761c29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?BF8mBIsvA+F1kiuqOVBNxhSLeQu97KO1yypbybnvSLMyjeFcazC69zdLa3sV?= =?us-ascii?Q?Yy7/mUn9/HdEqQrr9PwcBPC6QN9UX/jUS57DvDQXggWbD+bBMTG3oBpCgG4B?= =?us-ascii?Q?efwjtcZOy8s2gSVwBHisFhvdTd8ZYRCbJWqHMCcJxnVMaogbrgTXlnDaCyU1?= =?us-ascii?Q?/8AlRPVATLNnATWE+GjH4MThV33u0VLGoTUMzCQaxa/DwAABLgeMfIqypvjQ?= =?us-ascii?Q?GhvD/8Jsj1Usaf+NY/Olj8Oq5zOL+Eoi4AYCt2O4PtEaDm+XKGf+UdyzjHYO?= =?us-ascii?Q?jUn2g7W/KmrWYhA4AGeuE3gSCrX5DbiY7feuZQlmO1976qoMLPQua8HwJAfX?= =?us-ascii?Q?3tWr2vYupXkmC83v8hAcnLq6+X+Sx+u/w+wSBFKOYkpg/j1e5/SVQXZTGtq/?= =?us-ascii?Q?v9jTiSLlNSRTHXyuCFL2KW476UY4KopP2ls1fw3SpYdQBDxmWSsIbm96yilM?= =?us-ascii?Q?ni14Etpjl8m5zGysw8hYYJqvd5wRN8hkaQXVak7rc1da/M8ynTnHexpPFFvD?= =?us-ascii?Q?oQi3kjG495ST43oYRt8CHvnBhwGtPyhFRKltwJaacbqQPJqShhwt+BWreHEp?= =?us-ascii?Q?3Pmio3xlsYfhnh9JnkKf8/CrDf1nhyTADYhM48OE6ujckql/1ITUtDQT9DZI?= =?us-ascii?Q?8f0kY34BltXLTAWtmJdehhib7LjUrz8Rh1HN1EZdp79E5pdnuiFapLYcdQRZ?= =?us-ascii?Q?srDO1jWUbOsg1nFseJBx1VqOTKuOsHTTRCR6bAX4d1Uw+M3tFHVr4VYk5jsI?= =?us-ascii?Q?NtXFRDjivp9LkqBnIak3QE3ogZRT6ahI5CQnRjJ0SSvpFxmCmJGWI+CruCGY?= =?us-ascii?Q?bDS23lyfr00PYNKycnOfH5IJUrN2LCb8O0TuwKz1TOpFWB0kY9EDMNZV9ypI?= =?us-ascii?Q?+xloLKOB6zPYmX29A860ack7iXB9bdnJdxHxloTE3A9b/l9i5UWTlph38Wfx?= =?us-ascii?Q?BosgKpi5yPQQNID1O1QXeH8Zkz0OqVd6vRCtRw0IxcdAeU7N7KxsXXqBpl1k?= =?us-ascii?Q?+/06+Tc4aJ0CHahmtCbY3cdqSy42PjCL6jA74efarlP0Uv1Sgaf6P6v8cWh5?= =?us-ascii?Q?ivskdw/6DTMjc1T9RM3lzAWCk8BoG9ZAP19W84h42CR3HKrnU5kKl0oGN+sJ?= =?us-ascii?Q?c79cu5yjydiHRidGEE5HNi3XamUDE+Lu2GDgNRRCw4UhjPJ4HME76DZzZCRj?= =?us-ascii?Q?9yh47Ek9+2SEfxrqijeAqnwVXu27DwsXMrXsQCSoBxTEqcdaweAdwrwEC17X?= =?us-ascii?Q?wyO2ei9ZPb9kNo+jbVT7/xwrC7XcECIfKIbErc0Bc+QdeGF7MFiYFqw86qjj?= =?us-ascii?Q?L3ZFaS+Gnt6du2qr0QbcCjD1C5m/SP4WcURQWjAFk1ujSacycP7sK4Q+oPFP?= =?us-ascii?Q?35tdTQc=3D?= 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)(376005)(82310400014)(1800799015)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:22.0683 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3eda9d6e-459a-4433-43ac-08dc64761c29 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: BL6PEPF0001AB54.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7165 Content-Type: text/plain; charset="utf-8" After removing architectural code the helper function acpi_numa_slit_init() is no longer needed. Squash it into acpi_parse_slit(). No functional changes intended. Reviewed-by: Dan Williams Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index e4d53e3660fd..430ddcfb8312 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -218,10 +218,16 @@ __weak int __init numa_fill_memblks(u64 start, u64 en= d) * I/O localities since SRAT does not list them. I/O localities are * not supported at this point. */ -static 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 =3D (struct acpi_table_slit *)table; int i, j; =20 + if (!slit_valid(slit)) { + pr_info("SLIT table looks invalid. Not used.\n"); + return -EINVAL; + } + for (i =3D 0; i < slit->locality_count; i++) { const int from_node =3D pxm_to_node(i); =20 @@ -238,6 +244,8 @@ static void __init acpi_numa_slit_init(struct acpi_tabl= e_slit *slit) slit->entry[slit->locality_count * i + j]); } } + + return 0; } =20 static int __init @@ -341,19 +349,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable= _headers *header, return 0; } =20 -static int __init acpi_parse_slit(struct acpi_table_header *table) -{ - struct acpi_table_slit *slit =3D (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) { --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2066.outbound.protection.outlook.com [40.107.212.66]) (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 4DF591607A2; Wed, 24 Apr 2024 15:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973771; cv=fail; b=DVh3PnTsyFegPhxk2N1zCbinJljPHR2pAWELuWI0jbszmUyGERNyKN1XQBv9EEZJ/Cfby9SbDOGFtrxnUBJZ2h45yF28EJINw+vW1JV69eIyufhePGXe/pswd1YHNk/YsDgQIAr9SmmhC82xs1R415pXSrCqCPm5xn8CCC8F56I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973771; c=relaxed/simple; bh=GGVOQyQcshRXGn7vgXDtIcG0ullrNrrKkucC9HaihuU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rEzdycQhzx5AoEdmgU4GvzarTHNojSJpPvo2OHf1KBUKVV0CAUY7jXS2oB+h87EqXSh467HVgBduslaL2lJDBLn3/NxielBmIooKY+PVukgG4U7puM4HV0RaEZ51GURlBnGYjGTYoARqDHoS9XgvSx+FQ+w3DwBJNnFa+xMTwJA= 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=cFCwu7LO; arc=fail smtp.client-ip=40.107.212.66 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="cFCwu7LO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dL7Ef0NPUo2yum6xVZ+Iou6eASVh//t+hrpYBhEnhUbgxfCSqMbuutHSmJtd+s4r4iSVtl5DqlufyZDKUz9umX4rU+/U30e7JjgWLeYefi479pqSXD1NIyMatjmrva1Mgc+JrKgPrTOWTUGqOyI7ACJv/K4yj+6y9qVALUHxl3+Sb206MLXPfKCUuUD9SsHFi4c4I7jb2taqOJkFev+O/ibsNXGF1yb2QSOuiuXgB1Q/JQXGOj5nBFf9O9ladOxrWks3dHlOz0l9RZCRqQTVKZiwDDj/XNn2YgF9CtOcBa7X6sQ3dmQbTqeOLiY0SxKCPkpcFleoVOcM94Gnza7g6Q== 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=rkL7D3UE3FQj+F2O0O6sABtRz51PmXjFWY+kdAxvrYk=; b=TqbieWBulcPzqz/ovvlSsKDwuuAADp5bJXGn1NkpCtIOfVxNrfbGnN/OaK+XaMxsByjNR0VhIdI+t2fNxhr8krnTghylK8K1aQVHk1E1avSPKkYIR7gUCbRcVXwsYQiwxrOy6iMSUn5CVPfycU3xwfFw1m0l65OJa3YDZePCzwpnbTUIxdIOI9ewRi2Qm3cqLvHWAcjptiYhXbG5XeEUtLSEDiQaj/230UV+mU+EjZ5kQuxutvR+pfjD7jsqRo9WXtj6eqIKQCbWoZ141KXD6guVcrpeI6z2VfKXl0fP4NnrRZXLUtOmzsxYc+bkySmEdVTmEoyhrRbYiBXRtWP0gg== 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=rkL7D3UE3FQj+F2O0O6sABtRz51PmXjFWY+kdAxvrYk=; b=cFCwu7LOsg3rNl7HK4v7Wrb1W2dEHB2Tqiw7CqKPjgfVsivcm4m442XkW8q1I5vlmHIi2IO47aAcdX/DyhBdQC8YHhAAXOEtzOeyOg14HbswjOkRuUCGPTycDmdF/+YBurPtwETRAUh2KaCR/IvlXtWZtr2sbn5Ba4KurWcACwM= Received: from BL1PR13CA0336.namprd13.prod.outlook.com (2603:10b6:208:2c6::11) by SA0PR12MB7076.namprd12.prod.outlook.com (2603:10b6:806:2d5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Wed, 24 Apr 2024 15:49:26 +0000 Received: from BL6PEPF0001AB58.namprd02.prod.outlook.com (2603:10b6:208:2c6:cafe::73) by BL1PR13CA0336.outlook.office365.com (2603:10b6:208:2c6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22 via Frontend Transport; Wed, 24 Apr 2024 15:49:26 +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 BL6PEPF0001AB58.mail.protection.outlook.com (10.167.241.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:26 +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; Wed, 24 Apr 2024 10:49:22 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , "kernel test robot" , Len Brown Subject: [PATCH v4 5/7] ACPI/NUMA: Squash acpi_numa_memory_affinity_init() into acpi_parse_memory_affinity() Date: Wed, 24 Apr 2024 17:48:44 +0200 Message-ID: <20240424154846.2152750-6-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB58:EE_|SA0PR12MB7076:EE_ X-MS-Office365-Filtering-Correlation-Id: a2ee16de-8051-476d-79d4-08dc64761ea1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|376005|82310400014|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?17ZotaIhXAeR2FAj+PiiwuP3OhLu9Y2Wh6gVh1P3UvmALLiyysnMw8alxwpw?= =?us-ascii?Q?NN6mEqSWmC/96vJaHX43Jf6Sww3KY38iN//r2D8gPztuH7GVCss8TOszElf0?= =?us-ascii?Q?GVBhaYpTozpIThev6NQnE0TwslTKd75mGIGVpbHm1vWKw/AgIzP+czt7nSen?= =?us-ascii?Q?ynuB/2PfrLzTPQiFa+mgAZyanrp5pe1nN91uHdjB2Jn9B0kysfXCd1nOGL7f?= =?us-ascii?Q?bKwoTrp+JTqf2osdIzP3xwT2Pd0IwfaaRM0hTL/RyeEpBM+CBy/p0vIKgniJ?= =?us-ascii?Q?lXxCSRVR8I5yxlhlIAZEltUnt+IBQOhCptbhO4ZaIuML8EtQTBe//BCEXJRL?= =?us-ascii?Q?xOIBP1bDZb3GXWSNi6Ac72ch2Y7QvG6LIDKhcz8EP+E26PpulpRrsAznviEO?= =?us-ascii?Q?So+n9hUicnJZe5pVcQoujxeqH6zbNgPflBk5qGdCo2YBfg9re+lz539DzB3y?= =?us-ascii?Q?43ritUSwl8xMPVsptdGrTbGyU9YTq2Dx52q1VpLIqZ/22BXTNManL3WOLvH+?= =?us-ascii?Q?xS/TFS9jmBTaprmVaoa42YqXLaGtO/uhfBurncOPdkAsNLOXsj6E3WIH+QDd?= =?us-ascii?Q?9e/2i4QA826kNOU9aCbff59nUtdW+LV/8PGZEql8tcDQBRRq60jw2GyQJ4A6?= =?us-ascii?Q?BgsjsnnV0RBv3c1wyGvj4dGC+J4KqCkDvptPTGlfMoMMrb5gCGm2RXZR+ZqU?= =?us-ascii?Q?pMN/SnFPOcDwkypFvFWbfyu2zVlbcV8yXT0PxdUSkNDZsdXmWVTWLlUSEeWN?= =?us-ascii?Q?ImKO8aTgw+jIOeSrIOi2ifhRhh5IF8lDWx8nCivWhivhUDIdTV2QBsoVxU+q?= =?us-ascii?Q?x7HL+pqsKoAK2BNR1XHr3qjjQALcp+9sla6e7gZdjajFucGAidheYfSb9/Et?= =?us-ascii?Q?Z939QW/1/qPlygwAY0VeUgLL4f1XkCI8f9cSnmyVAD9txcV0LfeM1pc6GBh2?= =?us-ascii?Q?js2qmcp8jkt+hdGfojzRnvuffOpGWOCSs2WLeBsJypNvYpwWc1U4ha5mY8zI?= =?us-ascii?Q?YHhfiHc4pxjOE4eCt5uwcl7EYKrJtD2d+El0uoJMfhNrFYFkSI02a//r6IDC?= =?us-ascii?Q?eRLOMEsxNk+Q7WEPCzbILn2Iun3hmvvnEqdZZEzASZJrVhx6SCHLBDgnmiHs?= =?us-ascii?Q?llU2OrwidifhUNsBT1Lt+opTZcGIqXjLYfytiR82RHfJdZ8tTDxdUh4ZdtS3?= =?us-ascii?Q?7rTAKi/F9LZFk7wClmS2b11ns2em6MRgZXyrd1voe15VXQ34b7t86L8tNBX+?= =?us-ascii?Q?WTzSjLVHkHD0wQhMxPrICIvf6nyF1IrL8u7s5FiD8QfVqQe+6EwSR38QTmvk?= =?us-ascii?Q?scBi+TeKh4Z1cRAWd41n/KZa?= 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)(36860700004)(376005)(82310400014)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:26.2116 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2ee16de-8051-476d-79d4-08dc64761ea1 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: BL6PEPF0001AB58.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7076 Content-Type: text/plain; charset="utf-8" After removing architectural code the helper function acpi_numa_memory_affinity_init() is no longer needed. Squash it into acpi_parse_memory_affinity(). No functional changes intended. While at it, fixing checkpatch complaints in code moved. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202403220943.96dde419-oliver.sang@in= tel.com Reviewed-by: Dan Williams Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 430ddcfb8312..e3f26e71637a 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -248,22 +248,30 @@ static int __init acpi_parse_slit(struct acpi_table_h= eader *table) return 0; } =20 +static int parsed_numa_memblks __initdata; + static int __init -acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) +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; =20 + ma =3D (struct acpi_srat_mem_affinity *)header; + + acpi_table_print_srat_entry(&header->common); + if (srat_disabled()) - goto out_err; + return 0; if (ma->header.length < sizeof(struct acpi_srat_mem_affinity)) { pr_err("SRAT: Unexpected header length: %d\n", ma->header.length); goto out_err_bad_srat; } if ((ma->flags & ACPI_SRAT_MEM_ENABLED) =3D=3D 0) - goto out_err; + return 0; hotpluggable =3D IS_ENABLED(CONFIG_MEMORY_HOTPLUG) && (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE); =20 @@ -301,11 +309,15 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_a= ffinity *ma) =20 max_possible_pfn =3D max(max_possible_pfn, PFN_UP(end - 1)); =20 + parsed_numa_memblks++; + return 0; + out_err_bad_srat: + /* Just disable SRAT, but do not fail and ignore errors. */ bad_srat(); -out_err: - return -EINVAL; + + return 0; } =20 static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, @@ -438,24 +450,6 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *he= ader, } #endif /* defined(CONFIG_X86) || defined (CONFIG_ARM64) */ =20 -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 =3D (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 =3D (struct acpi_table_srat *)table; --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2056.outbound.protection.outlook.com [40.107.101.56]) (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 DA10F16079C; Wed, 24 Apr 2024 15:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973772; cv=fail; b=tfggPN8CbtZrD+ovu1uNTiUmM5BeFJEa8nYsydmhZESRPhcYJhzyyld+WXOXeQWyc5TDaWSuSCGGq14TLJSprsRyRgDGPIj1pJa3cSNC+jtVPU15F3T/1ML4/t2jba8DBBdal9yThyCybX+z6tQzxn1bnoN0C17/qk13ebGdquM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973772; c=relaxed/simple; bh=CbBWWmOXMZJr+vcvwQUw1+jmvgt/g91nyBpwqi4k33M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ceGw0H02CTke9R+rf9nMqrBjJlnArzsJqdRgVWM4fe1BMvgAhTB1HmlhVk193MuR7+gXfPvLD5szKiyLNKT0TklgjmlMiSdB6r6KNaVTpbgd/ok41/mIptjGKx+CC9B+QlOHBEqC4R22h1+/qraK5GsMVSKwn22iDRUka2AV390= 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=oTNEOfyd; arc=fail smtp.client-ip=40.107.101.56 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="oTNEOfyd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FTjL0d4l0gn8anbCKX7GAgyDF2x37KD0Jf5rRIT4Av9OUweLNx4d9DaHV3I39flLJRo2IPc7GCxojP+4aAtIc1AMj9xuzDWeFv+1sBJrOlTbjM3Y6kFjbESxyxgVG7koZKpxAz/q6xqCUG39oqRtkIXzDmkeEgtaU9SKDjkapfvDad0M8mGGbHi3wDCZUqAahsJmOKrx/ELlRAJqJpQn93xnx7AcrU/B4NqLTgFc5ozFHob+CaVVYifiOPavGI0rtJ61YR21VkIR0k6P3K1oNCXThmx/GiKyKwce+u8kKtMtjIV+NdPL/aWSt8qjnwAGzopJkwPOYx03UoJcP1ko2A== 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=Ob0xrBAzWy2sgbstIGdjZMOKVz6xPbKy5SjQ2fC0UZE=; b=MQX+uEZHdfS2ZHPn7ikdKcUyYByzzndiTgjXpfXgv8lpKrRlCcnRYCQng77B+48gDgRyBl7fT3yGFzQTTjVMo5bzKwExNFF169ejqTx5UFrhZ6K3P6JqpE2y4GuCast0eb2j+R/aBSg5uKcHZDdImU+jFma6h2Xx7mlHqJAQ8WpdPqamhIDQ3LjE7t8Ah+OK3bcFLLDhaDgcWH/yvRfzahUx6/wYlo4bAW1u4Tgdpm7qTQ18caFHvVQidXRPrKTwvPbwv0QkdbZ6L3EgfYeb45HHOirsvOgCemULB4+8WRU8f6EsCP+6rD0NDyP2b0p0b2lxBRtmniRyzx2CKl4uwA== 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=Ob0xrBAzWy2sgbstIGdjZMOKVz6xPbKy5SjQ2fC0UZE=; b=oTNEOfyda28hdQGSbcqXOU8AUuWq14bpFAxZ5Z/tkpv6Fecm56hHFVp/Gs81kkuRnUTo6pRHc8B2PL/w+abzeLHdY3D2fKOObndgHu2mJ70wFtmkrRbENqaYV+PfDncoDYWMfA92RYTBdaaw8oGCXGdtFSeUHl16odIOEMQDrVI= Received: from MN2PR05CA0011.namprd05.prod.outlook.com (2603:10b6:208:c0::24) by DS7PR12MB8420.namprd12.prod.outlook.com (2603:10b6:8:e9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Wed, 24 Apr 2024 15:49:29 +0000 Received: from BL6PEPF0001AB57.namprd02.prod.outlook.com (2603:10b6:208:c0:cafe::b2) by MN2PR05CA0011.outlook.office365.com (2603:10b6:208:c0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.24 via Frontend Transport; Wed, 24 Apr 2024 15:49:28 +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 BL6PEPF0001AB57.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:28 +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; Wed, 24 Apr 2024 10:49:26 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v4 6/7] ACPI/NUMA: Add log messages for memory ranges found in CEDT Date: Wed, 24 Apr 2024 17:48:45 +0200 Message-ID: <20240424154846.2152750-7-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB57:EE_|DS7PR12MB8420:EE_ X-MS-Office365-Filtering-Correlation-Id: ebbc7451-2034-4e2e-f2b4-08dc64762039 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|82310400014|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?64PXKo6orVqAgyg/T/jb3LzmsbP146CMqKuwaTU8CiUJP2YxU4y2CtkVx+iP?= =?us-ascii?Q?EvpCZ2nAaoZH6LuNuSiI8/I3fTso+VzaTXLMLs5sSsk4RxJFiAx3CoHHl92v?= =?us-ascii?Q?1QUkdQYSIUPf92W10xz9lJHQPxMXcRNVakzDiiuDiKSP7FrEMX8mFAdiCf6V?= =?us-ascii?Q?4Y/S2igEthkVQB4rIg2UymW8itY5uMjV7AQrmFlzwB/r226STnBcSwvb9b8C?= =?us-ascii?Q?9W1eWkZjXj7SorIw5fdobjYJ7TWI/U5hTbArlG3nWxkewuqffX2S/fOwme4z?= =?us-ascii?Q?nbniiXZFMeufRBo2P8PZbd+ZUemUVYGYGgCGQEIvwRl+LuH32/vgbKER0D+m?= =?us-ascii?Q?tQST2G3pXm2cUZxx1QkSg21vmyT7O+yIKAID3wWGfy9tWK+2lrQWVPA7PGyv?= =?us-ascii?Q?zJ1S0L3R1B/ejvws6ML3kJPMYlzrTsSnRN6kQ5wIfMy4yU9tSBvhEaFQO2CY?= =?us-ascii?Q?EPRgv2huheKbOyNJ+WgOXQpivySpREWjdsOSFrF/0n1Q2EI5I3dkyOLm6O9O?= =?us-ascii?Q?ZO9e9MpZK8W68aAn6xOD0A4wgUKldDG2wdg4ehpAeQ0L9FNGWoCg4PfBRsUe?= =?us-ascii?Q?eYBKCSkORVGbVpGXNO1y/X8TAgf1nsqNG8PsBqFWpssqkr4OicIfbszrgmhz?= =?us-ascii?Q?GWErRzt0PYu+0I4MM6NvTmjQkdzm2Wjgd7WcQa3vuf6fcxrZE7Vd57vEsqPy?= =?us-ascii?Q?2Iqf2gmWCw6YYhPe1EvzdCrspx+bGVFIvrItNMKWlzcLE+MxxAyQqovJi+4c?= =?us-ascii?Q?vjNNuSCKvtCe61QnzWRD05Dt/+YuMqNuJygSBYJxQD+OMJ7J2UEJrnv2xTnw?= =?us-ascii?Q?6DQ3EiH2Q7uEmLTvXU0FxonmiCa50qczNkwKn4qVd2PdsgX+bDrdMcK97FO6?= =?us-ascii?Q?8ySd+zSupX7bBES4VM9xnzXrhKI0CEDpubTyMy1FMZ4p29zV2bgMsJRAzNVO?= =?us-ascii?Q?lpa627AVlRvWwuRoSAOHgfxgbFsQWVKIwps0W4cJbjn4/40rcjApAGfZtCnl?= =?us-ascii?Q?oOp/aY5E/jpBivhua5DtCwpY0NKkb0MUzTdwMRowBG6quHaAPfEQf84wpv/q?= =?us-ascii?Q?jfsKpjNMtpn/LLYWfwtvvjwGLXzS0ndn87BbcQg0ZnQpwL/0+pSpN2//ik7j?= =?us-ascii?Q?0rFWtdBjarx1WAq+jGWtMPlrUN5W0ZIqNeXnPxngnUVBiJ2SIpIHLIYuA2dQ?= =?us-ascii?Q?q/tEVyA3bUPsLgrlIW/HJh/EDDDLi2Hgwme6t+3CgCZm3fy5ju4M+FQ18CnS?= =?us-ascii?Q?Ehcq3bXM/bg0L25jMlcZSkcTYFrfoMKzmPDK+rBX2ckk8aZuKvFYOvPcDvq1?= =?us-ascii?Q?x1uHetE7zPQQGanOvrVKjiJYJMMn9LFF21At8BA0EsmupUzwYz0gNTojcKl1?= =?us-ascii?Q?pdG/IZ32SKyu7irC0Owbq8uKG0EQ?= 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)(36860700004)(82310400014)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:28.8886 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ebbc7451-2034-4e2e-f2b4-08dc64762039 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: BL6PEPF0001AB57.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8420 Content-Type: text/plain; charset="utf-8" Adding a pr_info() when successfully adding a CFMWS memory range. Suggested-by: Alison Schofield Signed-off-by: Robert Richter --- drivers/acpi/numa/srat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index e3f26e71637a..c62e4636e472 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -338,8 +338,11 @@ static int __init acpi_parse_cfmws(union acpi_subtable= _headers *header, * found for any portion of the window to cover the entire * window. */ - if (!numa_fill_memblks(start, end)) + if (!numa_fill_memblks(start, end)) { + pr_info("CEDT: memblk extended [mem %#010Lx-%#010Lx]\n", + (unsigned long long) start, (unsigned long long) end - 1); return 0; + } =20 /* No SRAT description. Create a new node. */ node =3D acpi_map_pxm_to_node(*fake_pxm); @@ -354,8 +357,13 @@ static int __init acpi_parse_cfmws(union acpi_subtable= _headers *header, pr_warn("ACPI NUMA: Failed to add memblk for CFMWS node %d [mem %#llx-%#= llx]\n", node, start, end); } + node_set(node, numa_nodes_parsed); =20 + pr_info("CEDT: Node %u PXM %u [mem %#010Lx-%#010Lx]\n", + node, *fake_pxm, + (unsigned long long) start, (unsigned long long) end - 1); + /* Set the next available fake_pxm value */ (*fake_pxm)++; return 0; --=20 2.39.2 From nobody Sat May 18 05:34:48 2024 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2045.outbound.protection.outlook.com [40.107.223.45]) (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 4E6DB16D9AC; Wed, 24 Apr 2024 15:49:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973776; cv=fail; b=SyuKT7LzJgIpSieLi25WjkAIsJdk8ue4WpJy+wcxIqpbRiB7adiRBsp529k49m+8CzoG9w4Wsto8BN0NYSwUFKXuDGBmVW1gwwTRnDYkp+4ovvjTdCD40S9wV7yypUX6bFj8qGQUXb+Kc4tbDeOBZAJs9vhQ3jXq1QKVIrDGtUk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713973776; c=relaxed/simple; bh=pdegn2ybvQNWM/40WYDhRDHQgU7lJThU1MMuwgbXfoA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d8SnBz37yDOG4HM/1B5PUfoW14j65ErH7RPmq19w1g5RUlOq0u5z4y2pzl7p3qp/Cploy0lZnhKvcI8Msf5Lo7eJnhK0SamdJlBu3noWDN9DcQhEQTER8WeUreMfZEtNQ0sHi5778oPHhoO+ulHicQvQWOgvlhSaIo93JiXOyf4= 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=mf5dn3Wa; arc=fail smtp.client-ip=40.107.223.45 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="mf5dn3Wa" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OjJKH//CDUb51gX0laKThoLPAosROaEIqesy1QH+ssW0Xbo24dK3VSbylKSVCHD4McvXgazJLF5TLvodWFbOlbruHfM4eXRqnjtWUzTnd+zY7FSgUVWjkTVVtG1Wrzg27hZN98dPZH3ku++4PW0CBHBdgPQ3EIiukeSx+L4IWlgGR0Y2OtH2ToO+GJoDm/FocyQsR5JchvwsGAAY3weZXim2rIpju9U2hVUiUdhof8xcFgfNL7BEZjM3R+OxnHN3XHgVqE56op+a9S6LydaFd0yU01rzRTZpRQbaKC2LcQymO/klGXsI7e90PRcZoGUKRH1SnGlCT5HjSQ/hO0MjJQ== 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=sOsN7lDWHj1zlGToBzwiEF/usRnRAugpAK+8dJzwf7k=; b=OsNhNGqAGXDs+CO1ig+du2Fi7yURymef6PP98nHmwUN+GbwaCsmMEumXlzkvivbsI5cSNGMS6a4JeNhwgToX5bGHtKLmTArLdgHlLv9AL9ELiMbqQVSzjqBBUzVvLV1OJl7WR8dGUpSPVzg4ShHbBO9lZT5ieiO96d5kbZyGQW8DX9abgE09BZHv1zeQbG4y5D443+vLEwgJvRGzyIacXl/8cZSQ3YR6H7ooaUDtIP9AbEf6yH5spviJvZ1bLnENdpGbgr8isSuljEtQA+Ke5NveRS+UhPgK9tc715UPMBVo2blSElgI2zrQAvAM8dY3QhDoCxhXuLBjupnjkUPD8Q== 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=sOsN7lDWHj1zlGToBzwiEF/usRnRAugpAK+8dJzwf7k=; b=mf5dn3Wa0HMvVTiCqqP/AlFt7myWoES/8PpqR58Rs/OVO+YJ+OLBAbfy9ESJkTGBimTeu/OaL3kFs8cH8d/r0YN+AVdbLZNNK7jKC/HurQ1LoPIc0sav1UgA2qZt0XiOBvxzyEVUewhBI2Bn0OV4pFIwRCxVdEFyHJdY3bLg8WU= Received: from MN2PR05CA0008.namprd05.prod.outlook.com (2603:10b6:208:c0::21) by CY5PR12MB6576.namprd12.prod.outlook.com (2603:10b6:930:40::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Wed, 24 Apr 2024 15:49:32 +0000 Received: from BL6PEPF0001AB57.namprd02.prod.outlook.com (2603:10b6:208:c0:cafe::52) by MN2PR05CA0008.outlook.office365.com (2603:10b6:208:c0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.24 via Frontend Transport; Wed, 24 Apr 2024 15:49:32 +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 BL6PEPF0001AB57.mail.protection.outlook.com (10.167.241.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 15:49:32 +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; Wed, 24 Apr 2024 10:49:29 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter , Len Brown Subject: [PATCH v4 7/7] ACPI/NUMA: Print CXL Early Discovery Table (CEDT) Date: Wed, 24 Apr 2024 17:48:46 +0200 Message-ID: <20240424154846.2152750-8-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424154846.2152750-1-rrichter@amd.com> References: <20240424154846.2152750-1-rrichter@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB57:EE_|CY5PR12MB6576:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e432e3f-49e6-42cf-dc3a-08dc64762229 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?4iKjBHYJ1r9HDqTFDcubm1l1eUcvDQ6h8B3EZKk8jmFKtc+GCLscwUrjqQ2U?= =?us-ascii?Q?AyVM9CVxeM+KzAlGEbpvparVFIl+1L7oAvzrE1K1Hewoq1jp3qYXfrpNXax2?= =?us-ascii?Q?U1gocVb96P6CknMrfg6+d/nUgHdGunIHygy4iMQUAlvvN2fRr+go84kiQNDF?= =?us-ascii?Q?4aIiyTNvFVjHNLnire8fvjn7CaNIoNeKJY1xNA0rI8NiiOZzEIQrK3oaDrIc?= =?us-ascii?Q?Ys/KqFLJzssPKNkWjmbkSekvyRxKtnCZ0XOKXm4/qhFCZLSGq7b465CCz/Zy?= =?us-ascii?Q?UwbeqPiV+0iCSZj0q7jOh1RD8/oltZ4wy7/gzhbxYybQQm2c4H08i4UIKwyz?= =?us-ascii?Q?XmYVCUzWlppiqHFPh5S2x36fOiwP7pmB5yCzuxXR9+wRPM+H8fiZGkSw8srv?= =?us-ascii?Q?aKTSooDiDah2RADws6mR/T7ttOc9yOLTd0RgGFJwJ8WWrdzJ5X3zEkV5E8/F?= =?us-ascii?Q?Qi3eRxUFbAXXzZI/BEvhKJmpIaHjzz1sa4HM1SBNS/JR+2hH8ijc95DBel3Y?= =?us-ascii?Q?PcKbW3rQnbZTLK3VFwPaR3Nz9LIHg0FD6Rlod85ZKWBhm1ehOghIGPZUxaTP?= =?us-ascii?Q?f6Eyd3MY/BaB5/4nN5V8cwBjJoO3ZA0EPKrRrC81G8WEoRyqCTVYVqc0b8IN?= =?us-ascii?Q?zZ+L/sS0yVi94iNcsUQGffhnptOUF8CGjdpoPYPKPmWT14O5DuMXNOOHS6+1?= =?us-ascii?Q?ZLJDDxLosI6p0/Vbr35CNeKk7ekqvqoNSCSCJWYUyULfiY/Hx0MfgtBdSGqp?= =?us-ascii?Q?Oh0MunvbAVLxG9iS0gjQFHvdZKaG1yAnod7/2X4hRMIaHyuFzaNczI0q6Shi?= =?us-ascii?Q?pRAox6Rmm9iSDK7NVN2UhoRpXWKl8I1oHL7Ao+r123fS0jn8JSGJC1PxjbyO?= =?us-ascii?Q?sod2f6O1E72zvZZSHaX3tl8V1JOeo9lvLXqDq4YX7ILRzaO1R1cuSmizY7fl?= =?us-ascii?Q?X8Dl/MbEzDdQq0Zt81fzLs2B1fhyn3/SV7u9lX3SZg3NztJkt/UJPYlAJXg+?= =?us-ascii?Q?3Ow+/l2AnK8dlqrDrJ6BFiRlollXNvaPwGO2aRxjdBDyTtwARIyQXVC1aqDO?= =?us-ascii?Q?4yUsf+PcQluDuxcfT/b+P7HxvIOeKIZL+42Cd7iXWvFakn08at5ebcGmP/EN?= =?us-ascii?Q?il1grzaEcnhOkHuv63tnmJhHkPH9VHRDzmIeSViMOviHVebm9Cn82nBXWSpJ?= =?us-ascii?Q?sCmox2jabpDTgzo/f/b7XklTclS0zc5UchITVMsFrZioMt4SfetyHTMWegBZ?= =?us-ascii?Q?wOWcFTs+LaCzOKMaG0gyZNBPeoZSVOOh2uOydKnaJss0nIn5QXxxX4kJqmoW?= =?us-ascii?Q?XtNjHnItJpRuahC3zkbPTTBjlS8Ws3JiHvrzINj5R722dL5Zyxfk2dLS74gZ?= =?us-ascii?Q?WIEj2KE=3D?= 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)(36860700004)(82310400014)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 15:49:32.1386 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e432e3f-49e6-42cf-dc3a-08dc64762229 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: BL6PEPF0001AB57.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6576 Content-Type: text/plain; charset="utf-8" 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 | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index c62e4636e472..a7285d23387f 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -320,6 +320,114 @@ acpi_parse_memory_affinity(union acpi_subtable_header= s *header, return 0; } =20 +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 =3D (struct acpi_cedt_header *)__header; + + switch (header->type) { + case ACPI_CEDT_TYPE_CHBS: + { + struct acpi_cedt_chbs *p =3D + (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_debug("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 =3D=3D ACPI_CEDT_CHBS_VERSION_CXL11) ? + "cxl11" : + (p->cxl_version =3D=3D ACPI_CEDT_CHBS_VERSION_CXL20) ? + "cxl20" : + "unsupported version", + p->cxl_version); + } + break; + case ACPI_CEDT_TYPE_CFMWS: + { + struct acpi_cedt_cfmws *p =3D + (struct acpi_cedt_cfmws *)header; + int eiw_to_ways[] =3D {1, 2, 4, 8, 16, 3, 6, 12}; + int targets =3D -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 =3D eiw_to_ways[p->interleave_ways]; + if (header->length < struct_size( + p, interleave_targets, targets)) + targets =3D -1; + + pr_debug("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 =3D 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 =3D + (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_debug("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 =3D 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) { @@ -516,6 +624,9 @@ int __init acpi_numa_init(void) /* SLIT: System Locality Information Table */ acpi_table_parse(ACPI_SIG_SLIT, acpi_parse_slit); =20 + /* 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 --=20 2.39.2