All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS
@ 2021-05-26 13:51 trix
  0 siblings, 0 replies; only message in thread
From: trix @ 2021-05-26 13:51 UTC (permalink / raw)
  To: tglx, mingo, bp, hpa, peterz, ira.weiny, rafael.j.wysocki,
	andriy.shevchenko, jgross
  Cc: x86, linux-kernel, Tom Rix

From: Tom Rix <trix@redhat.com>

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@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-26 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 13:51 [PATCH] x86/mm/fixmap: rename NR_CPUS to CONFIG_NR_CPUS trix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.