Skip to contentSkip to conversation

xen/init: Annotate all command line parameter infrastructure as const

PATCH Superseded Andrew Cooper 4 participants 13 messages Jun 9, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/init: Annotate all command line parameter infrastructure as const

There is no reason for any of it to be modified. Additionally, link .init.setup beside the other constant .init data.

While editing this area, correct the types used in the extern declarations for __setup_start and __setup_end to match the types the linker actually produces.

No functional change.

---
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/arch/arm/xen.lds.S | 11 ++++++-----
 xen/arch/x86/xen.lds.S | 11 ++++++-----
 xen/common/kernel.c    |  2 +-
 xen/include/xen/init.h |  7 ++++---
 4 files changed, 17 insertions(+), 14 deletions(-)
xen/arch/arm/xen.lds.S +6 -5
index 76982b2..0ad2ad9 100644
@@ -135,6 +135,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .init.proc.info : {
        __proc_info_start = .;
        *(.init.proc.info)
xen/arch/x86/xen.lds.S +6 -5
index a43b29d..e506714 100644
@@ -152,6 +152,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -178,11 +184,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .initcall.init : {
        __initcall_start = .;
        *(.initcallpresmp.init)
xen/common/kernel.c +1 -1
index 1a6823a..6f785bb 100644
@@ -96,7 +96,7 @@ void __init cmdline_parse(const char *cmdline)
         if ( !bool_assert )
             optkey += 3;
 
-        for ( param = &__setup_start; param < &__setup_end; param++ )
+        for ( param = __setup_start; param < __setup_end; param++ )
         {
             if ( strcmp(param->name, optkey) )
             {
xen/include/xen/init.h +4 -3
index 671ac81..9d7a080 100644
@@ -86,10 +86,11 @@ struct kernel_param {
     void *var;
 };
 
-extern struct kernel_param __setup_start, __setup_end;
+extern struct kernel_param __setup_start[], __setup_end[];
 
-#define __setup_str static __initdata __attribute__((__aligned__(1))) char
-#define __kparam static __initsetup \
+#define __setup_str static const  __initconstrel \
+    __attribute__((__aligned__(1))) char
+#define __kparam static const __initsetup \
     __attribute__((__aligned__(sizeof(void *)))) struct kernel_param
 
 #define custom_param(_name, _var) \
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw

PATCH 1/1 xen/xsm: Annotate xsm_initcall() data as const

Additionally, link it adjacently to the other constant init data.

---
CC: Daniel De Graaf <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/arch/arm/xen.lds.S | 9 ++++-----
 xen/arch/x86/xen.lds.S | 9 ++++-----
 xen/include/xsm/xsm.h  | 2 +-
 3 files changed, 9 insertions(+), 11 deletions(-)
xen/arch/arm/xen.lds.S +4 -5
index 0ad2ad9..ff621b6 100644
@@ -141,6 +141,10 @@ SECTIONS
        *(.init.setup)
        __setup_end = .;
 
+       __xsm_initcall_start = .;
+       *(.xsm_initcall.init)
+       __xsm_initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -163,11 +167,6 @@ SECTIONS
        *(.initcall1.init)
        __initcall_end = .;
   } :text
-  .xsm_initcall.init : {
-       __xsm_initcall_start = .;
-       *(.xsm_initcall.init)
-       __xsm_initcall_end = .;
-  } :text
   __init_end_efi = .;
   . = ALIGN(STACK_SIZE);
   __init_end = .;
xen/arch/x86/xen.lds.S +4 -5
index e506714..301fd8c 100644
@@ -158,6 +158,10 @@ SECTIONS
        *(.init.setup)
        __setup_end = .;
 
+       __xsm_initcall_start = .;
+       *(.xsm_initcall.init)
+       __xsm_initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -191,11 +195,6 @@ SECTIONS
        *(.initcall1.init)
        __initcall_end = .;
   } :text
-  .xsm_initcall.init : {
-       __xsm_initcall_start = .;
-       *(.xsm_initcall.init)
-       __xsm_initcall_end = .;
-  } :text
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
xen/include/xsm/xsm.h +1 -1
index 8ed8ee5..c1aa69c 100644
@@ -51,7 +51,7 @@ typedef void (*xsm_initcall_t)(void);
 extern xsm_initcall_t __xsm_initcall_start[], __xsm_initcall_end[];
 
 #define xsm_initcall(fn) \
-    static xsm_initcall_t __initcall_##fn \
+    static const xsm_initcall_t __initcall_##fn \
     __used_section(".xsm_initcall.init") = fn
 
 struct xsm_operations {
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#2 lore raw

Re: [PATCH] xen/xsm: Annotate xsm_initcall() data as const

xen/include/xsm/xsm.h typedef void (*xsm_initcall_t)(void); · line 55

Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/include/xsm/xsm.h +1 -1
@@ -51,7 +51,7 @@ typedef void (*xsm_initcall_t)(void);
 extern xsm_initcall_t __xsm_initcall_start[], __xsm_initcall_end[];
 
 #define xsm_initcall(fn) \
-    static xsm_initcall_t __initcall_##fn \
+    static const xsm_initcall_t __initcall_##fn \
     __used_section(".xsm_initcall.init") = fn

Same here - please make the bounding symbol declarations then const too.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw

Re: [PATCH] xen/xsm: Annotate xsm_initcall() data as const

In reply to Andrew Cooper
Quoted 3 lines · Andrew Cooper

Additionally, link it adjacently to the other constant init data.

I think this section can actually be removed instead: it only has one user, additional users will need special switching code added anyway, and it should make the setup code easier to follow.

I already have a patch for the removal; I'll send that series soon.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

Re: [PATCH] xen/xsm: Annotate xsm_initcall() data as const

Quoted 10 lines · Daniel De Graaf
Quoted 3 lines · Andrew Cooper

Additionally, link it adjacently to the other constant init data.

I think this section can actually be removed instead: it only has one user, additional users will need special switching code added anyway, and it should make the setup code easier to follow.

I already have a patch for the removal; I'll send that series soon.

Ok - I will drop this patch from my series.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

PATCH 1/1 x86/boot: copy/clear sections more efficiently

In reply to Andrew Cooper

Both the trampoline copy and BSS initialise can be performed more efficiently by using 4-byte variants of the string operations.

On Intel systems with ERMSB (efficient rep movsb), this is no practical difference. On all other systems, this is 4 times more efficient.

---
CC: Jan Beulich <[email protected]>

---
 xen/arch/x86/boot/head.S | 9 +++++----
 xen/arch/x86/xen.lds.S   | 6 ++++++
 2 files changed, 11 insertions(+), 4 deletions(-)
xen/arch/x86/boot/head.S +5 -4
index 0999997..6060ec2 100644
@@ -128,7 +128,8 @@ __start:
         mov     $sym_phys(__bss_end),%ecx
         sub     %edi,%ecx
         xor     %eax,%eax
-        rep     stosb
+        shr     $2,%ecx
+        rep     stosl
 
         /* Interrogate CPU extended features via CPUID. */
         mov     $0x80000000,%eax
@@ -192,8 +193,8 @@ __start:
 
         /* Copy bootstrap trampoline to low memory, below 1MB. */
         mov     $sym_phys(trampoline_start),%esi
-        mov     $trampoline_end - trampoline_start,%ecx
-        rep     movsb
+        mov     $((trampoline_end - trampoline_start) / 4),%ecx
+        rep     movsl
 
         /* Jump into the relocated trampoline. */
         lret
@@ -205,6 +206,6 @@ reloc:
 
 ENTRY(trampoline_start)
 #include "trampoline.S"
-GLOBAL(trampoline_end)
+ENTRY(trampoline_end)
 
 #include "x86_64.S"
xen/arch/x86/xen.lds.S +6 -0
index 301fd8c..8731b39 100644
@@ -240,6 +240,7 @@ SECTIONS
        *(.bss.percpu.read_mostly)
        . = ALIGN(SMP_CACHE_BYTES);
        __per_cpu_data_end = .;
+       . = ALIGN(4);
        __bss_end = .;
   } :text
   _end = . ;
@@ -320,3 +321,8 @@ ASSERT(IS_ALIGNED(cpu0_stack, STACK_SIZE), "cpu0_stack misaligned")
 
 ASSERT(IS_ALIGNED(__init_begin, PAGE_SIZE), "__init_begin misaligned")
 ASSERT(IS_ALIGNED(__init_end,   PAGE_SIZE), "__init_end misaligned")
+
+ASSERT(IS_ALIGNED(trampoline_start, 4), "trampoline_start misaligned")
+ASSERT(IS_ALIGNED(trampoline_end,   4), "trampoline_end misaligned")
+ASSERT(IS_ALIGNED(__bss_start,      4), "__bss_start misaligned")
+ASSERT(IS_ALIGNED(__bss_end,        4), "__bss_end misaligned")
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#6 lore raw

Re: [PATCH] x86/boot: copy/clear sections more efficiently

xen/arch/x86/boot/head.S __start: · line 132

Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/x86/boot/head.S +2 -1
@@ -128,7 +128,8 @@ __start:
         mov     $sym_phys(__bss_end),%ecx
         sub     %edi,%ecx
         xor     %eax,%eax
-        rep     stosb
+        shr     $2,%ecx
+        rep     stosl

Please take the opportunity and reduce the whitespace between prefix and instruction to just one (to make clear "rep" is not the instruction and "stosl" is not it operand).

xen/arch/x86/boot/head.S __start: · line 197

Quoted 8 lines
xen/arch/x86/boot/head.S +2 -2
@@ -192,8 +193,8 @@ __start:
 
         /* Copy bootstrap trampoline to low memory, below 1MB. */
         mov     $sym_phys(trampoline_start),%esi
-        mov     $trampoline_end - trampoline_start,%ecx
-        rep     movsb
+        mov     $((trampoline_end - trampoline_start) / 4),%ecx
+        rep     movsl

Same here.

With that

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#7 lore raw
In reply to Andrew Cooper

CC'ing Stefano's correct address. (This patch pre-dates quite a lot of recent changes).

Quoted 101 lines · Andrew Cooper

There is no reason for any of it to be modified. Additionally, link .init.setup beside the other constant .init data.

While editing this area, correct the types used in the extern declarations for __setup_start and __setup_end to match the types the linker actually produces.

No functional change.

---
CC: Jan Beulich <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/arch/arm/xen.lds.S | 11 ++++++-----
 xen/arch/x86/xen.lds.S | 11 ++++++-----
 xen/common/kernel.c    |  2 +-
 xen/include/xen/init.h |  7 ++++---
 4 files changed, 17 insertions(+), 14 deletions(-)
xen/arch/arm/xen.lds.S +6 -5
index 76982b2..0ad2ad9 100644
@@ -135,6 +135,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .init.proc.info : {
        __proc_info_start = .;
        *(.init.proc.info)
xen/arch/x86/xen.lds.S +6 -5
index a43b29d..e506714 100644
@@ -152,6 +152,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -178,11 +184,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .initcall.init : {
        __initcall_start = .;
        *(.initcallpresmp.init)
xen/common/kernel.c +1 -1
index 1a6823a..6f785bb 100644
@@ -96,7 +96,7 @@ void __init cmdline_parse(const char *cmdline)
         if ( !bool_assert )
             optkey += 3;
 
-        for ( param = &__setup_start; param < &__setup_end; param++ )
+        for ( param = __setup_start; param < __setup_end; param++ )
         {
             if ( strcmp(param->name, optkey) )
             {
xen/include/xen/init.h +0 -1
index 671ac81..9d7a080 100644
@@ -86,10 +86,11 @@ struct kernel_param {
     void *var;
 };
 
-extern struct kernel_param __setup_start, __setup_end;

xen/include/xen/init.h struct kernel_param { · line 96

Quoted 10 lines
xen/include/xen/init.h +4 -2
+extern struct kernel_param __setup_start[], __setup_end[];
 
-#define __setup_str static __initdata __attribute__((__aligned__(1))) char
-#define __kparam static __initsetup \
+#define __setup_str static const  __initconstrel \
+    __attribute__((__aligned__(1))) char
+#define __kparam static const __initsetup \
     __attribute__((__aligned__(sizeof(void *)))) struct kernel_param
 
 #define custom_param(_name, _var) \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw
In reply to Andrew Cooper
Quoted 17 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/arm/xen.lds.S +6 -0
@@ -135,6 +135,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)

xen/arch/arm/xen.lds.S SECTIONS · line 154

Quoted 9 lines
xen/arch/arm/xen.lds.S +0 -5
@@ -145,11 +151,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .init.proc.info : {

Surely that ALIGN() then has no reason to retain the 32 (similar for x86)?

xen/include/xen/init.h struct kernel_param { · line 89

Quoted 8 lines
xen/include/xen/init.h +1 -1
@@ -86,10 +86,11 @@ struct kernel_param {
     void *var;
 };
 
-extern struct kernel_param __setup_start, __setup_end;
+extern struct kernel_param __setup_start[], __setup_end[];

I thought your respective remark in the commit message would also implied making these const now that they are.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/arm/xen.lds.S +6 -0
@@ -135,6 +135,12 @@ SECTIONS
        *(.init.rodata)
        *(.init.rodata.rel)
        *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
        __ctors_end = .;
   } :text
   . = ALIGN(32);
Quoted 8 lines

xen/arch/arm/xen.lds.S SECTIONS · line 154

Quoted 6 lines
xen/arch/arm/xen.lds.S +0 -5
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
   .init.proc.info : {

Surely that ALIGN() then has no reason to retain the 32 (similar for x86)?

I don't know where this ALIGN() came from, but I am hesitant to remove it until I am sure it is safe to do so.

For both x86 and arm, .initcall will take a little more work to disentangle, although I do intend to make it happen.

On arm, .init.proc.info is an array of 32byte elements. Looking at its contents, it should be constant, and probably wants 4 byte alignment as opposed to 32.

Quoted 11 lines

xen/include/xen/init.h struct kernel_param { · line 89

Quoted 9 lines
xen/include/xen/init.h +1 -1
@@ -86,10 +86,11 @@ struct kernel_param {
     void *var;
 };
 
-extern struct kernel_param __setup_start, __setup_end;
+extern struct kernel_param __setup_start[], __setup_end[];

I thought your respective remark in the commit message would also implied making these const now that they are.

Will do.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#10 lore raw

Hi Andrew,

Quoted 33 lines · Andrew Cooper
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/arm/xen.lds.S +6 -0
@@ -135,6 +135,12 @@ SECTIONS
         *(.init.rodata)
         *(.init.rodata.rel)
         *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
         *(.init.data)
         *(.init.data.rel)
         *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
         __ctors_end = .;
    } :text
    . = ALIGN(32);
Quoted 8 lines

xen/arch/arm/xen.lds.S SECTIONS · line 154

Quoted 6 lines
xen/arch/arm/xen.lds.S +0 -5
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
    .init.proc.info : {

Surely that ALIGN() then has no reason to retain the 32 (similar for x86)?

I don't know where this ALIGN() came from, but I am hesitant to remove it until I am sure it is safe to do so.

Quoted 6 lines

For both x86 and arm, .initcall will take a little more work to disentangle, although I do intend to make it happen.

On arm, .init.proc.info is an array of 32byte elements. Looking at its contents, it should be constant, and probably wants 4 byte alignment as opposed to 32.

proc_info_list contains some pointers, so we want 4-byte for ARM32 and 8-byte for ARM64. I would use POINTER_ALIGN here.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#11 lore raw

(CC the correct email for Stefano)

Quoted 48 lines · Julien Grall

Hi Andrew,

Quoted 33 lines · Andrew Cooper
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/arm/xen.lds.S +6 -0
@@ -135,6 +135,12 @@ SECTIONS
         *(.init.rodata)
         *(.init.rodata.rel)
         *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
         *(.init.data)
         *(.init.data.rel)
         *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
         __ctors_end = .;
    } :text
    . = ALIGN(32);
Quoted 8 lines

xen/arch/arm/xen.lds.S SECTIONS · line 154

Quoted 6 lines
xen/arch/arm/xen.lds.S +0 -5
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
    .init.proc.info : {

Surely that ALIGN() then has no reason to retain the 32 (similar for x86)?

I don't know where this ALIGN() came from, but I am hesitant to remove it until I am sure it is safe to do so.

Quoted 6 lines

For both x86 and arm, .initcall will take a little more work to disentangle, although I do intend to make it happen.

On arm, .init.proc.info is an array of 32byte elements. Looking at its contents, it should be constant, and probably wants 4 byte alignment as opposed to 32.

proc_info_list contains some pointers, so we want 4-byte for ARM32 and 8-byte for ARM64. I would use POINTER_ALIGN here.

Regards,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#12 lore raw
In reply to Julien Grall
Quoted 39 lines · Julien Grall

Hi Andrew,

Quoted 36 lines · Andrew Cooper
Quoted 20 lines · Jan Beulich
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 09.06.16 at 11:58, <[email protected]> wrote:
xen/arch/arm/xen.lds.S +6 -0
@@ -135,6 +135,12 @@ SECTIONS
         *(.init.rodata)
         *(.init.rodata.rel)
         *(.init.rodata.str*)
+
+       . = ALIGN(POINTER_ALIGN);
+       __setup_start = .;
+       *(.init.setup)
+       __setup_end = .;
+
         *(.init.data)
         *(.init.data.rel)
         *(.init.data.rel.*)
@@ -145,11 +151,6 @@ SECTIONS
         __ctors_end = .;
    } :text
    . = ALIGN(32);
Quoted 8 lines

xen/arch/arm/xen.lds.S SECTIONS · line 154

Quoted 6 lines
xen/arch/arm/xen.lds.S +0 -5
-  .init.setup : {
-       __setup_start = .;
-       *(.init.setup)
-       __setup_end = .;
-  } :text
    .init.proc.info : {

Surely that ALIGN() then has no reason to retain the 32 (similar for x86)?

I don't know where this ALIGN() came from, but I am hesitant to remove it until I am sure it is safe to do so.

For both x86 and arm, .initcall will take a little more work to disentangle, although I do intend to make it happen.

Quoted 6 lines
Quoted 3 lines

On arm, .init.proc.info is an array of 32byte elements. Looking at its contents, it should be constant, and probably wants 4 byte alignment as opposed to 32.

proc_info_list contains some pointers, so we want 4-byte for ARM32 and 8-byte for ARM64. I would use POINTER_ALIGN here.

I will add a patch to my series making this change.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel