2022-12-02 01:05:14

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the tip tree

Hi all,

After merging the tip tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/lib/code-patching.c: In function 'text_area_cpu_up_mm':
arch/powerpc/lib/code-patching.c:157:14: error: implicit declaration of function 'copy_init_mm' [-Werror=implicit-function-declaration]
157 | mm = copy_init_mm();
| ^~~~~~~~~~~~

Caused by commit

107b6828a7cd ("x86/mm: Use mm_alloc() in poking_init()")

interacting with commit

55a02e6ea958 ("powerpc/code-patching: Use temporary mm for Radix MMU")

from the powerpc tree.

I partially reverted commit 107b6828a7cd - I left the change to
arch/x86/mm/init.c applied. Though, I wonder if the powerpc tree should
use mm_alloc() instead of copy_init_mm() as well? The tip tree commit
says:

Instead of duplicating init_mm, allocate a fresh mm. The advantage is
that mm_alloc() has much simpler dependencies. Additionally it makes
more conceptual sense, init_mm has no (and must not have) user state
to duplicate.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-12-02 01:39:39

by Benjamin Gray

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Fri, 2022-12-02 at 11:26 +1100, Stephen Rothwell wrote:
> Though, I wonder if the powerpc tree should
> use mm_alloc() instead of copy_init_mm() as well?  The tip tree
> commit
> says:
>
>     Instead of duplicating init_mm, allocate a fresh mm. The
> advantage is
>     that mm_alloc() has much simpler dependencies. Additionally it
> makes
>     more conceptual sense, init_mm has no (and must not have) user
> state
>     to duplicate.
>

Yes, that seems fine. All we need is that the page table isn't shared
and the kernel mappings are the same as in init_mm. It seems mm_alloc()
does this at some point.

2022-12-02 10:12:11

by Michael Ellerman

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Stephen Rothwell <[email protected]> writes:
> Hi all,
>
> After merging the tip tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> arch/powerpc/lib/code-patching.c: In function 'text_area_cpu_up_mm':
> arch/powerpc/lib/code-patching.c:157:14: error: implicit declaration of function 'copy_init_mm' [-Werror=implicit-function-declaration]
> 157 | mm = copy_init_mm();
> | ^~~~~~~~~~~~
>
> Caused by commit
>
> 107b6828a7cd ("x86/mm: Use mm_alloc() in poking_init()")
>
> interacting with commit
>
> 55a02e6ea958 ("powerpc/code-patching: Use temporary mm for Radix MMU")
>
> from the powerpc tree.
>
> I partially reverted commit 107b6828a7cd - I left the change to
> arch/x86/mm/init.c applied. Though, I wonder if the powerpc tree should
> use mm_alloc() instead of copy_init_mm() as well? The tip tree commit
> says:
>
> Instead of duplicating init_mm, allocate a fresh mm. The advantage is
> that mm_alloc() has much simpler dependencies. Additionally it makes
> more conceptual sense, init_mm has no (and must not have) user state
> to duplicate.

I needed to rebase my next anyway, so I've squashed in a change to use
mm_alloc() in the powerpc commit. So this issue will be gone on Monday.

cheers