ARM: create .secure_stack section only for PSCI
[platform/kernel/u-boot.git] / arch / arm / cpu / u-boot.lds
index 0a5fae6..37d4c60 100644 (file)
@@ -74,6 +74,7 @@ SECTIONS
                *(._secure.data)
        }
 
+#ifdef CONFIG_ARMV7_PSCI
        .secure_stack ALIGN(ADDR(.secure_data) + SIZEOF(.secure_data),
                            CONSTANT(COMMONPAGESIZE)) (NOLOAD) :
 #ifdef __ARMV7_PSCI_STACK_IN_RAM
@@ -83,10 +84,10 @@ SECTIONS
 #endif
        {
                KEEP(*(.__secure_stack_start))
-#ifdef CONFIG_ARMV7_PSCI
+
                /* Skip addreses for stack */
                . = . + CONFIG_ARMV7_PSCI_NR_CPUS * ARM_PSCI_STACK_SIZE;
-#endif
+
                /* Align end of stack section to page boundary */
                . = ALIGN(CONSTANT(COMMONPAGESIZE));
 
@@ -109,6 +110,8 @@ SECTIONS
        . = LOADADDR(.secure_stack);
 #endif
 
+#endif
+
        .__secure_end : AT(ADDR(.__secure_end)) {
                *(.__secure_end)
                LONG(0x1d1071c);        /* Must output something to reset LMA */