diff mbox series

[03/15] Convert CONFIG_ARMV8_SWITCH_TO_EL1 to Kconfig

Message ID 20220310014404.1251636-3-trini@konsulko.com
State Superseded
Delegated to: Tom Rini
Headers show
Series [01/15] Convert CONFIG_ARMV7_SECURE_BASE et al to Kconfig | expand

Commit Message

Tom Rini March 10, 2022, 1:43 a.m. UTC
This converts the following to Kconfig:
   CONFIG_ARMV8_SWITCH_TO_EL1

As this option isn't enabled anywhere and is for very specific
circumstances, it's not an asked Kconfig option and instead noted as
something to select.

Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv8/Kconfig      | 6 ++++++
 include/configs/xilinx_versal.h | 2 --
 include/configs/xilinx_zynqmp.h | 2 --
 3 files changed, 6 insertions(+), 4 deletions(-)

Comments

Michal Simek March 10, 2022, 7:24 a.m. UTC | #1
Hi Tom,

On 3/10/22 02:43, Tom Rini wrote:
> This converts the following to Kconfig:
>     CONFIG_ARMV8_SWITCH_TO_EL1
> 
> As this option isn't enabled anywhere and is for very specific
> circumstances, it's not an asked Kconfig option and instead noted as
> something to select.
> 
> Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Cc: Tien Fong Chee <tien.fong.chee@intel.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   arch/arm/cpu/armv8/Kconfig      | 6 ++++++
>   include/configs/xilinx_versal.h | 2 --
>   include/configs/xilinx_zynqmp.h | 2 --
>   3 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
> index 9967376ecab9..8d29393bc0e9 100644
> --- a/arch/arm/cpu/armv8/Kconfig
> +++ b/arch/arm/cpu/armv8/Kconfig
> @@ -31,6 +31,12 @@ config ARMV8_SET_SMPEN
>   	  it can be safely enabled when EL2/EL3 initialized SMPEN bit
>   	  or when CPU implementation doesn't include that register.
>   
> +config ARMV8_SWITCH_TO_EL1
> +	bool

I think it make sense to be able to enable it via menuconfig to make it 
selectable based on user wish. I was using it in past to check that we can do 
clear handoff to EL1 directly.

Thanks,
Michal
Tom Rini March 10, 2022, 1:34 p.m. UTC | #2
On Thu, Mar 10, 2022 at 08:24:51AM +0100, Michal Simek wrote:
> Hi Tom,
> 
> On 3/10/22 02:43, Tom Rini wrote:
> > This converts the following to Kconfig:
> >     CONFIG_ARMV8_SWITCH_TO_EL1
> > 
> > As this option isn't enabled anywhere and is for very specific
> > circumstances, it's not an asked Kconfig option and instead noted as
> > something to select.
> > 
> > Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
> > Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> > Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> > Cc: Tien Fong Chee <tien.fong.chee@intel.com>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> >   arch/arm/cpu/armv8/Kconfig      | 6 ++++++
> >   include/configs/xilinx_versal.h | 2 --
> >   include/configs/xilinx_zynqmp.h | 2 --
> >   3 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
> > index 9967376ecab9..8d29393bc0e9 100644
> > --- a/arch/arm/cpu/armv8/Kconfig
> > +++ b/arch/arm/cpu/armv8/Kconfig
> > @@ -31,6 +31,12 @@ config ARMV8_SET_SMPEN
> >   	  it can be safely enabled when EL2/EL3 initialized SMPEN bit
> >   	  or when CPU implementation doesn't include that register.
> > +config ARMV8_SWITCH_TO_EL1
> > +	bool
> 
> I think it make sense to be able to enable it via menuconfig to make it
> selectable based on user wish. I was using it in past to check that we can
> do clear handoff to EL1 directly.

OK, will do.
diff mbox series

Patch

diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 9967376ecab9..8d29393bc0e9 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -31,6 +31,12 @@  config ARMV8_SET_SMPEN
 	  it can be safely enabled when EL2/EL3 initialized SMPEN bit
 	  or when CPU implementation doesn't include that register.
 
+config ARMV8_SWITCH_TO_EL1
+	bool
+	help
+	  In some circumstances we need to switch to running in EL1.  In
+	  that case, select this option from your target Kconfig entry.
+
 config ARMV8_SPIN_TABLE
 	bool "Support spin-table enable method"
 	depends on ARMV8_MULTIENTRY && OF_LIBFDT
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index 20f5a7271a20..a8009f236937 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -10,8 +10,6 @@ 
 #ifndef __XILINX_VERSAL_H
 #define __XILINX_VERSAL_H
 
-/* #define CONFIG_ARMV8_SWITCH_TO_EL1 */
-
 /* Generic Interrupt Controller Definitions */
 #define GICD_BASE	0xF9000000
 #define GICR_BASE	0xF9080000
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 1f0da1a4b3e4..27ec3e06270e 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -10,8 +10,6 @@ 
 #ifndef __XILINX_ZYNQMP_H
 #define __XILINX_ZYNQMP_H
 
-/* #define CONFIG_ARMV8_SWITCH_TO_EL1 */
-
 /* Generic Interrupt Controller Definitions */
 #define GICD_BASE	0xF9010000
 #define GICC_BASE	0xF9020000