]> git.baikalelectronics.ru Git - kernel.git/commitdiff
arm64: pgd: Mark pgd_cache as __ro_after_init
authorJinbum Park <jinb.park7@gmail.com>
Wed, 22 Nov 2017 12:43:59 +0000 (21:43 +0900)
committerWill Deacon <will.deacon@arm.com>
Fri, 1 Dec 2017 13:05:04 +0000 (13:05 +0000)
pgd_cache is setup once while init stage and never changed after
that, so it is good candidate for __ro_after_init

Signed-off-by: Jinbum Park <jinb.park7@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/mm/pgd.c

index 371c5f03a1708c172e731abb07637e369681fec1..051e71ec3335edc316817602a51d8676678c1a0f 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/page.h>
 #include <asm/tlbflush.h>
 
-static struct kmem_cache *pgd_cache;
+static struct kmem_cache *pgd_cache __ro_after_init;
 
 pgd_t *pgd_alloc(struct mm_struct *mm)
 {