2020-10-12 02:19:45

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the arm64 tree with the asm-generic tree

Hi all,

Today's linux-next merge of the arm64 tree got a conflict in:

arch/arm64/include/asm/mmu_context.h

between commit:

f911c2a7c096 ("arm64: use asm-generic/mmu_context.h for no-op implementations")

from the asm-generic tree and commit:

48118151d8cc ("arm64: mm: Pin down ASIDs for sharing mm with devices")

from the arm64 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc arch/arm64/include/asm/mmu_context.h
index fe2862aa1dad,0672236e1aea..000000000000
--- a/arch/arm64/include/asm/mmu_context.h
+++ b/arch/arm64/include/asm/mmu_context.h
@@@ -174,9 -174,16 +174,15 @@@ static inline void cpu_replace_ttbr1(pg
* Setting a reserved TTBR0 or EPD0 would work, but it all gets ugly when you
* take CPU migration into account.
*/
-#define destroy_context(mm) do { } while(0)
void check_and_switch_context(struct mm_struct *mm);

- #define init_new_context(tsk,mm) ({ atomic64_set(&(mm)->context.id, 0); 0; })
+ static inline int
+ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+ {
+ atomic64_set(&mm->context.id, 0);
+ refcount_set(&mm->context.pinned, 0);
+ return 0;
+ }

#ifdef CONFIG_ARM64_SW_TTBR0_PAN
static inline void update_saved_ttbr0(struct task_struct *tsk,
@@@ -245,8 -251,12 +251,11 @@@ switch_mm(struct mm_struct *prev, struc
void verify_cpu_asid_bits(void);
void post_ttbr_update_workaround(void);

+ unsigned long arm64_mm_context_get(struct mm_struct *mm);
+ void arm64_mm_context_put(struct mm_struct *mm);
+
+#include <asm-generic/mmu_context.h>
+
#endif /* !__ASSEMBLY__ */

#endif /* !__ASM_MMU_CONTEXT_H */


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

2020-10-12 12:55:05

by Arnd Bergmann

[permalink] [raw]
Subject: Re: linux-next: manual merge of the arm64 tree with the asm-generic tree

On Mon, Oct 12, 2020 at 12:52 AM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> Today's linux-next merge of the arm64 tree got a conflict in:
>
> arch/arm64/include/asm/mmu_context.h
>
> between commit:
>
> f911c2a7c096 ("arm64: use asm-generic/mmu_context.h for no-op implementations")
>
> from the asm-generic tree and commit:
>
> 48118151d8cc ("arm64: mm: Pin down ASIDs for sharing mm with devices")
>
> from the arm64 tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>

Sorry about that, I had pushed my asm-generic branch to the correct
location on Friday after I noticed it was missing. Removed it again now
until the end up the merge window.

Arnd

2020-10-12 17:00:44

by Naresh Kamboju

[permalink] [raw]
Subject: Re: linux-next: manual merge of the arm64 tree with the asm-generic tree

On Mon, 12 Oct 2020 at 13:33, Arnd Bergmann <[email protected]> wrote:
>
> On Mon, Oct 12, 2020 at 12:52 AM Stephen Rothwell <[email protected]> wrote:
> >
> > Hi all,
> >
> > Today's linux-next merge of the arm64 tree got a conflict in:
> >
> > arch/arm64/include/asm/mmu_context.h
> >
> > between commit:
> >
> > f911c2a7c096 ("arm64: use asm-generic/mmu_context.h for no-op implementations")
> >
> > from the asm-generic tree and commit:
> >
> > 48118151d8cc ("arm64: mm: Pin down ASIDs for sharing mm with devices")
> >
> > from the arm64 tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
>
> Sorry about that, I had pushed my asm-generic branch to the correct
> location on Friday after I noticed it was missing. Removed it again now
> until the end up the merge window.


arm64 build failed on today's tag 20201012.


make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=gcc CC="sccache
aarch64-linux-gnu-gcc" O=build Image
#
In file included from ../arch/arm64/include/asm/mmu_context.h:257,
from ../arch/arm64/include/asm/efi.h:10,
from ../arch/arm64/xen/../../arm/xen/enlighten.c:19:
../include/asm-generic/mmu_context.h:34:19: error: redefinition of
‘init_new_context’
34 | static inline int init_new_context(struct task_struct *tsk,
| ^~~~~~~~~~~~~~~~
In file included from ../arch/arm64/include/asm/efi.h:10,
from ../arch/arm64/xen/../../arm/xen/enlighten.c:19:
../arch/arm64/include/asm/mmu_context.h:180:1: note: previous
definition of ‘init_new_context’ was here
180 | init_new_context(struct task_struct *tsk, struct mm_struct *mm)
| ^~~~~~~~~~~~~~~~
make[3]: *** [../scripts/Makefile.build:283:
arch/arm64/xen/../../arm/xen/enlighten.o] Error 1
In file included from ../arch/arm64/include/asm/mmu_context.h:257,
from ../include/linux/mmu_context.h:5,
from ../kernel/sched/sched.h:54,
from ../kernel/sched/core.c:13:
../include/asm-generic/mmu_context.h:34:19: error: redefinition of
‘init_new_context’
34 | static inline int init_new_context(struct task_struct *tsk,
| ^~~~~~~~~~~~~~~~
In file included from ../include/linux/mmu_context.h:5,
from ../kernel/sched/sched.h:54,
from ../kernel/sched/core.c:13:
../arch/arm64/include/asm/mmu_context.h:180:1: note: previous
definition of ‘init_new_context’ was here
180 | init_new_context(struct task_struct *tsk, struct mm_struct *mm)
| ^~~~~~~~~~~~~~~~

Reported-by: Naresh Kamboju <[email protected]>

ref:
https://gitlab.com/Linaro/lkft/mirrors/next/linux-next/-/jobs/785569731

>
> Arnd


- Naresh