From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 399A7C00528 for ; Wed, 2 Aug 2023 23:48:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=63Z0UJ2s/8DRvNoQGvV2SPL8L+McHtfHlkYTg6133Ls=; b=eCJk0vtYJgwdZd TxQBWSAzFg75z6Gqd5QjpyIGhVwnTUf5hw/s7Z0RrMuUBct88JDKDH6DJc7NlWnxFkcopNnr0eL3u VuHR6ZlxvisPenTgGdDPVnk4kDgGVFTPLZbexF3x6jMyCCwpRtgVhlSdgp8mA7h8REOrT7cUPNhWG 8foPewL0JABKH93hCUF7OB+pOFk3k5lV1b2ChrVpBBtsNKMWjN+xlDWkhUZpvl7OZ/ioD4sVjOsVC A8X8mvtLBk1kSqrpv0vsHeM0NuqyNVJDoBLpK9JuEVb5rt+iywJkO2hpgVzYFqxym0uv/RhDDSYak Sr/QoYxbkRjY6rCpcBpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRLZH-006ARh-0s; Wed, 02 Aug 2023 23:47:51 +0000 Received: from mail-pf1-f179.google.com ([209.85.210.179]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRLZD-006AQh-2Z for linux-arm-kernel@lists.infradead.org; Wed, 02 Aug 2023 23:47:50 +0000 Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-686ba29ccb1so255237b3a.1 for ; Wed, 02 Aug 2023 16:47:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691020066; x=1691624866; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iND6DoCGv2c/em+mZgV+i0Ux/oJxu8oM5xAqj7hv5MQ=; b=Pi5uwg0M7UP6WoA0ystSR/JRwYOyUksOi/ikW3J9EWoLg9/a7pgyTvJBijlm0FeSc1 ODuWBOdnarXpHDVAKywkVaGdqYm8pAdFln1mdn6H4OoVgWAJZbP7Qo0NLRWI1V4JlLof Wgj5p7Jjjidut92uH1wSUbncaxg5hdkAfk7Jzn4zjxLAXkOQF4V7Z9dOGvFqNBHJR7mR rm/96J6KCLLZyt7CX9Gx3LrzscluO63t2k5DYtsdJRyU4PP8l+buc4/YXIvoBbYviEyf vt8ZaGHvakmzbUekeEDuYBw5SWllqzD82xgh5HatpjA/uKYFye4ZveixdiuuLkxpy7bj ylmA== X-Gm-Message-State: ABy/qLYFAWAKUKn2p9DD/bnTX+5QHmA7cBYo433Tz+MZnIDi6QLeBXKX hASyH/OxDM1/+L+3L2b85Xo= X-Google-Smtp-Source: APBJJlHbxVznnDHfw3ul7bW2kcVCoiWDy1NoNUodbRC6Z0E1ILsRsrjtOqq0YX6H8sipUKpi3cZBbg== X-Received: by 2002:a05:6a20:729b:b0:125:4d74:cd6a with SMTP id o27-20020a056a20729b00b001254d74cd6amr22020038pzk.3.1691020066504; Wed, 02 Aug 2023 16:47:46 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id n4-20020a637204000000b0054fe7736ac1sm12152307pgc.76.2023.08.02.16.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Aug 2023 16:47:45 -0700 (PDT) Date: Wed, 2 Aug 2023 23:47:39 +0000 From: Wei Liu To: Nuno Das Neves Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, mikelley@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, haiyangz@microsoft.com, decui@microsoft.com, ssengar@linux.microsoft.com, mukeshrathor@microsoft.com, stanislav.kinsburskiy@gmail.com, jinankjain@linux.microsoft.com, apais@linux.microsoft.com, Tianyu.Lan@microsoft.com, vkuznets@redhat.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, will@kernel.org, catalin.marinas@arm.com, rafael@kernel.org, lenb@kernel.org Subject: Re: [PATCH 03/15] mshyperv: Introduce numa_node_to_proximity_domain_info Message-ID: References: <1690487690-2428-1-git-send-email-nunodasneves@linux.microsoft.com> <1690487690-2428-4-git-send-email-nunodasneves@linux.microsoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1690487690-2428-4-git-send-email-nunodasneves@linux.microsoft.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230802_164747_906595_5C70272C X-CRM114-Status: GOOD ( 21.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 27, 2023 at 12:54:38PM -0700, Nuno Das Neves wrote: > Factor out logic for converting numa node to proximity domain info into > a helper function, and export it. > > Signed-off-by: Nuno Das Neves Reviewed-by: Wei Liu > --- > arch/x86/hyperv/hv_proc.c | 8 ++------ > drivers/acpi/numa/srat.c | 1 + > include/asm-generic/mshyperv.h | 18 ++++++++++++++++++ > 3 files changed, 21 insertions(+), 6 deletions(-) > [...] > diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c > index 1f4fc5f8a819..0cf9f0574495 100644 > --- a/drivers/acpi/numa/srat.c > +++ b/drivers/acpi/numa/srat.c > @@ -48,6 +48,7 @@ int node_to_pxm(int node) > return PXM_INVAL; > return node_to_pxm_map[node]; > } > +EXPORT_SYMBOL(node_to_pxm); Rafael and Len, I would like to get an ACK from you on this one line change. I see a lot of other functions in that file are already exported, so I hope this is okay, too. It's user is the function below numa_node_to_proximity_domain_info. Thanks, Wei. > > static void __acpi_map_pxm_to_node(int pxm, int node) > { > diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h > index 233c976344e5..447e7ebe67ee 100644 > --- a/include/asm-generic/mshyperv.h > +++ b/include/asm-generic/mshyperv.h > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -28,6 +29,23 @@ > > #define VTPM_BASE_ADDRESS 0xfed40000 > > +static inline union hv_proximity_domain_info > +numa_node_to_proximity_domain_info(int node) > +{ > + union hv_proximity_domain_info proximity_domain_info; > + > + if (node != NUMA_NO_NODE) { > + proximity_domain_info.domain_id = node_to_pxm(node); > + proximity_domain_info.flags.reserved = 0; > + proximity_domain_info.flags.proximity_info_valid = 1; > + proximity_domain_info.flags.proximity_preferred = 1; > + } else { > + proximity_domain_info.as_uint64 = 0; > + } > + > + return proximity_domain_info; > +} > + > struct ms_hyperv_info { > u32 features; > u32 priv_high; > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel