Thread (6 messages) 6 messages, 2 authors, 2021-04-22

Re: mmu.c:undefined reference to `patch__hash_page_A0'

From: Christophe Leroy <hidden>
Date: 2021-04-21 08:43:46
Also in: lkml, oe-kbuild-all
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds


Le 18/04/2021 à 19:15, Randy Dunlap a écrit :
On 4/18/21 3:43 AM, Christophe Leroy wrote:
quoted

Le 18/04/2021 à 02:02, Randy Dunlap a écrit :
quoted
HI--

I no longer see this build error.
Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16
quoted
However:

On 2/27/21 2:24 AM, kernel test robot wrote:
quoted
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: 259149cf7c3c6195e6199e045ca988c31d081cab powerpc/32s: Only build hash code when CONFIG_PPC_BOOK3S_604 is selected
date:   4 weeks ago
config: powerpc64-randconfig-r013-20210227 (attached as .config)
ktr/lkp, this is a PPC32 .config file that is attached, not PPC64.

Also:
quoted
compiler: powerpc-linux-gcc (GCC) 9.3.0
...
quoted
I do see this build error:

powerpc-linux-ld: arch/powerpc/boot/wrapper.a(decompress.o): in function `partial_decompress':
decompress.c:(.text+0x1f0): undefined reference to `__decompress'

when either
CONFIG_KERNEL_LZO=y
or
CONFIG_KERNEL_LZMA=y

but the build succeeds when either
CONFIG_KERNEL_GZIP=y
or
CONFIG_KERNEL_XZ=y

I guess that is due to arch/powerpc/boot/decompress.c doing this:

#ifdef CONFIG_KERNEL_GZIP
#    include "decompress_inflate.c"
#endif

#ifdef CONFIG_KERNEL_XZ
#    include "xz_config.h"
#    include "../../../lib/decompress_unxz.c"
#endif


It would be nice to require one of KERNEL_GZIP or KERNEL_XZ
to be set/enabled (maybe unless a uImage is being built?).

Can you test by https://patchwork.ozlabs.org/project/linuxppc-dev/patch/a74fce4dfc9fa32da6ce3470bbedcecf795de1ec.1591189069.git.christophe.leroy@csgroup.eu/ ?
Hi Christophe,

I get build errors for both LZO and LZMA:
Can you check with the following changes on top of my patch:
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index a8dbde4b32d4..f06f925385c0 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -23,13 +23,15 @@
  #include <linux/decompress/unlzo.h>
  #endif

-#include <linux/lzo.h>
  #ifdef __KERNEL__
  #include <linux/types.h>
+#endif
+#include <linux/lzo.h>
+#ifdef __KERNEL__
  #include <linux/decompress/mm.h>
+#include <linux/compiler.h>
  #endif

-#include <linux/compiler.h>
  #include <asm/unaligned.h>

  static const unsigned char lzop_magic[] = {


Thanks
Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help