arch/arm64/include/asm/pgtable.h | 2 +- arch/arm64/mm/mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
pgattr_change_is_safe() processes two distinct page table entries that just
happen to be 64 bits for all levels. This changes both arguments to reflect
the actual data type being processed in the function.
This change is important when moving to FEAT_D128 based 128 bit page tables
because it makes it simple to change the entry size in one place.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
This applies on v6.12-rc1
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64/mm/mmu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index c329ea061dc9..d56dbe5742d6 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -338,7 +338,7 @@ static inline pte_t __ptep_get(pte_t *ptep)
}
extern void __sync_icache_dcache(pte_t pteval);
-bool pgattr_change_is_safe(u64 old, u64 new);
+bool pgattr_change_is_safe(pteval_t old, pteval_t new);
/*
* PTE bits configuration in the presence of hardware Dirty Bit Management
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index e55b02fbddc8..c1b2d0dc3078 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -119,7 +119,7 @@ static phys_addr_t __init early_pgtable_alloc(int shift)
return phys;
}
-bool pgattr_change_is_safe(u64 old, u64 new)
+bool pgattr_change_is_safe(pteval_t old, pteval_t new)
{
/*
* The following mapping attributes may be updated in live
--
2.25.1
On Tue, 01 Oct 2024 10:28:04 +0530, Anshuman Khandual wrote: > pgattr_change_is_safe() processes two distinct page table entries that just > happen to be 64 bits for all levels. This changes both arguments to reflect > the actual data type being processed in the function. > > This change is important when moving to FEAT_D128 based 128 bit page tables > because it makes it simple to change the entry size in one place. > > [...] Applied to arm64 (for-next/misc), thanks! [1/1] arm64/mm: Change pgattr_change_is_safe() arguments as pteval_t https://git.kernel.org/arm64/c/8ef41786d88f -- Catalin
On 01/10/2024 05:58, Anshuman Khandual wrote: > pgattr_change_is_safe() processes two distinct page table entries that just > happen to be 64 bits for all levels. This changes both arguments to reflect > the actual data type being processed in the function. > > This change is important when moving to FEAT_D128 based 128 bit page tables > because it makes it simple to change the entry size in one place. > > Cc: Catalin Marinas <catalin.marinas@arm.com> > Cc: Will Deacon <will@kernel.org> > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: Ard Biesheuvel <ardb@kernel.org> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> LGTM! Reviewed-by: Ryan Roberts <ryan.roberts@arm.com> > --- > This applies on v6.12-rc1 > > arch/arm64/include/asm/pgtable.h | 2 +- > arch/arm64/mm/mmu.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h > index c329ea061dc9..d56dbe5742d6 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -338,7 +338,7 @@ static inline pte_t __ptep_get(pte_t *ptep) > } > > extern void __sync_icache_dcache(pte_t pteval); > -bool pgattr_change_is_safe(u64 old, u64 new); > +bool pgattr_change_is_safe(pteval_t old, pteval_t new); > > /* > * PTE bits configuration in the presence of hardware Dirty Bit Management > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index e55b02fbddc8..c1b2d0dc3078 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -119,7 +119,7 @@ static phys_addr_t __init early_pgtable_alloc(int shift) > return phys; > } > > -bool pgattr_change_is_safe(u64 old, u64 new) > +bool pgattr_change_is_safe(pteval_t old, pteval_t new) > { > /* > * The following mapping attributes may be updated in live
© 2016 - 2024 Red Hat, Inc.