From patchwork Fri Jul 17 17:59:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 235742 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp1927250ilg; Fri, 17 Jul 2020 11:02:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxewqVgoMdg5c5vZ8RiYh98LMLKT9Hkw/ILfLqP2KztD9+128NCrZrhZdOuwfZO+Df/qnyS X-Received: by 2002:a50:d09c:: with SMTP id v28mr10468651edd.58.1595008968581; Fri, 17 Jul 2020 11:02:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595008968; cv=none; d=google.com; s=arc-20160816; b=j3NXOgsvxBPf8qXtJFbnxydolH+BYm1NUvWDqm5x4mlukq87T48ivMdX+KN9DeNx11 t7xqHqVwQCMgcssu4dnhtymEPdBpOEvvl+I+GPhH498CR5sM02KiL+XlLwb0lteHAvUz wunAwm258hEeWth0qq4ynAuNgeXAsG7QPIJ6mJTsi92DvRyhgZufcxMX0UmMtzECRy9P tYqQRi8XiNMoWERLBYX4riCLKClJkIRSTti++AMWbx9fqYKCZiSti0jkRqVOeWi5qGL1 fEcTrprjATzNIGxzWdXElZEq1VgH/kF/jPxw7iRxhsLx6GtcRrN2gAsB0vPD5qtMMWE8 CEXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1OZ15YBeNKZbA8HXpqiStGSdggyUrdIBq5rTpeJt0zs=; b=a/lWm+Rnc15yAuNafkRdEGnnRI+GT9Vtzrrq5+ggv7r1qP+rBQUyERktLw/GBGN2Ur aZO8P+bbkjKhO7bhXdQmnnGs3RnVbi/FRMNjI4Koq1l0Uc/5Xdq6XiQPSCQcUNSR5lD2 qqHP9WK1Cr3ActMQi20NWijwH9v9MBm8yldKUrxZJKgm8xOyuzSEr+ZNhpxmW9LoNu7u YP9hHD5tKA0tWoAumuIOaFkuY42pxoE5IiVYZDCmpK4eYTWC2vW/Pc4JrbRO82RacDwW 16LN4GwAKWnpb+fVewpzVOCavOSyzXlGPx8wiL8LZ8HdEABLGs68tmAsT7IzDzB3aB4K a1bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz15si5538102ejb.406.2020.07.17.11.02.48; Fri, 17 Jul 2020 11:02:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726411AbgGQSCr (ORCPT + 7 others); Fri, 17 Jul 2020 14:02:47 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2501 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726322AbgGQSCr (ORCPT ); Fri, 17 Jul 2020 14:02:47 -0400 Received: from lhreml710-chm.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 4C0EE5B98F26BD47694C; Fri, 17 Jul 2020 19:02:46 +0100 (IST) Received: from lhrphicprd00229.huawei.com (10.123.41.22) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1913.5; Fri, 17 Jul 2020 19:02:46 +0100 From: Jonathan Cameron To: , , , CC: Lorenzo Pieralisi , Bjorn Helgaas , , , Ingo Molnar , , Tony Luck , Fenghua Yu , Thomas Gleixner , , Dan Williams , Song Bao Hua , Jonathan Cameron Subject: [PATCH v2 4/6] ACPI: Rename acpi_map_pxm_to_online_node to pxm_to_online_node Date: Sat, 18 Jul 2020 01:59:57 +0800 Message-ID: <20200717175959.899775-5-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20200717175959.899775-1-Jonathan.Cameron@huawei.com> References: <20200717175959.899775-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.123.41.22] X-ClientProxiedBy: lhreml706-chm.china.huawei.com (10.201.108.55) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org As this function is no longer allowed to create new mappings let us rename it to reflect this. Note all nodes should already exist before any of the users of this function are called. Signed-off-by: Jonathan Cameron --- drivers/acpi/nfit/core.c | 3 +-- drivers/acpi/numa/hmat.c | 2 +- include/linux/acpi.h | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) -- 2.19.1 diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index d933a4636d00..d4ba2eb21ce0 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2945,8 +2945,7 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc, ndr_desc->provider_data = nfit_spa; ndr_desc->attr_groups = acpi_nfit_region_attribute_groups; if (spa->flags & ACPI_NFIT_PROXIMITY_VALID) { - ndr_desc->numa_node = acpi_map_pxm_to_online_node( - spa->proximity_domain); + ndr_desc->numa_node = pxm_to_online_node(spa->proximity_domain); ndr_desc->target_node = pxm_to_node(spa->proximity_domain); } else { ndr_desc->numa_node = NUMA_NO_NODE; diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c index cf6df2df26cd..e7add2609c03 100644 --- a/drivers/acpi/numa/hmat.c +++ b/drivers/acpi/numa/hmat.c @@ -664,7 +664,7 @@ static void hmat_register_target_device(struct memory_target *target, goto out_pdev; } - pdev->dev.numa_node = acpi_map_pxm_to_online_node(target->memory_pxm); + pdev->dev.numa_node = pxm_to_online_node(target->memory_pxm); info = (struct memregion_info) { .target_node = pxm_to_node(target->memory_pxm), }; diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b541a0b444fd..a56386fd98a8 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -420,10 +420,10 @@ int acpi_map_pxm_to_node(int pxm); int acpi_get_node(acpi_handle handle); /** - * acpi_map_pxm_to_online_node - Map proximity ID to online node + * pxm_to_online_node - Map proximity ID to online node * @pxm: ACPI proximity ID * - * This is similar to acpi_map_pxm_to_node(), but always returns an online + * This is similar to pxm_to_node(), but always returns an online * node. When the mapped node from a given proximity ID is offline, it * looks up the node distance table and returns the nearest online node. * @@ -433,14 +433,14 @@ int acpi_get_node(acpi_handle handle); * offline nodes. A node may be offline when SRAT memory entry does not exist, * or NUMA is disabled, ex. "numa=off" on x86. */ -static inline int acpi_map_pxm_to_online_node(int pxm) +static inline int pxm_to_online_node(int pxm) { int node = pxm_to_node(pxm); return numa_map_to_online_node(node); } #else -static inline int acpi_map_pxm_to_online_node(int pxm) +static inline int pxm_to_online_node(int pxm) { return 0; }