Re: [PATCH v2 1/1] mm: pgtable: fix pte_swp_exclusive

2025-04-05 Thread John Paul Adrian Glaubitz
; return pte_get_bits(pte, _PAGE_SWP_EXCLUSIVE); > } > diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h > index 593f10aabd45..4c7ce40023d3 100644 > --- a/arch/x86/include/asm/pgtable.h > +++ b/arch/x86/include/asm/pgtable.h > @@ -1586,7 +1586,7 @@ static inline pte_t pte_swp_mkexclusive(pte_t pte) > return pte_set_flags(pte, _PAGE_SWP_EXCLUSIVE); > } > > -static inline int pte_swp_exclusive(pte_t pte) > +static inline bool pte_swp_exclusive(pte_t pte) > { > return pte_flags(pte) & _PAGE_SWP_EXCLUSIVE; > } > diff --git a/arch/xtensa/include/asm/pgtable.h > b/arch/xtensa/include/asm/pgtable.h > index 1647a7cc3fbf..6da0aa0604f1 100644 > --- a/arch/xtensa/include/asm/pgtable.h > +++ b/arch/xtensa/include/asm/pgtable.h > @@ -355,7 +355,7 @@ ptep_set_wrprotect(struct mm_struct *mm, unsigned long > addr, pte_t *ptep) > #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) > #define __swp_entry_to_pte(x)((pte_t) { (x).val }) > > -static inline int pte_swp_exclusive(pte_t pte) > +static inline bool pte_swp_exclusive(pte_t pte) > { > return pte_val(pte) & _PAGE_SWP_EXCLUSIVE; > } I'm not so sure about this implicit cast from unsigned long to bool though. Is this verified to work correctly on all architectures? I wonder why this bug was not caught earlier on alpha on the other hand. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

Re: Arches that don't support PREEMPT

2023-09-19 Thread John Paul Adrian Glaubitz
Hi Linus! On Tue, 2023-09-19 at 10:25 -0700, Linus Torvalds wrote: > On Tue, 19 Sept 2023 at 06:48, John Paul Adrian Glaubitz > wrote: > > > > As Geert poined out, I'm not seeing anything particular problematic with the > > architectures lacking CONFIG_PREEMPT at

Re: Arches that don't support PREEMPT

2023-09-19 Thread John Paul Adrian Glaubitz
call in return from interrupt code path. > > If you convert the arch to generic-entry (a much larger undertaking) > then you get this for free. If the conversion isn't hard, why is the first reflex the urge to remove an architecture instead of offering advise how to get the conve

Re: Arches that don't support PREEMPT

2023-09-19 Thread John Paul Adrian Glaubitz
intainers of architectures that have huge companies behind them use their manpower to urge less popular architectures for removal just because they don't have 150 people working on the port so they can keep up with design changes quickly. Adrian -- .''`. John Paul Adrian Glaubitz : :&

Re: Arches that don't support PREEMPT

2023-09-19 Thread John Paul Adrian Glaubitz
a64 wasn't an invitation to kill off other stuff that people are still working on! Can we please not do this? Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 __

Re: [patch 08/17] sh/cpu: Switch to arch_cpu_finalize_init()

2023-06-25 Thread John Paul Adrian Glaubitz
break; > + case CPU_FAMILY_SH4: > + *p++ = '4'; > + break; > + case CPU_FAMILY_SH4A: > + *p++ = '4'; > + *p++ = 'a'; > + break; > + case CPU_FAMILY_SH4AL_DSP: >

Re: [PATCH v3 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-08 Thread John Paul Adrian Glaubitz
\ > +#define __pte_free_tlb(tlb, pte, addr) \ > +do { \ > + pagetable_pte_dtor(page_ptdesc(pte)); \ > + tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \ > } while (0) > >

Re: [PATCH v3 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-01 Thread John Paul Adrian Glaubitz
On Thu, 2023-06-01 at 09:42 +0200, Geert Uytterhoeven wrote: > Hi Adrian, > > On Thu, Jun 1, 2023 at 9:28 AM John Paul Adrian Glaubitz > wrote: > > On Thu, 2023-06-01 at 09:20 +0200, Geert Uytterhoeven wrote: > > > On Wed, May 31, 2023 at 11:33 PM Vishal Moola (Oracle)

Re: [PATCH v3 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-01 Thread John Paul Adrian Glaubitz
> > > Signed-off-by: Vishal Moola (Oracle) > > LGTM, so > Reviewed-by: Geert Uytterhoeven I assume this series is supposed to go through some mm tree? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `-

Re: [PATCH v2 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-05-06 Thread John Paul Adrian Glaubitz
houldn't it just be tlb_remove_page_ptdesc((tlb), (pte))? Thanks, Adrian > [1] > https://lore.kernel.org/linux-mm/20230417205048.15870-5-vishal.mo...@gmail.com/ -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `-GPG: 62FF 8