LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Michael Ellerman <mpe@ellerman.id.au>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc/64: Include cache.h directly in paca.h
Date: Fri, 27 May 2022 12:16:14 +0000	[thread overview]
Message-ID: <dbb8260a-ee02-9fd8-707a-92166ba217be@csgroup.eu> (raw)
In-Reply-To: <20220527112035.2842155-1-mpe@ellerman.id.au>



Le 27/05/2022 à 13:20, Michael Ellerman a écrit :
> paca.h uses ____cacheline_aligned without directly including cache.h,
> where it's defined.
> 
> For Book3S builds that's OK because paca.h includes lppaca.h, and it
> does include cache.h.
> 
> But Book3E builds have been getting cache.h indirectly via printk.h,
> which is dicey, and in fact that include was recently removed, leading
> to build errors such as:
> 
>    ld: fs/isofs/dir.o:(.bss+0x0): multiple definition of `____cacheline_aligned'; fs/isofs/namei.o:(.bss+0x0): first defined here
> 
> So include cache.h directly to fix the build error.
> 
> Fixes: 534aa1dc975a ("printk: stop including cache.h from printk.h")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

You've got other candidates for the fix:

$ git grep -L linux/cache.h `git grep -l ____cacheline_aligned 
arch/powerpc`
arch/powerpc/include/asm/hardirq.h
arch/powerpc/include/asm/iommu.h
arch/powerpc/include/asm/paca.h
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/prom_init.c

Discussion at 
https://lore.kernel.org/lkml/e3c8b2bf-b55d-4c2c-a1cf-d5e9941e26b0@csgroup.eu/t/

Christophe


> ---
>   arch/powerpc/include/asm/paca.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/include/asm/paca.h
> index 03330b7d835f..4d7aaab82702 100644
> --- a/arch/powerpc/include/asm/paca.h
> +++ b/arch/powerpc/include/asm/paca.h
> @@ -12,6 +12,7 @@
>   
>   #ifdef CONFIG_PPC64
>   
> +#include <linux/cache.h>
>   #include <linux/string.h>
>   #include <asm/types.h>
>   #include <asm/lppaca.h>

  reply	other threads:[~2022-05-27 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 11:20 [PATCH] powerpc/64: Include cache.h directly in paca.h Michael Ellerman
2022-05-27 12:16 ` Christophe Leroy [this message]
2022-05-28 12:18   ` Michael Ellerman
2022-05-28 12:53 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dbb8260a-ee02-9fd8-707a-92166ba217be@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox