diff mbox series

powerpc/64s: Make mmu_hash_ops __ro_after_init

Message ID 20240821080745.872151-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 8589cdf0cf0b0a03d2285fc46ada2f28113f8620
Headers show
Series powerpc/64s: Make mmu_hash_ops __ro_after_init | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_ppctests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_selftests success Successfully ran 8 jobs.
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 5 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 21 jobs.

Commit Message

Michael Ellerman Aug. 21, 2024, 8:07 a.m. UTC
The mmu_hash_ops are only assigned to during boot, so mark them
__ro_after_init to prevent any further modification.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/mm/book3s64/hash_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Ellerman Sept. 6, 2024, 11:52 a.m. UTC | #1
On Wed, 21 Aug 2024 18:07:45 +1000, Michael Ellerman wrote:
> The mmu_hash_ops are only assigned to during boot, so mark them
> __ro_after_init to prevent any further modification.
> 
> 

Applied to powerpc/next.

[1/1] powerpc/64s: Make mmu_hash_ops __ro_after_init
      https://git.kernel.org/powerpc/c/8589cdf0cf0b0a03d2285fc46ada2f28113f8620

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
index 01c3b4b65241..845fb7ef0ad3 100644
--- a/arch/powerpc/mm/book3s64/hash_utils.c
+++ b/arch/powerpc/mm/book3s64/hash_utils.c
@@ -125,7 +125,7 @@  int mmu_ci_restrictions;
 #endif
 static u8 *linear_map_hash_slots;
 static unsigned long linear_map_hash_count;
-struct mmu_hash_ops mmu_hash_ops;
+struct mmu_hash_ops mmu_hash_ops __ro_after_init;
 EXPORT_SYMBOL(mmu_hash_ops);
 
 /*