Re: [PATCH v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

From: Peter Zijlstra
Date: Tue Sep 13 2022 - 09:17:11 EST


On Tue, Sep 13, 2022 at 12:21:51PM +0000, Christophe Leroy wrote:

> > Like mentioned last time; I'm fixing this (but you're right to not wait
> > on that), that said, would it make sense to write it like:
> >
> > #define __ALIGN .balign 4
> > #define __ALIGN_STR __stringify(__ALIGN)
>
> By the way, I commented to Sathvika to not use __stringify() in order to
> avoid having to include stringify.h as we are trying to minimise
> dependencies between headers.
>
> Several other architectures also do it that way.

stringify.h is a trivial header and included by linux/linkage.h before
it includes asm/linkage.

Anyway, I was thinking of having:

#ifndef __ALIGN_STR
#define __ALIGN_STR __stringify(__ALIGN)
#endif

in linux/linkage.h, that avoids having to duplicate this all over the
place.