lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: move phys_mem_access_prot_allowed to header
On Tue, May 5, 2026, at 09:47, Rosen Penev wrote:
> On Mon, May 4, 2026 at 10:54 PM Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> On Tue, May 5, 2026, at 03:01, Rosen Penev wrote:
>> > phys_mem_access_prot_allowed is only implemented for X86. For others, it
>> > returns 1. Move it to header to avoid using __weak.
>> >
>> > Fixes compilation with make LLVM=1 ARCH=mips
>>
>> Can you describe what exactly goes wrong here on mips?
> Cannot find symbol for section 4: .text.phys_mem_access_prot_allowed.
> drivers/char/mem.o: failed
>
> It's full of similar errors in drivers/pci/ as well. clang on MIPS
> doesn't seem to like __weak.

This certainly feels like a toolchain bug. I would not mind having
the PCI code converted away from the __weak functions, but it should
not just fail with a linker error like this.

Does this happen with both ld.bfd and ld.lld? Which version of clang
and lld are you using?

Arnd

\
 
 \ /
  Last update: 2026-05-05 10:30    [W:0.090 / U:8.729 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog