Re: [Xen-devel] [PATCH v2 3/4] xen/init: Move initcall infrastructure into .init.data

2016-06-22 Thread Jan Beulich
>>> On 21.06.16 at 18:59,  wrote:
> Its contents is constant.
> 
> Signed-off-by: Andrew Cooper 

Non-ARM part:
Reviewed-by: Jan Beulich 

> @@ -154,14 +160,6 @@ SECTIONS
> *(.init_array)
> __ctors_end = .;
>} :text
> -  . = ALIGN(32);
> -  .initcall.init : {
> -   __initcall_start = .;
> -   *(.initcallpresmp.init)
> -   __presmp_initcall_end = .;
> -   *(.initcall1.init)
> -   __initcall_end = .;
> -  } :text
>__init_end_efi = .;
>. = ALIGN(STACK_SIZE);
>__init_end = .;

For this part, other than the x86 side, I think Konrad has a point: You
change the alignment guarantees for __init_end_efi. Likely that won't
matter, but verifying (and stating so) would still seem necessary /
desirable.

Jan


___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 3/4] xen/init: Move initcall infrastructure into .init.data

2016-06-21 Thread Andrew Cooper
On 21/06/16 18:19, Konrad Rzeszutek Wilk wrote:
> On Tue, Jun 21, 2016 at 05:59:04PM +0100, Andrew Cooper wrote:
>> Its contents is constant.
>>
> Could you mention why you don't need the ALIGN(32).

Because there is no content following it, before a larger alignment.

~Andrew

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH v2 3/4] xen/init: Move initcall infrastructure into .init.data

2016-06-21 Thread Konrad Rzeszutek Wilk
On Tue, Jun 21, 2016 at 05:59:04PM +0100, Andrew Cooper wrote:
> Its contents is constant.
> 

Could you mention why you don't need the ALIGN(32).

Thanks.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


[Xen-devel] [PATCH v2 3/4] xen/init: Move initcall infrastructure into .init.data

2016-06-21 Thread Andrew Cooper
Its contents is constant.

Signed-off-by: Andrew Cooper 
---
CC: Jan Beulich 
CC: Stefano Stabellini 
CC: Julien Grall 

v2:
 * New
---
 xen/arch/arm/xen.lds.S | 14 ++
 xen/arch/x86/xen.lds.S | 14 ++
 xen/include/xen/init.h |  4 ++--
 3 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index b00ee81..b18c9c2 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -145,6 +145,12 @@ SECTIONS
*(.init.proc.info)
__proc_info_end = .;
 
+   __initcall_start = .;
+   *(.initcallpresmp.init)
+   __presmp_initcall_end = .;
+   *(.initcall1.init)
+   __initcall_end = .;
+
*(.init.data)
*(.init.data.rel)
*(.init.data.rel.*)
@@ -154,14 +160,6 @@ SECTIONS
*(.init_array)
__ctors_end = .;
   } :text
-  . = ALIGN(32);
-  .initcall.init : {
-   __initcall_start = .;
-   *(.initcallpresmp.init)
-   __presmp_initcall_end = .;
-   *(.initcall1.init)
-   __initcall_end = .;
-  } :text
   __init_end_efi = .;
   . = ALIGN(STACK_SIZE);
   __init_end = .;
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 2443b93..a1678d8 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -158,6 +158,12 @@ SECTIONS
*(.init.setup)
__setup_end = .;
 
+   __initcall_start = .;
+   *(.initcallpresmp.init)
+   __presmp_initcall_end = .;
+   *(.initcall1.init)
+   __initcall_end = .;
+
*(.init.data)
*(.init.data.rel)
*(.init.data.rel.*)
@@ -183,14 +189,6 @@ SECTIONS
*(.ctors)
__ctors_end = .;
   } :text
-  . = ALIGN(32);
-  .initcall.init : {
-   __initcall_start = .;
-   *(.initcallpresmp.init)
-   __presmp_initcall_end = .;
-   *(.initcall1.init)
-   __initcall_end = .;
-  } :text
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index b04bcf9..0afc430 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -61,9 +61,9 @@ typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
 #define presmp_initcall(fn) \
-static initcall_t __initcall_##fn __init_call("presmp") = fn
+const static initcall_t __initcall_##fn __init_call("presmp") = fn
 #define __initcall(fn) \
-static initcall_t __initcall_##fn __init_call("1") = fn
+const static initcall_t __initcall_##fn __init_call("1") = fn
 #define __exitcall(fn) \
 static exitcall_t __exitcall_##fn __exit_call = fn
 
-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel