linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: clean vdso32 and vdso64 directories
@ 2021-11-09 18:50 Masahiro Yamada
  2021-11-16 15:37 ` Christophe Leroy
  2021-11-17 11:23 ` Michael Ellerman
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-11-09 18:50 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev
  Cc: Aneesh Kumar K.V, Masahiro Yamada, linux-kernel, Nicholas Piggin,
	Ard Biesheuvel

Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of
vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the
arch/powerpc/kernel/{vdso32,vdso64} directories.

Use the subdir- trick to let "make clean" descend into them.

Fixes: bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/powerpc/kernel/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 0e3640e14eb1..5fa68c2ef1f8 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -196,3 +196,6 @@ clean-files := vmlinux.lds
 # Force dependency (incbin is bad)
 $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
 $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
+
+# for cleaning
+subdir- += vdso32 vdso64
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: clean vdso32 and vdso64 directories
  2021-11-09 18:50 [PATCH] powerpc: clean vdso32 and vdso64 directories Masahiro Yamada
@ 2021-11-16 15:37 ` Christophe Leroy
  2021-11-17 14:58   ` Masahiro Yamada
  2021-11-17 11:23 ` Michael Ellerman
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe Leroy @ 2021-11-16 15:37 UTC (permalink / raw)
  To: Masahiro Yamada, linux-kernel
  Cc: Aneesh Kumar K.V, Nicholas Piggin, Paul Mackerras, linuxppc-dev,
	Ard Biesheuvel

Hi Masahiro,

Le 09/11/2021 à 19:50, Masahiro Yamada a écrit :
> Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of
> vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the
> arch/powerpc/kernel/{vdso32,vdso64} directories.
> 
> Use the subdir- trick to let "make clean" descend into them.
> 
> Fixes: bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>   arch/powerpc/kernel/Makefile | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
> index 0e3640e14eb1..5fa68c2ef1f8 100644
> --- a/arch/powerpc/kernel/Makefile
> +++ b/arch/powerpc/kernel/Makefile
> @@ -196,3 +196,6 @@ clean-files := vmlinux.lds
>   # Force dependency (incbin is bad)
>   $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
>   $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
> +
> +# for cleaning
> +subdir- += vdso32 vdso64
> 

This patch make me think about one thing I would have liked to do, but I 
don't know Makefiles well enough to be able to do it. You could probably 
help me with it.

vdso32 and vdso64 contain a lot of redundant sources. I would like to 
merge them into a new single directory, let say 'vdso', and use the 
files in that directory to build both vdso32.so and vdso64.so. I have a 
feeling that x86 is doing it that way, but I've not been able to figure 
out how to build two objects using the same C/S files.

Thanks
Christophe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: clean vdso32 and vdso64 directories
  2021-11-09 18:50 [PATCH] powerpc: clean vdso32 and vdso64 directories Masahiro Yamada
  2021-11-16 15:37 ` Christophe Leroy
@ 2021-11-17 11:23 ` Michael Ellerman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-11-17 11:23 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev, Benjamin Herrenschmidt,
	Masahiro Yamada, Paul Mackerras
  Cc: Aneesh Kumar K.V, Nicholas Piggin, linux-kernel, Ard Biesheuvel

On Wed, 10 Nov 2021 03:50:15 +0900, Masahiro Yamada wrote:
> Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of
> vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the
> arch/powerpc/kernel/{vdso32,vdso64} directories.
> 
> Use the subdir- trick to let "make clean" descend into them.
> 
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc: clean vdso32 and vdso64 directories
      https://git.kernel.org/powerpc/c/964c33cd0be621b291b5d253d8731eb2680082cb

cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: clean vdso32 and vdso64 directories
  2021-11-16 15:37 ` Christophe Leroy
@ 2021-11-17 14:58   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-11-17 14:58 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Linux Kernel Mailing List, Nicholas Piggin, Paul Mackerras,
	Aneesh Kumar K.V, linuxppc-dev, Ard Biesheuvel

On Wed, Nov 17, 2021 at 12:38 AM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
> Hi Masahiro,
>
> Le 09/11/2021 à 19:50, Masahiro Yamada a écrit :
> > Since commit bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of
> > vgettimeofday.o"), "make ARCH=powerpc clean" does not clean up the
> > arch/powerpc/kernel/{vdso32,vdso64} directories.
> >
> > Use the subdir- trick to let "make clean" descend into them.
> >
> > Fixes: bce74491c300 ("powerpc/vdso: fix unnecessary rebuilds of vgettimeofday.o")
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >   arch/powerpc/kernel/Makefile | 3 +++
> >   1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
> > index 0e3640e14eb1..5fa68c2ef1f8 100644
> > --- a/arch/powerpc/kernel/Makefile
> > +++ b/arch/powerpc/kernel/Makefile
> > @@ -196,3 +196,6 @@ clean-files := vmlinux.lds
> >   # Force dependency (incbin is bad)
> >   $(obj)/vdso32_wrapper.o : $(obj)/vdso32/vdso32.so.dbg
> >   $(obj)/vdso64_wrapper.o : $(obj)/vdso64/vdso64.so.dbg
> > +
> > +# for cleaning
> > +subdir- += vdso32 vdso64
> >
>
> This patch make me think about one thing I would have liked to do, but I
> don't know Makefiles well enough to be able to do it. You could probably
> help me with it.
>
> vdso32 and vdso64 contain a lot of redundant sources. I would like to
> merge them into a new single directory, let say 'vdso', and use the
> files in that directory to build both vdso32.so and vdso64.so. I have a
> feeling that x86 is doing it that way, but I've not been able to figure
> out how to build two objects using the same C/S files.
>
> Thanks
> Christophe

Changing the code as follows might work.

$(obj-vdso32): %-32.o: %.S FORCE
          $(call if_changed_dep,vdso32as)




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-17 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09 18:50 [PATCH] powerpc: clean vdso32 and vdso64 directories Masahiro Yamada
2021-11-16 15:37 ` Christophe Leroy
2021-11-17 14:58   ` Masahiro Yamada
2021-11-17 11:23 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).