powerpc/64s: Make mmu_hash_ops __ro_after_init
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Aug 2024 08:07:45 +0000 (18:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 5 Sep 2024 12:29:31 +0000 (22:29 +1000)
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>
Link: https://msgid.link/20240821080745.872151-1-mpe@ellerman.id.au
arch/powerpc/mm/book3s64/hash_utils.c

index 6727a15ab94f953f182185202768f26c4489d6c6..e1eadd03f133909475137925a1f78d7cbc34a483 100644 (file)
@@ -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);
 
 /*