ACPI / NUMA: Add stub function for pxm_to_node
Subsystems (2)
PATCH 1/1 ACPI / NUMA: Add stub function for pxm_to_node
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.
---
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:
include/acpi/acpi_numa.h | 5 +++++ 1 file changed, 5 insertions(+)
include/acpi/acpi_numa.h +5 -0
@@ -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
Signature · 1 line
2.28.0
Quoted 48 lines · 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_nodehad 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 <[email protected]>---
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:
include/acpi/acpi_numa.h | 5 +++++ 1 file changed, 5 insertions(+)include/acpi/acpi_numa.h +5
-0@@ -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 */
Quoted 1 line
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.
Signature · 1 line
~Randy
Jonathan Cameron
Acked-byQuoted 49 lines · On Tue, 29 Sep 2020 13:13:24 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 48 lines · 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_nodehad 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 <[email protected]>---
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:
include/acpi/acpi_numa.h | 5 +++++ 1 file changed, 5 insertions(+)include/acpi/acpi_numa.h +5
-0@@ -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 */
Quoted 9 lines
Quoted 1 line
base-commit:
eb6335b68ce3fc85a93c4c6cd3bb6bc5ac490efeOK, 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.
Looks correct to me. Thanks!
Quoted 37 lines · 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_nodehad 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(a)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:
include/acpi/acpi_numa.h | 5 +++++ 1 file changed, 5 insertions(+)include/acpi/acpi_numa.h +0
-0
include/acpi/acpi_numa.h extern int acpi_numa __initdata; · line 31
Quoted 10 lines
include/acpi/acpi_numa.h +5
-0@@ -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,
Rafael J. Wysocki
maintainerQuoted 52 lines · Hanjun Guo
Quoted 37 lines · 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_nodehad 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(a)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:
include/acpi/acpi_numa.h | 5 +++++ 1 file changed, 5 insertions(+)include/acpi/acpi_numa.h +0
-0include/acpi/acpi_numa.h extern int acpi_numa __initdata; · line 31
Quoted 10 lines
include/acpi/acpi_numa.h +5
-0@@ -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,
Quoted 1 line
Reviewed-by Hanjun Guo <guohanjun(a)huawei.com>
Patch applied, thanks!