All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig
@ 2016-01-11 22:02 Doug Goldstein
  2016-01-11 22:02 ` [PATCH v2 2/2] build: convert NR_CPUS to Kconfig Doug Goldstein
  2016-01-12  8:37 ` [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Jan Beulich
  0 siblings, 2 replies; 7+ messages in thread
From: Doug Goldstein @ 2016-01-11 22:02 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, Ian Campbell, Andrew Cooper, Doug Goldstein,
	Stefano Stabellini, Jan Beulich

Introduce an option where the user can modifiy the maximum number of
supported physical CPUs.

CC: Ian Campbell <ian.campbell@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 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

diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
new file mode 100644
index 0000000..aacd73c
--- /dev/null
+++ b/xen/arch/Kconfig
@@ -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.
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 2cab17b..60e923c 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -31,6 +31,8 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+source "arch/Kconfig"
+
 # Select HAS_GICV3 if GICv3 is supported
 config HAS_GICV3
 	bool
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 7d2ed96..e1c03bb 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -25,6 +25,8 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+source "arch/Kconfig"
+
 endmenu
 
 source "common/Kconfig"
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] build: convert NR_CPUS to Kconfig
  2016-01-11 22:02 [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Doug Goldstein
@ 2016-01-11 22:02 ` Doug Goldstein
  2016-01-12  8:41   ` Jan Beulich
  2016-01-12  8:37 ` [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Jan Beulich
  1 sibling, 1 reply; 7+ messages in thread
From: Doug Goldstein @ 2016-01-11 22:02 UTC (permalink / raw)
  To: xen-devel
  Cc: Keir Fraser, Ian Campbell, Andrew Cooper, Doug Goldstein,
	Stefano Stabellini, Jan Beulich

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.

CC: Ian Campbell <ian.campbell@citrix.com>
CC: Stefano Stabellini <stefano.stabellini@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 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(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index f7ddc69..b5f1041 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -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
diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h
index 1520b41..bd832df 100644
--- a/xen/include/asm-arm/config.h
+++ b/xen/include/asm-arm/config.h
@@ -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
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index f25d92e..3958ea0 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -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"
diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h
index 7595599..cde2006 100644
--- a/xen/include/xen/config.h
+++ b/xen/include/xen/config.h
@@ -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__ */
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig
  2016-01-11 22:02 [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Doug Goldstein
  2016-01-11 22:02 ` [PATCH v2 2/2] build: convert NR_CPUS to Kconfig Doug Goldstein
@ 2016-01-12  8:37 ` Jan Beulich
  2016-01-12 13:10   ` Doug Goldstein
  2016-01-13 14:48   ` Doug Goldstein
  1 sibling, 2 replies; 7+ messages in thread
From: Jan Beulich @ 2016-01-12  8:37 UTC (permalink / raw)
  To: Doug Goldstein
  Cc: Andrew Cooper, Keir Fraser, Stefano Stabellini, Ian Campbell, xen-devel

>>> On 11.01.16 at 23:02, <cardoe@cardoe.com> wrote:
> --- /dev/null
> +++ b/xen/arch/Kconfig
> @@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] build: convert NR_CPUS to Kconfig
  2016-01-11 22:02 ` [PATCH v2 2/2] build: convert NR_CPUS to Kconfig Doug Goldstein
@ 2016-01-12  8:41   ` Jan Beulich
  2016-01-12 15:20     ` Doug Goldstein
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2016-01-12  8:41 UTC (permalink / raw)
  To: Doug Goldstein
  Cc: Andrew Cooper, Keir Fraser, Stefano Stabellini, Ian Campbell, xen-devel

>>> On 11.01.16 at 23:02, <cardoe@cardoe.com> wrote:
> --- a/xen/include/xen/config.h
> +++ b/xen/include/xen/config.h
> @@ -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig
  2016-01-12  8:37 ` [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Jan Beulich
@ 2016-01-12 13:10   ` Doug Goldstein
  2016-01-13 14:48   ` Doug Goldstein
  1 sibling, 0 replies; 7+ messages in thread
From: Doug Goldstein @ 2016-01-12 13:10 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Andrew Cooper, Keir Fraser, Stefano Stabellini, Ian Campbell, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 591 bytes --]

On 1/12/16 2:37 AM, Jan Beulich wrote:
>>>> On 11.01.16 at 23:02, <cardoe@cardoe.com> wrote:
>> --- /dev/null
>> +++ b/xen/arch/Kconfig
>> @@ -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
> 

It was definitely unintentional. I must have edited the patch to make it
4095 the first time before I sent it.

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] build: convert NR_CPUS to Kconfig
  2016-01-12  8:41   ` Jan Beulich
@ 2016-01-12 15:20     ` Doug Goldstein
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Goldstein @ 2016-01-12 15:20 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Andrew Cooper, Keir Fraser, Stefano Stabellini, Ian Campbell, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]

On 1/12/16 2:41 AM, Jan Beulich wrote:
>>>> On 11.01.16 at 23:02, <cardoe@cardoe.com> wrote:
>> --- a/xen/include/xen/config.h
>> +++ b/xen/include/xen/config.h
>> @@ -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
> 

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.

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig
  2016-01-12  8:37 ` [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Jan Beulich
  2016-01-12 13:10   ` Doug Goldstein
@ 2016-01-13 14:48   ` Doug Goldstein
  1 sibling, 0 replies; 7+ messages in thread
From: Doug Goldstein @ 2016-01-13 14:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Doug Goldstein

Introduce an option where the user can modifiy the maximum number of
supported physical CPUs.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 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

diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
new file mode 100644
index 0000000..cf0acb7
--- /dev/null
+++ b/xen/arch/Kconfig
@@ -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.
diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 2cab17b..60e923c 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -31,6 +31,8 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+source "arch/Kconfig"
+
 # Select HAS_GICV3 if GICv3 is supported
 config HAS_GICV3
 	bool
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index d629767..4781b34 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -25,6 +25,8 @@ config ARCH_DEFCONFIG
 
 menu "Architecture Features"
 
+source "arch/Kconfig"
+
 config BIGMEM
 	bool "big memory support"
 	default n
-- 
2.4.10

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-13 14:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11 22:02 [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Doug Goldstein
2016-01-11 22:02 ` [PATCH v2 2/2] build: convert NR_CPUS to Kconfig Doug Goldstein
2016-01-12  8:41   ` Jan Beulich
2016-01-12 15:20     ` Doug Goldstein
2016-01-12  8:37 ` [PATCH v2 1/2] build: introduce CONFIG_NR_CPUS in Kconfig Jan Beulich
2016-01-12 13:10   ` Doug Goldstein
2016-01-13 14:48   ` Doug Goldstein

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.