diff mbox series

[v6,08/16] ACPI / NUMA: add a stub function for node_to_pxm()

Message ID 20210203150435.27941-9-wei.liu@kernel.org (mailing list archive)
State Not Applicable, archived
Headers show
Series None | expand

Commit Message

Wei Liu Feb. 3, 2021, 3:04 p.m. UTC
There is already a stub function for pxm_to_node but conversion to the
other direction is missing.

It will be used by Microsoft Hypervisor code later.

Signed-off-by: Wei Liu <wei.liu@kernel.org>
---
v6: new
---
 include/acpi/acpi_numa.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Wei Liu Feb. 4, 2021, 6:38 p.m. UTC | #1
On Wed, Feb 03, 2021 at 03:04:27PM +0000, Wei Liu wrote:
> There is already a stub function for pxm_to_node but conversion to the
> other direction is missing.
> 
> It will be used by Microsoft Hypervisor code later.
> 
> Signed-off-by: Wei Liu <wei.liu@kernel.org>

Hi ACPI maintainers, if you're happy with this patch I can take it via
the hyperv-next tree, given the issue is discovered when pxm_to_node is
called in our code.

> ---
> v6: new
> ---
>  include/acpi/acpi_numa.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> index a4c6ef809e27..40a91ce87e04 100644
> --- a/include/acpi/acpi_numa.h
> +++ b/include/acpi/acpi_numa.h
> @@ -30,6 +30,10 @@ static inline int pxm_to_node(int pxm)
>  {
>  	return 0;
>  }
> +static inline int node_to_pxm(int node)
> +{
> +	return 0;
> +}
>  #endif				/* CONFIG_ACPI_NUMA */
>  
>  #ifdef CONFIG_ACPI_HMAT
> -- 
> 2.20.1
>
Rafael J. Wysocki Feb. 4, 2021, 6:45 p.m. UTC | #2
On Thu, Feb 4, 2021 at 7:41 PM Wei Liu <wei.liu@kernel.org> wrote:
>
> On Wed, Feb 03, 2021 at 03:04:27PM +0000, Wei Liu wrote:
> > There is already a stub function for pxm_to_node but conversion to the
> > other direction is missing.
> >
> > It will be used by Microsoft Hypervisor code later.
> >
> > Signed-off-by: Wei Liu <wei.liu@kernel.org>
>
> Hi ACPI maintainers, if you're happy with this patch I can take it via
> the hyperv-next tree, given the issue is discovered when pxm_to_node is
> called in our code.

Yes, you can.

Thanks!

>
> > ---
> > v6: new
> > ---
> >  include/acpi/acpi_numa.h | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> > index a4c6ef809e27..40a91ce87e04 100644
> > --- a/include/acpi/acpi_numa.h
> > +++ b/include/acpi/acpi_numa.h
> > @@ -30,6 +30,10 @@ static inline int pxm_to_node(int pxm)
> >  {
> >       return 0;
> >  }
> > +static inline int node_to_pxm(int node)
> > +{
> > +     return 0;
> > +}
> >  #endif                               /* CONFIG_ACPI_NUMA */
> >
> >  #ifdef CONFIG_ACPI_HMAT
> > --
> > 2.20.1
> >
Wei Liu Feb. 4, 2021, 6:48 p.m. UTC | #3
On Thu, Feb 04, 2021 at 07:45:25PM +0100, Rafael J. Wysocki wrote:
> On Thu, Feb 4, 2021 at 7:41 PM Wei Liu <wei.liu@kernel.org> wrote:
> >
> > On Wed, Feb 03, 2021 at 03:04:27PM +0000, Wei Liu wrote:
> > > There is already a stub function for pxm_to_node but conversion to the
> > > other direction is missing.
> > >
> > > It will be used by Microsoft Hypervisor code later.
> > >
> > > Signed-off-by: Wei Liu <wei.liu@kernel.org>
> >
> > Hi ACPI maintainers, if you're happy with this patch I can take it via
> > the hyperv-next tree, given the issue is discovered when pxm_to_node is
> > called in our code.
> 
> Yes, you can.

Thanks Rafael. I will add your ack to the patch as well.

Wei.
diff mbox series

Patch

diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
index a4c6ef809e27..40a91ce87e04 100644
--- a/include/acpi/acpi_numa.h
+++ b/include/acpi/acpi_numa.h
@@ -30,6 +30,10 @@  static inline int pxm_to_node(int pxm)
 {
 	return 0;
 }
+static inline int node_to_pxm(int node)
+{
+	return 0;
+}
 #endif				/* CONFIG_ACPI_NUMA */
 
 #ifdef CONFIG_ACPI_HMAT