* [PATCH] arm64/mm: don't initialize pgd_cache twice
@ 2019-06-18 7:32 Mike Rapoport
2019-06-18 9:25 ` Will Deacon
0 siblings, 1 reply; 2+ messages in thread
From: Mike Rapoport @ 2019-06-18 7:32 UTC (permalink / raw)
To: Will Deacon
Cc: Mark Rutland, Catalin Marinas, linux-kernel, Mike Rapoport,
linux-mm, Qian Cai, Andrew Morton, linux-arm-kernel
When PGD_SIZE != PAGE_SIZE, arm64 uses kmem_cache for allocation of PGD
memory. That cache was initialized twice: first through
pgtable_cache_init() alias and then as an override for weak
pgd_cache_init().
Remove the alias from pgtable_cache_init() and keep the only pgd_cache
initialization in pgd_cache_init().
Fixes: caa841360134 ("x86/mm: Initialize PGD cache during mm initialization")
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
arch/arm64/include/asm/pgtable.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 2c41b04..851c68d 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -812,8 +812,7 @@ extern int kern_addr_valid(unsigned long addr);
#include <asm-generic/pgtable.h>
-void pgd_cache_init(void);
-#define pgtable_cache_init pgd_cache_init
+static inline void pgtable_cache_init(void) { }
/*
* On AArch64, the cache coherency is handled via the set_pte_at() function.
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64/mm: don't initialize pgd_cache twice
2019-06-18 7:32 [PATCH] arm64/mm: don't initialize pgd_cache twice Mike Rapoport
@ 2019-06-18 9:25 ` Will Deacon
0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2019-06-18 9:25 UTC (permalink / raw)
To: Mike Rapoport
Cc: Mark Rutland, Catalin Marinas, linux-kernel, linux-mm, Qian Cai,
Andrew Morton, linux-arm-kernel
On Tue, Jun 18, 2019 at 10:32:29AM +0300, Mike Rapoport wrote:
> When PGD_SIZE != PAGE_SIZE, arm64 uses kmem_cache for allocation of PGD
> memory. That cache was initialized twice: first through
> pgtable_cache_init() alias and then as an override for weak
> pgd_cache_init().
>
> Remove the alias from pgtable_cache_init() and keep the only pgd_cache
> initialization in pgd_cache_init().
>
> Fixes: caa841360134 ("x86/mm: Initialize PGD cache during mm initialization")
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> arch/arm64/include/asm/pgtable.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks, Mike.
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-18 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 7:32 [PATCH] arm64/mm: don't initialize pgd_cache twice Mike Rapoport
2019-06-18 9:25 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).