ARM: Move __secure definition to common asm/secure.h
authorChen-Yu Tsai <wens@csie.org>
Sun, 19 Jun 2016 04:38:41 +0000 (12:38 +0800)
committerHans de Goede <hdegoede@redhat.com>
Fri, 15 Jul 2016 13:54:57 +0000 (15:54 +0200)
sunxi and i.mx7 both define the __secure modifier to put functions in
the secure section. Move this to a common place.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/arm/cpu/armv7/mx7/psci-mx7.c
arch/arm/cpu/armv7/sunxi/psci.c
arch/arm/include/asm/secure.h

index 9a33047..502552d 100644 (file)
@@ -1,9 +1,9 @@
 #include <asm/io.h>
 #include <asm/psci.h>
+#include <asm/secure.h>
 #include <asm/arch/imx-regs.h>
 #include <common.h>
 
-#define __secure __attribute__((section("._secure.text")))
 
 #define GPC_CPU_PGC_SW_PDN_REQ 0xfc
 #define GPC_CPU_PGC_SW_PUP_REQ 0xf0
index c7d97fe..be3a1fb 100644 (file)
 #include <asm/gic.h>
 #include <asm/io.h>
 #include <asm/psci.h>
+#include <asm/secure.h>
 #include <asm/system.h>
 
 #include <linux/bitops.h>
 
-#define __secure       __attribute__ ((section ("._secure.text")))
 #define __irq          __attribute__ ((interrupt ("IRQ")))
 
 #define        GICD_BASE       (SUNXI_GIC400_BASE + GIC_DIST_OFFSET)
index effdb18..6d9088b 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <config.h>
 
+#define __secure __attribute__ ((section ("._secure.text")))
+
 #ifdef CONFIG_ARMV7_SECURE_BASE
 /*
  * Warning, horror ahead.