Re: [Xen-devel] [PATCH 1/2] x86: force suitable alignment in sources rather than in linker script
On 12/08/16 15:47, Jan Beulich wrote: > Besides being more logical this also allows verifying correct recording > of alignments in .o files. > > The cpu0_stack related ASSERT() in xen.lds.S is now of questionable > value (as it now verifies correct tool chain behavior), but I've left > it in nevertheless. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -89,6 +89,7 @@ struct hvm_function_table hvm_funcs __re > */ > #define HVM_IOBITMAP_SIZE (3 * PAGE_SIZE) > unsigned long __section(".bss.page_aligned") > +__attribute__((aligned(PAGE_SIZE))) Can I talk you into introducing #define __aligned(x) __attribute__((aligned(x))) in compiler.h ? Otherwise, Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 1/2] x86: force suitable alignment in sources rather than in linker script
>>> On 12.08.16 at 17:02, wrote: > On 12/08/16 15:47, Jan Beulich wrote: >> Besides being more logical this also allows verifying correct recording >> of alignments in .o files. >> >> The cpu0_stack related ASSERT() in xen.lds.S is now of questionable >> value (as it now verifies correct tool chain behavior), but I've left >> it in nevertheless. >> >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -89,6 +89,7 @@ struct hvm_function_table hvm_funcs __re >> */ >> #define HVM_IOBITMAP_SIZE (3 * PAGE_SIZE) >> unsigned long __section(".bss.page_aligned") >> +__attribute__((aligned(PAGE_SIZE))) > > Can I talk you into introducing #define __aligned(x) > __attribute__((aligned(x))) in compiler.h ? Sure, I was on the edge of introducing it while putting this together anyway, but then thought it's maybe not worth it. > Otherwise, Reviewed-by: Andrew Cooper Thanks, Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH 1/2] x86: force suitable alignment in sources rather than in linker script
On 12/08/16 16:21, Jan Beulich wrote: On 12.08.16 at 17:02, wrote: >> On 12/08/16 15:47, Jan Beulich wrote: >>> Besides being more logical this also allows verifying correct recording >>> of alignments in .o files. >>> >>> The cpu0_stack related ASSERT() in xen.lds.S is now of questionable >>> value (as it now verifies correct tool chain behavior), but I've left >>> it in nevertheless. >>> >>> Signed-off-by: Jan Beulich >>> >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -89,6 +89,7 @@ struct hvm_function_table hvm_funcs __re >>> */ >>> #define HVM_IOBITMAP_SIZE (3 * PAGE_SIZE) >>> unsigned long __section(".bss.page_aligned") >>> +__attribute__((aligned(PAGE_SIZE))) >> Can I talk you into introducing #define __aligned(x) >> __attribute__((aligned(x))) in compiler.h ? > Sure, I was on the edge of introducing it while putting this together > anyway, but then thought it's maybe not worth it. I have been meaning to do it for a while, and clean up the existing opencoded uses in the tree. ~Andrew ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel