build: introduce CONFIG_NR_CPUS in Kconfig
PATCH v2 1/2 build: introduce CONFIG_NR_CPUS in Kconfig
Introduce an option where the user can modifiy the maximum number of supported physical CPUs.
--- xen/arch/Kconfig | 8 ++++++++ xen/arch/arm/Kconfig | 2 ++ xen/arch/x86/Kconfig | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 xen/arch/Kconfig
xen/arch/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ + +config NR_CPUS + int "Maximum number of physical CPUs" + range 1 65536 + default "256" if X86 + default "128" if ARM + ---help--- + Specifies the maximum number of physical CPUs which Xen will support.
xen/arch/arm/Kconfig +2 -0
@@ -31,6 +31,8 @@ config ARCH_DEFCONFIG menu "Architecture Features" +source "arch/Kconfig" + # Select HAS_GICV3 if GICv3 is supported config HAS_GICV3 bool
xen/arch/x86/Kconfig +2 -0
@@ -25,6 +25,8 @@ config ARCH_DEFCONFIG menu "Architecture Features" +source "arch/Kconfig" + endmenu source "common/Kconfig"
Signature · 1 line
2.4.10
PATCH v2 2/2 build: convert NR_CPUS to Kconfig
Use CONFIG_NR_CPUS from Kconfig as NR_CPUS instead of the previous MAX_PHYS_CPUS variable from make. Remove the creation of MAX_PHYS_CPUS as well.
--- xen/Rules.mk | 3 --- xen/include/asm-arm/config.h | 6 ------ xen/include/asm-x86/config.h | 6 ------ xen/include/xen/config.h | 3 +++ 4 files changed, 3 insertions(+), 15 deletions(-)
xen/Rules.mk +0 -3
@@ -61,9 +61,6 @@ CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS CFLAGS-$(lock_profile) += -DLOCK_PROFILE CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER -ifneq ($(max_phys_cpus),) -CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus) -endif ifneq ($(max_phys_irqs),) CFLAGS-y += -DMAX_PHYS_IRQS=$(max_phys_irqs) endif
xen/include/asm-arm/config.h +0 -6
@@ -45,12 +45,6 @@#define OPT_CONSOLE_STR "dtuart" -#ifdef MAX_PHYS_CPUS -#define NR_CPUS MAX_PHYS_CPUS -#else -#define NR_CPUS 128 -#endif -#ifdef CONFIG_ARM_64 #define MAX_VIRT_CPUS 128#else
xen/include/asm-x86/config.h +0 -6
@@ -60,12 +60,6 @@#define OPT_CONSOLE_STR "vga" -#ifdef MAX_PHYS_CPUS -#define NR_CPUS MAX_PHYS_CPUS -#else -#define NR_CPUS 256 -#endif -/* Linkage for x86 */ #define __ALIGN .align 16,0x90#define __ALIGN_STR ".align 16,0x90"
xen/include/xen/config.h +3 -0
@@ -92,4 +92,7 @@#define FLASK_AVC_STATS 1#endif +/* allow existing code to work with Kconfig variable */ +#define NR_CPUS CONFIG_NR_CPUS +#endif /* __XEN_CONFIG_H__ */
Signature · 1 line
2.4.10
Re: [PATCH v2 2/2] build: convert NR_CPUS to Kconfig
xen/include/xen/config.h line 96
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 23:02, <[email protected]> wrote:
xen/include/xen/config.h +2
-0@@ -92,4 +92,7 @@#define FLASK_AVC_STATS 1#endif +/* allow existing code to work with Kconfig variable */ +#define NR_CPUS CONFIG_NR_CPUS
Perhaps here or in a follow-up patch derive CONFIG_SMP (used in a few places in ARM code) from NR_CPUS > 1?
Jan
Re: [PATCH v2 2/2] build: convert NR_CPUS to Kconfig
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 23:02, <[email protected]> wrote:
xen/include/xen/config.h +0
-0@@ -92,4 +92,7 @@#define FLASK_AVC_STATS 1#endif
Quoted 8 lines
xen/include/xen/config.h line 96
Quoted 2 lines
xen/include/xen/config.h +2
-0+/* allow existing code to work with Kconfig variable */ +#define NR_CPUS CONFIG_NR_CPUSPerhaps here or in a follow-up patch derive
CONFIG_SMP(used in a few places in ARM code) fromNR_CPUS> 1?Jan
I agree with you. That's actually in a follow on. I've got most of the CONFIG_ fields in a branch locally and as each patch gets reviewed I'm submitting more.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
xen/arch/Kconfig line 4
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 23:02, <[email protected]> wrote:
xen/arch/Kconfig new file +4
-0@@ -0,0 +1,8 @@ + +config NR_CPUS + int "Maximum number of physical CPUs" + range 1 65536
Why did you change this to 64k, when we settled on 4k-1 being correct? I don't mind fixing this up upon commit, but I'd like it to be confirmed that this was unintentional.
Jan
Quoted 13 lines · Jan Beulich
xen/arch/Kconfig line 4
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 11.01.16 at 23:02, <[email protected]> wrote:
xen/arch/Kconfig new file +4
-0@@ -0,0 +1,8 @@ + +config NR_CPUS + int "Maximum number of physical CPUs" + range 1 65536Why did you change this to 64k, when we settled on 4k-1 being correct? I don't mind fixing this up upon commit, but I'd like it to be confirmed that this was unintentional.
Quoted 2 lines
Jan
It was definitely unintentional. I must have edited the patch to make it 4095 the first time before I sent it.
Signature · 1 line
Doug Goldstein
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
PATCH v2 1/2 build: introduce CONFIG_NR_CPUS in Kconfig
In reply to Jan BeulichIntroduce an option where the user can modifiy the maximum number of supported physical CPUs.
--- xen/arch/Kconfig | 8 ++++++++ xen/arch/arm/Kconfig | 2 ++ xen/arch/x86/Kconfig | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 xen/arch/Kconfig
xen/arch/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ + +config NR_CPUS + int "Maximum number of physical CPUs" + range 1 4095 + default "256" if X86 + default "128" if ARM + ---help--- + Specifies the maximum number of physical CPUs which Xen will support.
xen/arch/arm/Kconfig +2 -0
@@ -31,6 +31,8 @@ config ARCH_DEFCONFIG menu "Architecture Features" +source "arch/Kconfig" + # Select HAS_GICV3 if GICv3 is supported config HAS_GICV3 bool
xen/arch/x86/Kconfig +2 -0
@@ -25,6 +25,8 @@ config ARCH_DEFCONFIG menu "Architecture Features" +source "arch/Kconfig" + config BIGMEM bool "big memory support" default n
Signature · 1 line
2.4.10