linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Only define _TASK_CPU for 32-bit
@ 2021-04-18 13:16 Michael Ellerman
  2021-04-21 13:08 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2021-04-18 13:16 UTC (permalink / raw)
  To: linuxppc-dev

We have some interesting code in our Makefile to define _TASK_CPU, based
on awk'ing the value out of asm-offsets.h. It exists to circumvent some
circular header dependencies that prevent us from referring to
task_struct in the relevant code. See the comment around _TASK_CPU in
smp.h for more detail.

Maybe one day we can come up with a better solution, but for now we can
at least limit that logic to 32-bit, because it's not needed for 64-bit.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 32dd693b4e42..3212d076ac6a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -438,12 +438,15 @@ endif
 endif
 
 ifdef CONFIG_SMP
+ifdef CONFIG_PPC32
 prepare: task_cpu_prepare
 
 PHONY += task_cpu_prepare
 task_cpu_prepare: prepare0
 	$(eval KBUILD_CFLAGS += -D_TASK_CPU=$(shell awk '{if ($$2 == "TASK_CPU") print $$3;}' include/generated/asm-offsets.h))
-endif
+
+endif # CONFIG_PPC32
+endif # CONFIG_SMP
 
 PHONY += checkbin
 # Check toolchain versions:
-- 
2.25.1


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

* Re: [PATCH] powerpc: Only define _TASK_CPU for 32-bit
  2021-04-18 13:16 [PATCH] powerpc: Only define _TASK_CPU for 32-bit Michael Ellerman
@ 2021-04-21 13:08 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2021-04-21 13:08 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On Sun, 18 Apr 2021 23:16:41 +1000, Michael Ellerman wrote:
> We have some interesting code in our Makefile to define _TASK_CPU, based
> on awk'ing the value out of asm-offsets.h. It exists to circumvent some
> circular header dependencies that prevent us from referring to
> task_struct in the relevant code. See the comment around _TASK_CPU in
> smp.h for more detail.
> 
> Maybe one day we can come up with a better solution, but for now we can
> at least limit that logic to 32-bit, because it's not needed for 64-bit.

Applied to powerpc/next.

[1/1] powerpc: Only define _TASK_CPU for 32-bit
      https://git.kernel.org/powerpc/c/3027a37c06be364e6443d3df3adf45576fba50cb

cheers

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

end of thread, other threads:[~2021-04-21 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 13:16 [PATCH] powerpc: Only define _TASK_CPU for 32-bit Michael Ellerman
2021-04-21 13:08 ` 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).