Skip to contentSkip to conversation

New: build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

Bug 215567 [email protected] 1 participant 7 messages Feb 4, 2022 – Mar 12, 2022

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=215567

            Bug ID: 215567
           Summary: build failure when PPC_64S_HASH_MMU=n is selected in
                    kernel .config
           Product: Platform Specific/Hardware
           Version: 2.5
    Kernel Version: 5.17-rc2
          Hardware: PPC-64
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: PPC-64
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Created attachment 300391
--> https://bugzilla.kernel.org/attachment.cgi?id=300391&action=edit
kernel .config (kernel 5.17-rc2, Talos II)

[...]
CC arch/powerpc/kernel/stacktrace.o
CC arch/powerpc/kernel/setup_64.o
arch/powerpc/kernel/setup_64.c: In function 'setup_per_cpu_areas':
arch/powerpc/kernel/setup_64.c:811:21: error: 'mmu_linear_psize' undeclared (first use in this function); did you mean 'mmu_virtual_psize'?

  811 |                 if (mmu_linear_psize == MMU_PAGE_4K)
      |                     ^~~~~~~~~~~~~~~~
      |                     mmu_virtual_psize

arch/powerpc/kernel/setup_64.c:811:21: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:288: arch/powerpc/kernel/setup_64.o] Fehler 1

Got this with PPC_64S_HASH_MMU=n on my Talos II. When PPC_64S_HASH_MMU is enabled the kernel builds ok.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

https://bugzilla.kernel.org/show_bug.cgi?id=215567

Murilo Opsfelder Araújo ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Murilo Opsfelder Araújo ([email protected]) --- Hi, Erhard.

Thanks for reporting the issue.
I've sent a fix proposal for this:

https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-March/240698.html

Please let me know if the proposed fix worked for you.
You can reply here on Bugzilla or to the list with your 'Tested-by:' tag.

Thank you!
Murilo

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215567

--- Comment #2 from Erhard F. ([email protected]) ---
I just tested your patch top of 5.17-rc5. It applies and build continues but fails later with:

[...]

  CC      lib/asn1_decoder.o
  GEN     lib/oid_registry_data.c
  CC      lib/oid_registry.o
  CC      lib/ubsan.o
  CC      lib/sbitmap.o
  AR      lib/built-in.a
  CC [M]  lib/crc-ccitt.o
  CC [M]  lib/crc-itu-t.o
  GEN     .version
  CHK     include/generated/compile.h
  LD      vmlinux.o

MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
ld: arch/powerpc/kexec/file_load_64.o: in function `.arch_kexec_kernel_image_probe':
file_load_64.c:(.text+0x1be8): undefined reference to `.add_htab_mem_range'
make: *** [Makefile:1155: vmlinux] Error 1

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215567

Christophe Leroy ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #3 from Christophe Leroy ([email protected]) --- For this linking error, in arch/powerpc/include/asm/kexec_ranges.h change the #ifdef to CONFIG_PPC_64S_HASH_MMU instead of CONFIG_PPC_BOOK3S_64 and it should build.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215567

--- Comment #4 from Murilo Opsfelder Araújo ([email protected]) --- Erhard, would you mind trying the v2?

https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-March/240715.html

Christophe, thanks for the suggestion. That's exactly what I did in the v2.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215567

--- Comment #5 from Erhard F. ([email protected]) --- Your 2nd patch solved the issue. Thanks Murilo!

Build completes and the Talos boots fine into the patched 5.17-rc5.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=215567

Erhard F. ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #6 from Erhard F. ([email protected]) --- 5.17-rc7 builds fine again as the patch got included meanwhile.

Closing.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.