Re: [Xen-devel] [PATCH v4 08/10] arm: add QEMU, Rcar3 and MPSoC configs

2018-06-04 Thread Julien Grall



On 06/01/2018 09:51 PM, Stefano Stabellini wrote:

On Fri, 1 Jun 2018, Julien Grall wrote:

Hi Stefano,
Sorry for formatting.

On Thu, 31 May 2018, 22:50 Stefano Stabellini,  wrote:
   Add a "Platform Support" menu with three umbrella kconfig options: QEMU,
   RCAR3 and MPSOC. They enable the required options for their hardware
   platform.


This patch is nothing close to what we discussed. As far as I can tell, the 
tiny.config will end up to select all the platforms
with their driver. It will not be possible to deselect the driver selected for 
a platform afterwards.

I still think the best if providing a choice list where only one option can be 
selected. I would like to understand why you
didn't go this path.


Yes, sorry, I didn't explain why I did this and what I told you on the
call was wrong, adding to the confusion.

First, it is true that `make olddefconfig' is run automatically on any
make target.

Except for `make menuconfig', that's special. If you copy a partial
config (like tiny.config) to .config, then execute `make menuconfig',
the menu gets automatically populated with the missing values using
defaults (as if olddefconfig was run), but it won't automatically save
them to file (fortunately!!).  That means that all the platform options
below (QEMU, RCAR3, MPSOC) will show as selected in the menu, but if the
user deselects two of them, for instance QEMU and RCAR3, the result is
that *only* MPSOC and related options will be written down to the
.config.

The kconfig infrastructure is not as bad as I initially thought :-)
In short, the following steps work:

- copy tiny.config to .config
- make menuconfig -> deselect QEMU and RCAR3, save .config


IHMO, this is really fragile. As you said most of the command will run 
"make oldconfig" automatically. This is also quite natural for a Linux 
user to do a "make oldconfig" after copying the .config.


So I think we should be able to cater everyone here rather than one 
"odd" solution. You seem to have misunderstood my suggestion on previous 
version. I answered there and would appreciate if you have another look.


Cheers,

--
Julien Grall

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v4 08/10] arm: add QEMU, Rcar3 and MPSoC configs

2018-06-01 Thread Stefano Stabellini
On Fri, 1 Jun 2018, Julien Grall wrote:
> Hi Stefano,
> Sorry for formatting.
> 
> On Thu, 31 May 2018, 22:50 Stefano Stabellini,  wrote:
>   Add a "Platform Support" menu with three umbrella kconfig options: QEMU,
>   RCAR3 and MPSOC. They enable the required options for their hardware
>   platform.
> 
> 
> This patch is nothing close to what we discussed. As far as I can tell, the 
> tiny.config will end up to select all the platforms
> with their driver. It will not be possible to deselect the driver selected 
> for a platform afterwards.
> 
> I still think the best if providing a choice list where only one option can 
> be selected. I would like to understand why you
> didn't go this path.

Yes, sorry, I didn't explain why I did this and what I told you on the
call was wrong, adding to the confusion.

First, it is true that `make olddefconfig' is run automatically on any
make target.

Except for `make menuconfig', that's special. If you copy a partial
config (like tiny.config) to .config, then execute `make menuconfig',
the menu gets automatically populated with the missing values using
defaults (as if olddefconfig was run), but it won't automatically save
them to file (fortunately!!).  That means that all the platform options
below (QEMU, RCAR3, MPSOC) will show as selected in the menu, but if the
user deselects two of them, for instance QEMU and RCAR3, the result is
that *only* MPSOC and related options will be written down to the
.config.

The kconfig infrastructure is not as bad as I initially thought :-)
In short, the following steps work:

- copy tiny.config to .config
- make menuconfig -> deselect QEMU and RCAR3, save .config
- as a results the final .config will have:

  CONFIG_MPSOC=y
  CONFIG_HAS_CADENCE_UART=y

but it won't have GICV3, any other platform options, or any other uart
drivers. Moreover, even NR_CPUS will be set correctly:
  
  CONFIG_NR_CPUS=4

I am attaching the .config for MPSOC produced using these steps as a
reference. More on the NR_CPUS topic in my next email reply.


>   In the case of the MPSOC that has a platform file under
>   arch/arm/platforms/, build the file if MPSOC.
> 
>   Signed-off-by: Stefano Stabellini 
>   CC: artem_myga...@epam.com
>   CC: volodymyr_babc...@epam.com
> 
>   ---
>   Changes in v4:
>   - fix GICv3/GICV3
>   - default y to all options
>   - build xilinx-zynqmp if MPSOC
>   ---
>    xen/arch/arm/Kconfig            |  2 ++
>    xen/arch/arm/platforms/Kconfig  | 30 ++
>    xen/arch/arm/platforms/Makefile |  2 +-
>    3 files changed, 33 insertions(+), 1 deletion(-)
>    create mode 100644 xen/arch/arm/platforms/Kconfig
> 
>   diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
>   index 2b87111..75cacfb 100644
>   --- a/xen/arch/arm/Kconfig
>   +++ b/xen/arch/arm/Kconfig
>   @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
>    config ARM32_HARDEN_BRANCH_PREDICTOR
>        def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
> 
>   +source "arch/arm/platforms/Kconfig"
>   +
>    source "common/Kconfig"
> 
>    source "drivers/Kconfig"
>   diff --git a/xen/arch/arm/platforms/Kconfig 
> b/xen/arch/arm/platforms/Kconfig
>   new file mode 100644
>   index 000..fea8f9a
>   --- /dev/null
>   +++ b/xen/arch/arm/platforms/Kconfig
>   @@ -0,0 +1,30 @@
>   +menu "Platform Support"
>   +
>   +config QEMU
>   +       bool "QEMU aarch virt machine support"
>   +       default y
>   +       depends on ARM_64
>   +       select GICV3
>   +       select HAS_PL011
>   +       ---help---
>   +       Enable all the required drivers for QEMU aarch64 virt emulated
>   +       machine.
>   +
>   +config RCAR3
>   +       bool "Renesas RCar3 support"
>   +       default y
>   +       depends on ARM_64
>   +       select HAS_SCIF
>   +       ---help---
>   +       Enable all the required drivers for Renesas RCar3
>   +
>   +config MPSOC
>   +       bool "Xilinx Ultrascale+ MPSoC support"
>   +       default y
>   +       depends on ARM_64
>   +       select HAS_CADENCE_UART
>   +       select ARM_SMMU
>   +       ---help---
>   +       Enable all the required drivers for Xilinx Ultrascale+ MPSoC
>   +
>   +endmenu
>   diff --git a/xen/arch/arm/platforms/Makefile 
> b/xen/arch/arm/platforms/Makefile
>   index 80e555c..f4ff411 100644
>   --- a/xen/arch/arm/platforms/Makefile
>   +++ b/xen/arch/arm/platforms/Makefile
>   @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
>    obj-y += sunxi.o
>    obj-$(CONFIG_ARM_64) += thunderx.o
>    obj-$(CONFIG_ARM_64) += xgene-storm.o
>   -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
>   +obj-$(CONFIG_MPSOC)  += xilinx-zynqmp.o
>   --
>   1.9.1
> 
> 
>   

Re: [Xen-devel] [PATCH v4 08/10] arm: add QEMU, Rcar3 and MPSoC configs

2018-06-01 Thread Volodymyr Babchuk

Hi Stefano,

On 01.06.18 00:48, Stefano Stabellini wrote:

Add a "Platform Support" menu with three umbrella kconfig options: QEMU,
RCAR3 and MPSOC. They enable the required options for their hardware
platform.

In the case of the MPSOC that has a platform file under
arch/arm/platforms/, build the file if MPSOC.

Signed-off-by: Stefano Stabellini 
CC: artem_myga...@epam.com
CC: volodymyr_babc...@epam.com


Added Andrii Anisov and Oleksandr Tyshchenko.



---
Changes in v4:
- fix GICv3/GICV3
- default y to all options
- build xilinx-zynqmp if MPSOC
---
  xen/arch/arm/Kconfig|  2 ++
  xen/arch/arm/platforms/Kconfig  | 30 ++
  xen/arch/arm/platforms/Makefile |  2 +-
  3 files changed, 33 insertions(+), 1 deletion(-)
  create mode 100644 xen/arch/arm/platforms/Kconfig

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 2b87111..75cacfb 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
  config ARM32_HARDEN_BRANCH_PREDICTOR
  def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
  
+source "arch/arm/platforms/Kconfig"

+
  source "common/Kconfig"
  
  source "drivers/Kconfig"

diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
new file mode 100644
index 000..fea8f9a
--- /dev/null
+++ b/xen/arch/arm/platforms/Kconfig
@@ -0,0 +1,30 @@
+menu "Platform Support"
+
+config QEMU
+   bool "QEMU aarch virt machine support"
+   default y
+   depends on ARM_64
+   select GICV3
+   select HAS_PL011
+   ---help---
+   Enable all the required drivers for QEMU aarch64 virt emulated
+   machine.
+
+config RCAR3
+   bool "Renesas RCar3 support"
+   default y
+   depends on ARM_64
+   select HAS_SCIF
+   ---help---
+   Enable all the required drivers for Renesas RCar3
+
+config MPSOC
+   bool "Xilinx Ultrascale+ MPSoC support"
+   default y
+   depends on ARM_64
+   select HAS_CADENCE_UART
+   select ARM_SMMU
+   ---help---
+   Enable all the required drivers for Xilinx Ultrascale+ MPSoC
+
+endmenu
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index 80e555c..f4ff411 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
  obj-y += sunxi.o
  obj-$(CONFIG_ARM_64) += thunderx.o
  obj-$(CONFIG_ARM_64) += xgene-storm.o
-obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
+obj-$(CONFIG_MPSOC)  += xilinx-zynqmp.o



--
Volodymyr Babchuk

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v4 08/10] arm: add QEMU, Rcar3 and MPSoC configs

2018-05-31 Thread Julien Grall
Hi Stefano,

Sorry for formatting.

On Thu, 31 May 2018, 22:50 Stefano Stabellini, 
wrote:

> Add a "Platform Support" menu with three umbrella kconfig options: QEMU,
> RCAR3 and MPSOC. They enable the required options for their hardware
> platform.
>

This patch is nothing close to what we discussed. As far as I can tell, the
tiny.config will end up to select all the platforms with their driver. It
will not be possible to deselect the driver selected for a platform
afterwards.

I still think the best if providing a choice list where only one option can
be selected. I would like to understand why you didn't go this path.

Cheers,


> In the case of the MPSOC that has a platform file under
> arch/arm/platforms/, build the file if MPSOC.
>
> Signed-off-by: Stefano Stabellini 
> CC: artem_myga...@epam.com
> CC: volodymyr_babc...@epam.com
>
> ---
> Changes in v4:
> - fix GICv3/GICV3
> - default y to all options
> - build xilinx-zynqmp if MPSOC
> ---
>  xen/arch/arm/Kconfig|  2 ++
>  xen/arch/arm/platforms/Kconfig  | 30 ++
>  xen/arch/arm/platforms/Makefile |  2 +-
>  3 files changed, 33 insertions(+), 1 deletion(-)
>  create mode 100644 xen/arch/arm/platforms/Kconfig
>
> diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> index 2b87111..75cacfb 100644
> --- a/xen/arch/arm/Kconfig
> +++ b/xen/arch/arm/Kconfig
> @@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
>  config ARM32_HARDEN_BRANCH_PREDICTOR
>  def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
>
> +source "arch/arm/platforms/Kconfig"
> +
>  source "common/Kconfig"
>
>  source "drivers/Kconfig"
> diff --git a/xen/arch/arm/platforms/Kconfig
> b/xen/arch/arm/platforms/Kconfig
> new file mode 100644
> index 000..fea8f9a
> --- /dev/null
> +++ b/xen/arch/arm/platforms/Kconfig
> @@ -0,0 +1,30 @@
> +menu "Platform Support"
> +
> +config QEMU
> +   bool "QEMU aarch virt machine support"
> +   default y
> +   depends on ARM_64
> +   select GICV3
> +   select HAS_PL011
> +   ---help---
> +   Enable all the required drivers for QEMU aarch64 virt emulated
> +   machine.
> +
> +config RCAR3
> +   bool "Renesas RCar3 support"
> +   default y
> +   depends on ARM_64
> +   select HAS_SCIF
> +   ---help---
> +   Enable all the required drivers for Renesas RCar3
> +
> +config MPSOC
> +   bool "Xilinx Ultrascale+ MPSoC support"
> +   default y
> +   depends on ARM_64
> +   select HAS_CADENCE_UART
> +   select ARM_SMMU
> +   ---help---
> +   Enable all the required drivers for Xilinx Ultrascale+ MPSoC
> +
> +endmenu
> diff --git a/xen/arch/arm/platforms/Makefile
> b/xen/arch/arm/platforms/Makefile
> index 80e555c..f4ff411 100644
> --- a/xen/arch/arm/platforms/Makefile
> +++ b/xen/arch/arm/platforms/Makefile
> @@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
>  obj-y += sunxi.o
>  obj-$(CONFIG_ARM_64) += thunderx.o
>  obj-$(CONFIG_ARM_64) += xgene-storm.o
> -obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
> +obj-$(CONFIG_MPSOC)  += xilinx-zynqmp.o
> --
> 1.9.1
>
>
> ___
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v4 08/10] arm: add QEMU, Rcar3 and MPSoC configs

2018-05-31 Thread Stefano Stabellini
Add a "Platform Support" menu with three umbrella kconfig options: QEMU,
RCAR3 and MPSOC. They enable the required options for their hardware
platform.

In the case of the MPSOC that has a platform file under
arch/arm/platforms/, build the file if MPSOC.

Signed-off-by: Stefano Stabellini 
CC: artem_myga...@epam.com
CC: volodymyr_babc...@epam.com

---
Changes in v4:
- fix GICv3/GICV3
- default y to all options
- build xilinx-zynqmp if MPSOC
---
 xen/arch/arm/Kconfig|  2 ++
 xen/arch/arm/platforms/Kconfig  | 30 ++
 xen/arch/arm/platforms/Makefile |  2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/arm/platforms/Kconfig

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 2b87111..75cacfb 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -213,6 +213,8 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
 config ARM32_HARDEN_BRANCH_PREDICTOR
 def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR
 
+source "arch/arm/platforms/Kconfig"
+
 source "common/Kconfig"
 
 source "drivers/Kconfig"
diff --git a/xen/arch/arm/platforms/Kconfig b/xen/arch/arm/platforms/Kconfig
new file mode 100644
index 000..fea8f9a
--- /dev/null
+++ b/xen/arch/arm/platforms/Kconfig
@@ -0,0 +1,30 @@
+menu "Platform Support"
+
+config QEMU
+   bool "QEMU aarch virt machine support"
+   default y
+   depends on ARM_64
+   select GICV3
+   select HAS_PL011
+   ---help---
+   Enable all the required drivers for QEMU aarch64 virt emulated
+   machine.
+
+config RCAR3
+   bool "Renesas RCar3 support"
+   default y
+   depends on ARM_64
+   select HAS_SCIF
+   ---help---
+   Enable all the required drivers for Renesas RCar3
+
+config MPSOC
+   bool "Xilinx Ultrascale+ MPSoC support"
+   default y
+   depends on ARM_64
+   select HAS_CADENCE_UART
+   select ARM_SMMU
+   ---help---
+   Enable all the required drivers for Xilinx Ultrascale+ MPSoC
+
+endmenu
diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
index 80e555c..f4ff411 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_ARM_64) += seattle.o
 obj-y += sunxi.o
 obj-$(CONFIG_ARM_64) += thunderx.o
 obj-$(CONFIG_ARM_64) += xgene-storm.o
-obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
+obj-$(CONFIG_MPSOC)  += xilinx-zynqmp.o
-- 
1.9.1


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel