lkml.org 
[lkml]   [2022]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 02/16] powerpc: override __ALIGN() and __ALIGN_STR() macros
On Mon, Aug 29, 2022 at 11:22:09AM +0530, Sathvika Vasireddy wrote:
> Powerpc instructions must be word-aligned. Currently,
> there is an alignment of 16 bytes (by default), and it is
> much more than what is required for powerpc (4 bytes).
>
> The default expansion of __ALIGN() macro is:
> #define __ALIGN .align 4,0x90
>
> Since Powerpc Linux does not require a 16 byte alignment,
> override __ALIGN() and __ALIGN_STR() macros to use required
> 4 byte alignment.
>
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
> ---
> arch/powerpc/include/asm/linkage.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/asm/linkage.h
> index b71b9582e754..8df88fe61438 100644
> --- a/arch/powerpc/include/asm/linkage.h
> +++ b/arch/powerpc/include/asm/linkage.h
> @@ -2,8 +2,12 @@
> #ifndef _ASM_POWERPC_LINKAGE_H
> #define _ASM_POWERPC_LINKAGE_H
>
> +#include <linux/stringify.h>
> #include <asm/types.h>
>
> +#define __ALIGN .align 2
> +#define __ALIGN_STR __stringify(__ALIGN)


Related thread:

https://lkml.kernel.org/r/YxXJswK9QjhCGmPN@hirez.programming.kicks-ass.net

\
 
 \ /
  Last update: 2022-09-05 13:06    [W:0.924 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site