Skip to contentSkip to conversation

x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS

PATCH New [email protected] 1 participant 1 message May 26, 2021 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS

From: Tom Rix <[email protected]>

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")
---
 arch/x86/include/asm/fixmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/fixmap.h +1 -1
index d0dcefb5cc59d..4d1f5cc448b98 100644
@@ -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
Signature · 1 line
2.26.3