From patchwork Tue Apr 30 09:21:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 13648612 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2067.outbound.protection.outlook.com [40.107.244.67]) (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 DC0E219DF45; Tue, 30 Apr 2024 09:22:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468945; cv=fail; b=VDJz4F954/l3V29gtbXNaq/yvJbXt3P0MY5QaRoNuHUDg4xbLe0e1nYPVvygd2dSHCl+8wxZXPRcOHosEqNfWI/jLp3Xu7NSsy5d+BBcwgLxYkcFhtrJlfnkt9k/JlAOXJPHLbA9nHLDCeqDveMIY+ClpRMVm3EZbaFR5VfrmNs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714468945; c=relaxed/simple; bh=ALE6JfSX6aZwHJAwYpZFE/bDf1WRPDKKVVZaRFpep80=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=YnQ46Au7NAoRvwIPMnvGjXX9x16IRVDlFZfj7pKSxNjpecj/3QJPmdLfs8xE/ZUlTTWyEgAUTwdVGtHVOo2ENAoLd+0NVyNIyqTa27xJCQy+CcAzdLEIKVO/ua8Tg9qYgm/ojrma7cbY4R+HcNBImb7uIs8K3lvGKRWAIBFRwSs= 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=zF4rex7S; arc=fail smtp.client-ip=40.107.244.67 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="zF4rex7S" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lf9xHi0QCNUqQDX33Edz7PDFVnGult5hCDU3pTm+f05Bq5blNXRt78AUSY41NOMuu3CedGJfJU4fUjdG969maJPXA5B/dNrd3BMiQKAjQ6q1uJnczD+6pbyPVYCf+UMqRiff8TjtLwEqnqX7KAGWui9nF/bmoKIc0/d4S+97DmDNaB3BSjQ7+kABg7+f1ieVhIY10Wbc4NlxsynsBmRcKO8jhRn3RJ5HdrRMkF/wknymyLk2LHJo4/ZAkzSEtjz5baTYXZ347TTWOH+gKdOA1s8OGyRT4VaAWPJtuYJ9rv1gF/+T1ims14q6ZogccimbsmD6wHQyciKYcE5O+GOldA== 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=ca8AkeLuqhVtooLlvja+NozjMg+iAwH2uC8qqoY4ajw=; b=BRQXlM7iusvxykDebSdRAGaMMj0MFchG3uNyWNJD+ShQe8TBflFFBV+ewQsSrAR5xSAAvtm/p4/RcjHt2JH665gKao76D53mHQ/M84PxGFFm0/wzpo4qb3AFL4oE1xZQZSRiIM4Rbw4JR5Uwu/QKlpYSmAelrnIyPxQmmG/qXwIfUG+mS21QHcFL3Ud+K6NDac/ntrvFuViVcFOznFZNV4YgcbHg2jVk8ado58iFxmrKLMk3bN49PtaV8+AN0YgTgkm7Tuo0KWrpKxT5L4JGnZsz1gVyQsi8xFE8XYkMKGN7QRZDAqNhJjwsYM8rN1loWSqWBTP/WSFa+LjnYlqX1A== 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=ca8AkeLuqhVtooLlvja+NozjMg+iAwH2uC8qqoY4ajw=; b=zF4rex7SfS4XLtQK0jDVGg8hj4KY3dYhRt7yFUnU4NivtyciIqwbS74mEh4UCqtTgAB735ohT3gqBYxLH6xweomfEPwO8PTgLiS08r8LRgCazrngqOPo8+t0KWSzDiA58Ijg3aawXq9WRRvZM8OrpbZid3ox0hlX8zWfgE0CVjk= Received: from PH8PR02CA0023.namprd02.prod.outlook.com (2603:10b6:510:2d0::15) by PH7PR12MB8106.namprd12.prod.outlook.com (2603:10b6:510:2ba::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Tue, 30 Apr 2024 09:22:21 +0000 Received: from CY4PEPF0000EDD4.namprd03.prod.outlook.com (2603:10b6:510:2d0:cafe::2c) by PH8PR02CA0023.outlook.office365.com (2603:10b6:510:2d0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34 via Frontend Transport; Tue, 30 Apr 2024 09:22:21 +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 CY4PEPF0000EDD4.mail.protection.outlook.com (10.167.241.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Tue, 30 Apr 2024 09:22:21 +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, 30 Apr 2024 04:22:18 -0500 From: Robert Richter To: "Rafael J. Wysocki" CC: Dave Hansen , Dan Williams , Alison Schofield , , , , Robert Richter Subject: [PATCH v6 0/7] SRAT/CEDT fixes and updates Date: Tue, 30 Apr 2024 11:21:53 +0200 Message-ID: <20240430092200.2335887-1-rrichter@amd.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-cxl@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: CY4PEPF0000EDD4:EE_|PH7PR12MB8106:EE_ X-MS-Office365-Filtering-Correlation-Id: 542ff614-d91a-4fe8-fef4-08dc68f70a11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|36860700004|82310400014|1800799015|376005; X-Microsoft-Antispam-Message-Info: fFR+nhZAg11RqgmaVSX9d1V/bJlkA/vkI9BqOR/rK8fbb3/VungXZsI0GqpdsP2bZMKH9kjFJOx4gbTOPQ9W1FPkY4zFOSWFx4hIjRfoc62w97tU6Jocq5cIPMT/VCb6Cade7fLEJfrjwujZ+5jR0Gud5yqwTC6A04sAsWmEdgYOQMGAafnvkT3ghbCSyUHMs5YfS5GA2OO/iOw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skS0BnIJN466AS4rpAg4qiURbbfMz5L8k54EIh2ngcX9VxsxY8ihM4uCAOFDm/oeTJiiRU8zDYCYbNFl9BACfuN6lL+iDu1nosWLPldO9g3bhBe/vjZ5 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)(1800799015)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 09:22:21.3836 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 542ff614-d91a-4fe8-fef4-08dc68f70a11 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: CY4PEPF0000EDD4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8106 Some fixes and updates for SRAT/CEDT parsing code. Patches can be applied individually and are independent. First patch fixes a page fault during boot (fix as suggested by Dan). Patches 2 to 4 remove architectural code no longer needed. Patches 5 to 7 add diagnostic printouts for CEDT. Changelog: v6: * rebased onto cxl/fixes * fixed 0day build errors in patch #1: https://github.com/intel-lab-lkp/linux/commits/Robert-Richter/x86-numa-Fix-SRAT-lookup-of-CFMWS-ranges-with-numa_fill_memblks/20240429-205337 v5: * dropped: "x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()" * added: "ACPI/NUMA: Return memblk modification state from numa_fill_memblks()" * conditionally print CEDT extended memblks v4: * updated SOB chains and desription * added patch "x86/numa: Remove numa_fill_memblks() from sparsemem.h using __weak" * Reordered patches to move CEDT table printout as an option at the end * split print table patch and added: "ACPI/NUMA: Add log messages for memory ranges found in CEDT" v3: * Rebased onto v6.9-rc1 * Fixing x86 build error in sparsemem.h [Dan/Alison] * Added CEDT node info [Alison] * Use pr_debug() for table output [Dan] * Refactoring split in 3 patches [Dan] * Fixed performance regression introduced [kbot] * Fixed checkpatch issues [Dan] Robert Richter (7): x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks() ACPI/NUMA: Remove architecture dependent remainings ACPI/NUMA: Squash acpi_numa_slit_init() into acpi_parse_slit() ACPI/NUMA: Squash acpi_numa_memory_affinity_init() into acpi_parse_memory_affinity() ACPI/NUMA: Return memblk modification state from numa_fill_memblks() ACPI/NUMA: Add log messages for memory ranges found in CEDT ACPI/NUMA: Print CXL Early Discovery Table (CEDT) arch/x86/include/asm/sparsemem.h | 2 - arch/x86/mm/numa.c | 37 +++--- drivers/acpi/numa/srat.c | 207 +++++++++++++++++++++++-------- include/linux/acpi.h | 5 - include/linux/numa.h | 7 +- 5 files changed, 176 insertions(+), 82 deletions(-) base-commit: 5d211c7090590033581175d6405ae40917ca3a06