All of lore.kernel.org
 help / color / mirror / Atom feed
* [v2] arm: include: secure: Don't include asm\global_data.h in .S file
@ 2021-02-22  1:56 Siew Chin Lim
  2021-02-22  9:20 ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: Siew Chin Lim @ 2021-02-22  1:56 UTC (permalink / raw)
  To: u-boot

Commit "common: Drop asm/global_data.h from common header" added
asm/global_data.h into secure.h. However, secure.h will be included
by psci.S. Adding asm/global_data.h has caused compilation failure in
pcsi.S. Update secure.h to only include asm/global_data.h in non-assembly
section.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>

---
v2 : Update "asm\global_data.h" to "asm/global_data.h" in commit message.
---
---
 arch/arm/include/asm/secure.h | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/arm/include/asm/secure.h b/arch/arm/include/asm/secure.h
index 64e5582c1f..63a21f89ce 100644
--- a/arch/arm/include/asm/secure.h
+++ b/arch/arm/include/asm/secure.h
@@ -2,7 +2,9 @@
 #define __ASM_SECURE_H
 
 #include <config.h>
+#ifndef __ASSEMBLY__
 #include <asm/global_data.h>
+#endif
 
 #define __secure __attribute__ ((section ("._secure.text")))
 #define __secure_data __attribute__ ((section ("._secure.data")))
@@ -27,17 +29,6 @@ typedef struct secure_svc_tbl {
 				.id = _id, \
 				.func = _fn }
 
-#else
-
-#ifdef CONFIG_ARMV8_PSCI
-#define SECURE_SVC_TBL_OFFSET		16
-#else
-#define SECURE_SVC_TBL_OFFSET		8
-
-#endif
-
-#endif /* __ASSEMBLY__ */
-
 #if defined(CONFIG_ARMV7_SECURE_BASE) || defined(CONFIG_ARMV8_SECURE_BASE)
 /*
  * Warning, horror ahead.
@@ -58,4 +49,14 @@ typedef struct secure_svc_tbl {
 #define secure_ram_addr(_fn)	(_fn)
 #endif
 
+#else /* __ASSEMBLY__ */
+
+#ifdef CONFIG_ARMV8_PSCI
+#define SECURE_SVC_TBL_OFFSET		16
+#else
+#define SECURE_SVC_TBL_OFFSET		8
+#endif
+
+#endif /* __ASSEMBLY__ */
+
 #endif
-- 
2.13.0

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

* [v2] arm: include: secure: Don't include asm\global_data.h in .S file
  2021-02-22  1:56 [v2] arm: include: secure: Don't include asm\global_data.h in .S file Siew Chin Lim
@ 2021-02-22  9:20 ` Simon Glass
  2021-02-23  6:37   ` Lim, Elly Siew Chin
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2021-02-22  9:20 UTC (permalink / raw)
  To: u-boot

Hi Siew,

On Sun, 21 Feb 2021 at 18:56, Siew Chin Lim
<elly.siew.chin.lim@intel.com> wrote:
>
> Commit "common: Drop asm/global_data.h from common header" added
> asm/global_data.h into secure.h. However, secure.h will be included
> by psci.S. Adding asm/global_data.h has caused compilation failure in
> pcsi.S. Update secure.h to only include asm/global_data.h in non-assembly
> section.
>
> Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
>
> ---
> v2 : Update "asm\global_data.h" to "asm/global_data.h" in commit message.
> ---
> ---
>  arch/arm/include/asm/secure.h | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)

If you look at the asm-generic version of global_data.h it actually
includes an #ifdef for __ASSEMBLY__

Perhaps we should do the same for arch/arm/include/asm/global_data .h
? To me, it seems better to allow global_data.h to be included always.

Regards,
Simon

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

* [v2] arm: include: secure: Don't include asm\global_data.h in .S file
  2021-02-22  9:20 ` Simon Glass
@ 2021-02-23  6:37   ` Lim, Elly Siew Chin
  0 siblings, 0 replies; 3+ messages in thread
From: Lim, Elly Siew Chin @ 2021-02-23  6:37 UTC (permalink / raw)
  To: u-boot

Hi Simon,

> -----Original Message-----
> From: Simon Glass <sjg@chromium.org>
> Sent: Monday, February 22, 2021 5:21 PM
> To: Lim, Elly Siew Chin <elly.siew.chin.lim@intel.com>
> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Marek Vasut
> <marex@denx.de>; Tan, Ley Foon <ley.foon.tan@intel.com>; See, Chin Liang
> <chin.liang.see@intel.com>; Simon Goldschmidt
> <simon.k.r.goldschmidt@gmail.com>; Chee, Tien Fong
> <tien.fong.chee@intel.com>; Westergreen, Dalon
> <dalon.westergreen@intel.com>; Gan, Yau Wai <yau.wai.gan@intel.com>
> Subject: Re: [v2] arm: include: secure: Don't include asm\global_data.h in .S file
> 
> Hi Siew,
> 
> On Sun, 21 Feb 2021 at 18:56, Siew Chin Lim <elly.siew.chin.lim@intel.com>
> wrote:
> >
> > Commit "common: Drop asm/global_data.h from common header" added
> > asm/global_data.h into secure.h. However, secure.h will be included by
> > psci.S. Adding asm/global_data.h has caused compilation failure in
> > pcsi.S. Update secure.h to only include asm/global_data.h in
> > non-assembly section.
> >
> > Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
> >
> > ---
> > v2 : Update "asm\global_data.h" to "asm/global_data.h" in commit message.
> > ---
> > ---
> >  arch/arm/include/asm/secure.h | 23 ++++++++++++-----------
> >  1 file changed, 12 insertions(+), 11 deletions(-)
> 
> If you look at the asm-generic version of global_data.h it actually includes an
> #ifdef for __ASSEMBLY__
> 
> Perhaps we should do the same for arch/arm/include/asm/global_data .h ? To
> me, it seems better to allow global_data.h to be included always.
> 

Thanks for the suggestion. Adding "#ifndef __ASSEMBLY__" in asm/global_data.h looks better. 
Please ignore this patch. I have already send another patch which adding "#ifndef __ASSEMBLY__" in asm/global_data.h.

Thanks,
Siew Chin

> Regards,
> Simon

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

end of thread, other threads:[~2021-02-23  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  1:56 [v2] arm: include: secure: Don't include asm\global_data.h in .S file Siew Chin Lim
2021-02-22  9:20 ` Simon Glass
2021-02-23  6:37   ` Lim, Elly Siew Chin

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.