linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI / NUMA: Add stub function for pxm_to_node
@ 2020-09-28 19:45 Nathan Chancellor
  2020-09-29 20:13 ` Randy Dunlap
  2020-09-30  9:07 ` Hanjun Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Nathan Chancellor @ 2020-09-28 19:45 UTC (permalink / raw)
  To: Robert Moore, Erik Kaneda, Rafael J. Wysocki, Len Brown
  Cc: Jonathan Cameron, linux-acpi, devel, linux-kernel, Nathan Chancellor

After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from
ACPI static tables that are not SRAT"):

$ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT

$ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/
drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’:
drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of
function ‘pxm_to_node’; did you mean ‘xa_to_node’?
[-Werror=implicit-function-declaration]
 3010 |   ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
      |                           ^~~~~~~~~~~
      |                           xa_to_node
cc1: some warnings being treated as errors
...

Add a stub function like acpi_map_pxm_to_node had so that the build
continues to work.

Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---

I am not sure if this is the right place or value for this. It looks
like there is going to be another stub function added here, which is
going through -mm:

https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com

 include/acpi/acpi_numa.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
index fdebcfc6c8df..09eb3bc20ff5 100644
--- a/include/acpi/acpi_numa.h
+++ b/include/acpi/acpi_numa.h
@@ -22,5 +22,10 @@ extern int acpi_numa __initdata;
 extern void bad_srat(void);
 extern int srat_disabled(void);
 
+#else				/* CONFIG_ACPI_NUMA */
+static inline int pxm_to_node(int pxm)
+{
+	return 0;
+}
 #endif				/* CONFIG_ACPI_NUMA */
 #endif				/* __ACP_NUMA_H */

base-commit: eb6335b68ce3fc85a93c4c6cd3bb6bc5ac490efe
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / NUMA: Add stub function for pxm_to_node
  2020-09-28 19:45 [PATCH] ACPI / NUMA: Add stub function for pxm_to_node Nathan Chancellor
@ 2020-09-29 20:13 ` Randy Dunlap
  2020-09-30  8:42   ` Jonathan Cameron
  2020-09-30  9:07 ` Hanjun Guo
  1 sibling, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2020-09-29 20:13 UTC (permalink / raw)
  To: Nathan Chancellor, Robert Moore, Erik Kaneda, Rafael J. Wysocki,
	Len Brown
  Cc: Jonathan Cameron, linux-acpi, devel, linux-kernel

On 9/28/20 12:45 PM, Nathan Chancellor wrote:
> After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from
> ACPI static tables that are not SRAT"):
> 
> $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT
> 
> $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/
> drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’:
> drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of
> function ‘pxm_to_node’; did you mean ‘xa_to_node’?
> [-Werror=implicit-function-declaration]
>  3010 |   ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
>       |                           ^~~~~~~~~~~
>       |                           xa_to_node
> cc1: some warnings being treated as errors
> ...
> 
> Add a stub function like acpi_map_pxm_to_node had so that the build
> continues to work.
> 
> Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> 
> I am not sure if this is the right place or value for this. It looks
> like there is going to be another stub function added here, which is
> going through -mm:
> 
> https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com
> 
>  include/acpi/acpi_numa.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> index fdebcfc6c8df..09eb3bc20ff5 100644
> --- a/include/acpi/acpi_numa.h
> +++ b/include/acpi/acpi_numa.h
> @@ -22,5 +22,10 @@ extern int acpi_numa __initdata;
>  extern void bad_srat(void);
>  extern int srat_disabled(void);
>  
> +#else				/* CONFIG_ACPI_NUMA */
> +static inline int pxm_to_node(int pxm)
> +{
> +	return 0;
> +}
>  #endif				/* CONFIG_ACPI_NUMA */
>  #endif				/* __ACP_NUMA_H */
> 
> base-commit: eb6335b68ce3fc85a93c4c6cd3bb6bc5ac490efe

OK, that works/builds. It doesn't quite apply cleanly to linux-next-20200929
but that's a minor detail and easy to get around.

Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / NUMA: Add stub function for pxm_to_node
  2020-09-29 20:13 ` Randy Dunlap
@ 2020-09-30  8:42   ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2020-09-30  8:42 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Nathan Chancellor, Robert Moore, Erik Kaneda, Rafael J. Wysocki,
	Len Brown, linux-acpi, devel, linux-kernel

On Tue, 29 Sep 2020 13:13:24 -0700
Randy Dunlap <rdunlap@infradead.org> wrote:

> On 9/28/20 12:45 PM, Nathan Chancellor wrote:
> > After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from
> > ACPI static tables that are not SRAT"):
> > 
> > $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT
> > 
> > $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/
> > drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’:
> > drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of
> > function ‘pxm_to_node’; did you mean ‘xa_to_node’?
> > [-Werror=implicit-function-declaration]
> >  3010 |   ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
> >       |                           ^~~~~~~~~~~
> >       |                           xa_to_node
> > cc1: some warnings being treated as errors
> > ...
> > 
> > Add a stub function like acpi_map_pxm_to_node had so that the build
> > continues to work.
> > 
> > Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> > 
> > I am not sure if this is the right place or value for this. It looks
> > like there is going to be another stub function added here, which is
> > going through -mm:
> > 
> > https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com
> > 
> >  include/acpi/acpi_numa.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> > index fdebcfc6c8df..09eb3bc20ff5 100644
> > --- a/include/acpi/acpi_numa.h
> > +++ b/include/acpi/acpi_numa.h
> > @@ -22,5 +22,10 @@ extern int acpi_numa __initdata;
> >  extern void bad_srat(void);
> >  extern int srat_disabled(void);
> >  
> > +#else				/* CONFIG_ACPI_NUMA */
> > +static inline int pxm_to_node(int pxm)
> > +{
> > +	return 0;
> > +}
> >  #endif				/* CONFIG_ACPI_NUMA */
> >  #endif				/* __ACP_NUMA_H */
> > 
> > base-commit: eb6335b68ce3fc85a93c4c6cd3bb6bc5ac490efe  
> 
> OK, that works/builds. It doesn't quite apply cleanly to linux-next-20200929
> but that's a minor detail and easy to get around.
> 
> Thanks.
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
>

Looks correct to me.  Thanks!

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / NUMA: Add stub function for pxm_to_node
  2020-09-28 19:45 [PATCH] ACPI / NUMA: Add stub function for pxm_to_node Nathan Chancellor
  2020-09-29 20:13 ` Randy Dunlap
@ 2020-09-30  9:07 ` Hanjun Guo
  2020-09-30 15:49   ` Rafael J. Wysocki
  1 sibling, 1 reply; 5+ messages in thread
From: Hanjun Guo @ 2020-09-30  9:07 UTC (permalink / raw)
  To: Nathan Chancellor, Robert Moore, Erik Kaneda, Rafael J. Wysocki,
	Len Brown
  Cc: Jonathan Cameron, linux-acpi, devel, linux-kernel

On 2020/9/29 3:45, Nathan Chancellor wrote:
> After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from
> ACPI static tables that are not SRAT"):
> 
> $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT
> 
> $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/
> drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’:
> drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of
> function ‘pxm_to_node’; did you mean ‘xa_to_node’?
> [-Werror=implicit-function-declaration]
>   3010 |   ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
>        |                           ^~~~~~~~~~~
>        |                           xa_to_node
> cc1: some warnings being treated as errors
> ...
> 
> Add a stub function like acpi_map_pxm_to_node had so that the build
> continues to work.
> 
> Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> 
> I am not sure if this is the right place or value for this. It looks
> like there is going to be another stub function added here, which is
> going through -mm:
> 
> https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com
> 
>   include/acpi/acpi_numa.h | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> index fdebcfc6c8df..09eb3bc20ff5 100644
> --- a/include/acpi/acpi_numa.h
> +++ b/include/acpi/acpi_numa.h
> @@ -22,5 +22,10 @@ extern int acpi_numa __initdata;
>   extern void bad_srat(void);
>   extern int srat_disabled(void);
>   
> +#else				/* CONFIG_ACPI_NUMA */
> +static inline int pxm_to_node(int pxm)
> +{
> +	return 0;
> +}
>   #endif				/* CONFIG_ACPI_NUMA */
>   #endif				/* __ACP_NUMA_H */

Looks good to me,

Reviewed-by: Hanjun Guo <guohanjun@huawei.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI / NUMA: Add stub function for pxm_to_node
  2020-09-30  9:07 ` Hanjun Guo
@ 2020-09-30 15:49   ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2020-09-30 15:49 UTC (permalink / raw)
  To: Hanjun Guo, Nathan Chancellor
  Cc: Robert Moore, Erik Kaneda, Rafael J. Wysocki, Len Brown,
	Jonathan Cameron, ACPI Devel Maling List,
	open list:ACPI COMPONENT ARCHITECTURE (ACPICA),
	Linux Kernel Mailing List

On Wed, Sep 30, 2020 at 11:07 AM Hanjun Guo <guohanjun@huawei.com> wrote:
>
> On 2020/9/29 3:45, Nathan Chancellor wrote:
> > After commit 01feba590cd6 ("ACPI: Do not create new NUMA domains from
> > ACPI static tables that are not SRAT"):
> >
> > $ scripts/config --file arch/x86/configs/x86_64_defconfig -d NUMA -e ACPI_NFIT
> >
> > $ make -skj"$(nproc)" distclean defconfig drivers/acpi/nfit/
> > drivers/acpi/nfit/core.c: In function ‘acpi_nfit_register_region’:
> > drivers/acpi/nfit/core.c:3010:27: error: implicit declaration of
> > function ‘pxm_to_node’; did you mean ‘xa_to_node’?
> > [-Werror=implicit-function-declaration]
> >   3010 |   ndr_desc->target_node = pxm_to_node(spa->proximity_domain);
> >        |                           ^~~~~~~~~~~
> >        |                           xa_to_node
> > cc1: some warnings being treated as errors
> > ...
> >
> > Add a stub function like acpi_map_pxm_to_node had so that the build
> > continues to work.
> >
> > Fixes: 01feba590cd6 ("ACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> >
> > I am not sure if this is the right place or value for this. It looks
> > like there is going to be another stub function added here, which is
> > going through -mm:
> >
> > https://lkml.kernel.org/r/159643094925.4062302.14979872973043772305.stgit@dwillia2-desk3.amr.corp.intel.com
> >
> >   include/acpi/acpi_numa.h | 5 +++++
> >   1 file changed, 5 insertions(+)
> >
> > diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
> > index fdebcfc6c8df..09eb3bc20ff5 100644
> > --- a/include/acpi/acpi_numa.h
> > +++ b/include/acpi/acpi_numa.h
> > @@ -22,5 +22,10 @@ extern int acpi_numa __initdata;
> >   extern void bad_srat(void);
> >   extern int srat_disabled(void);
> >
> > +#else                                /* CONFIG_ACPI_NUMA */
> > +static inline int pxm_to_node(int pxm)
> > +{
> > +     return 0;
> > +}
> >   #endif                              /* CONFIG_ACPI_NUMA */
> >   #endif                              /* __ACP_NUMA_H */
>
> Looks good to me,
>
> Reviewed-by: Hanjun Guo <guohanjun@huawei.com>

Patch applied, thanks!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-30 15:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28 19:45 [PATCH] ACPI / NUMA: Add stub function for pxm_to_node Nathan Chancellor
2020-09-29 20:13 ` Randy Dunlap
2020-09-30  8:42   ` Jonathan Cameron
2020-09-30  9:07 ` Hanjun Guo
2020-09-30 15:49   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).