projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arm64: mm: move pgd_cache initialisation to pgtable_cache_init
[cascardo/linux.git]
/
arch
/
arm64
/
mm
/
pgd.c
diff --git
a/arch/arm64/mm/pgd.c
b/arch/arm64/mm/pgd.c
index
cb3ba1b
..
ae11d4e
100644
(file)
--- a/
arch/arm64/mm/pgd.c
+++ b/
arch/arm64/mm/pgd.c
@@
-46,14
+46,14
@@
void pgd_free(struct mm_struct *mm, pgd_t *pgd)
kmem_cache_free(pgd_cache, pgd);
}
kmem_cache_free(pgd_cache, pgd);
}
-
static int
__init pgd_cache_init(void)
+
void
__init pgd_cache_init(void)
{
{
+ if (PGD_SIZE == PAGE_SIZE)
+ return;
+
/*
* Naturally aligned pgds required by the architecture.
*/
/*
* Naturally aligned pgds required by the architecture.
*/
- if (PGD_SIZE != PAGE_SIZE)
- pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_SIZE,
- SLAB_PANIC, NULL);
- return 0;
+ pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_SIZE,
+ SLAB_PANIC, NULL);
}
}
-core_initcall(pgd_cache_init);