From patchwork Wed Apr 24 15:48:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Richter X-Patchwork-Id: 13642149 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-cxl@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: BF8mBIsvA+F1kiuqOVBNxhSLeQu97KO1yypbybnvSLMyjeFcazC69zdLa3sVYy7/mUn9/HdEqQrr9PwcBPC6QN9UX/jUS57DvDQXggWbD+bBMTG3oBpCgG4BefwjtcZOy8s2gSVwBHisFhv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DwsXMrXsQCSoBxTEqcdaweAdwrwEC17XwyO2ei9ZPb9kNo+jbVT7/xwrC7XcECIfKIbErc0Bc+QdeGF7MFiYFqw86qjjL3ZFaS+Gnt6du2qr0QbcCjD1C5m/SP4WcURQWjAFk1ujSacycP7sK4Q+oPFP35tdTQc= 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 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 end) * 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 = (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); @@ -238,6 +244,8 @@ static void __init acpi_numa_slit_init(struct acpi_table_slit *slit) slit->entry[slit->locality_count * i + j]); } } + + return 0; } static int __init @@ -341,19 +349,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, return 0; } -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) {