[PATCH] x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS

From: trix
Date: Wed May 26 2021 - 09:52:09 EST


From: Tom Rix <trix@xxxxxxxxxx>

Fixes this build error
from arch/x86/xen/platform-pci-unplug.c:11:
...
fixmap.h:103:48: error: ‘NR_CPUS’ undeclared here (not in a function)
103 | FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,

This block used to be conditional on CONFIG_X86_32 which also
included linux/threads.h which defines NR_CPUS as CONFIG_NR_CPUS.

Since CONFIG_NR_CPUS is already used fixmap.h, instead of including
linux/threads.h again, rename NR_CPUS to CONFIG_NR_CPUS.

Fixes: 14df32670291 ("x86: Support kmap_local() forced debugging")
Signed-off-by: Tom Rix <trix@xxxxxxxxxx>
---
arch/x86/include/asm/fixmap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index d0dcefb5cc59d..4d1f5cc448b98 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -100,7 +100,7 @@ enum fixed_addresses {
#endif
#ifdef CONFIG_KMAP_LOCAL
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
- FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1,
+ FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * CONFIG_NR_CPUS) - 1,
#ifdef CONFIG_PCI_MMCONFIG
FIX_PCIE_MCFG,
#endif
--
2.26.3