Re: [PATCH v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations
Excerpts from Geert Uytterhoeven's message of September 1, 2020 5:03 pm: > Hi Nick, > > On Tue, Sep 1, 2020 at 8:23 AM Nicholas Piggin wrote: >> Excerpts from Geert Uytterhoeven's message of August 27, 2020 7:33 pm: >> > On Wed, Aug 26, 2020 at 4:53 PM Nicholas Piggin wrote: >> >> Cc: Geert Uytterhoeven >> >> Cc: linux-m...@lists.linux-m68k.org >> >> Signed-off-by: Nicholas Piggin >> > >> > With the below fixed: >> > Acked-by: Geert Uytterhoeven >> > >> >> --- a/arch/m68k/include/asm/mmu_context.h >> >> +++ b/arch/m68k/include/asm/mmu_context.h >> >> @@ -79,19 +76,6 @@ static inline void switch_mm(struct mm_struct *prev, >> >> struct mm_struct *next, >> >> set_context(tsk->mm->context, next->pgd); >> >> } >> >> >> >> -/* >> >> - * After we have set current->mm to a new value, this activates >> >> - * the context for the new mm so we see the new mappings. >> >> - */ >> >> -static inline void activate_mm(struct mm_struct *active_mm, >> >> - struct mm_struct *mm) >> >> -{ >> >> - get_mmu_context(mm); >> >> - set_context(mm->context, mm->pgd); >> >> -} >> > >> > Assumed switch_mm() in [PATCH v2 01/23] is revived with the above body. >> >> I'm not sure what you mean here. We can remove this because it's a copy >> of switch_mm above, and that's what the new header defaults to if you >> don't provide an active_mm. > > IC. I thought it started relying on for this, > where you removed switch_mm(). > > Seems I missed the definition above. It's supposed to all build incrementally, I'll try to make sure it's right... > >> Patch 1 should not have changed that, it should only affect the nommu >> architectures (and actually didn't touch m68k because it was not using >> the asm-generic/mmu_context.h header). > > OK. Sorry for the noise. No problem thanks for looking at it. Thanks, Nick
Re: [PATCH v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations
Hi Nick, On Tue, Sep 1, 2020 at 8:23 AM Nicholas Piggin wrote: > Excerpts from Geert Uytterhoeven's message of August 27, 2020 7:33 pm: > > On Wed, Aug 26, 2020 at 4:53 PM Nicholas Piggin wrote: > >> Cc: Geert Uytterhoeven > >> Cc: linux-m...@lists.linux-m68k.org > >> Signed-off-by: Nicholas Piggin > > > > With the below fixed: > > Acked-by: Geert Uytterhoeven > > > >> --- a/arch/m68k/include/asm/mmu_context.h > >> +++ b/arch/m68k/include/asm/mmu_context.h > >> @@ -79,19 +76,6 @@ static inline void switch_mm(struct mm_struct *prev, > >> struct mm_struct *next, > >> set_context(tsk->mm->context, next->pgd); > >> } > >> > >> -/* > >> - * After we have set current->mm to a new value, this activates > >> - * the context for the new mm so we see the new mappings. > >> - */ > >> -static inline void activate_mm(struct mm_struct *active_mm, > >> - struct mm_struct *mm) > >> -{ > >> - get_mmu_context(mm); > >> - set_context(mm->context, mm->pgd); > >> -} > > > > Assumed switch_mm() in [PATCH v2 01/23] is revived with the above body. > > I'm not sure what you mean here. We can remove this because it's a copy > of switch_mm above, and that's what the new header defaults to if you > don't provide an active_mm. IC. I thought it started relying on for this, where you removed switch_mm(). Seems I missed the definition above. > Patch 1 should not have changed that, it should only affect the nommu > architectures (and actually didn't touch m68k because it was not using > the asm-generic/mmu_context.h header). OK. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations
Excerpts from Geert Uytterhoeven's message of August 27, 2020 7:33 pm: > On Wed, Aug 26, 2020 at 4:53 PM Nicholas Piggin wrote: >> Cc: Geert Uytterhoeven >> Cc: linux-m...@lists.linux-m68k.org >> Signed-off-by: Nicholas Piggin > > With the below fixed: > Acked-by: Geert Uytterhoeven > >> --- a/arch/m68k/include/asm/mmu_context.h >> +++ b/arch/m68k/include/asm/mmu_context.h >> @@ -79,19 +76,6 @@ static inline void switch_mm(struct mm_struct *prev, >> struct mm_struct *next, >> set_context(tsk->mm->context, next->pgd); >> } >> >> -/* >> - * After we have set current->mm to a new value, this activates >> - * the context for the new mm so we see the new mappings. >> - */ >> -static inline void activate_mm(struct mm_struct *active_mm, >> - struct mm_struct *mm) >> -{ >> - get_mmu_context(mm); >> - set_context(mm->context, mm->pgd); >> -} > > Assumed switch_mm() in [PATCH v2 01/23] is revived with the above body. I'm not sure what you mean here. We can remove this because it's a copy of switch_mm above, and that's what the new header defaults to if you don't provide an active_mm. Patch 1 should not have changed that, it should only affect the nommu architectures (and actually didn't touch m68k because it was not using the asm-generic/mmu_context.h header). Thanks, Nick
Re: [PATCH v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations
On Wed, Aug 26, 2020 at 4:53 PM Nicholas Piggin wrote: > Cc: Geert Uytterhoeven > Cc: linux-m...@lists.linux-m68k.org > Signed-off-by: Nicholas Piggin With the below fixed: Acked-by: Geert Uytterhoeven > --- a/arch/m68k/include/asm/mmu_context.h > +++ b/arch/m68k/include/asm/mmu_context.h > @@ -79,19 +76,6 @@ static inline void switch_mm(struct mm_struct *prev, > struct mm_struct *next, > set_context(tsk->mm->context, next->pgd); > } > > -/* > - * After we have set current->mm to a new value, this activates > - * the context for the new mm so we see the new mappings. > - */ > -static inline void activate_mm(struct mm_struct *active_mm, > - struct mm_struct *mm) > -{ > - get_mmu_context(mm); > - set_context(mm->context, mm->pgd); > -} Assumed switch_mm() in [PATCH v2 01/23] is revived with the above body. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds