From: Matthew Wilcox <willy@infradead.org> To: linux-mm@kvack.org Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Russell King <linux@armlinux.org.uk>, Geert Uytterhoeven <geert@linux-m68k.org>, linux-m68k@lists.linux-m68k.org Subject: [PATCH 5/7] m68k: Thread mm_struct throughout page table allocation Date: Tue, 28 Apr 2020 12:44:47 -0700 [thread overview] Message-ID: <20200428194449.22615-6-willy@infradead.org> (raw) In-Reply-To: <20200428194449.22615-1-willy@infradead.org> From: "Matthew Wilcox (Oracle)" <willy@infradead.org> An upcoming patch will pass mm_struct to the page table constructor. Make sure m68k has the appropriate mm_struct at the point it needs to call the constructor. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- arch/m68k/include/asm/motorola_pgalloc.h | 10 +++++----- arch/m68k/mm/motorola.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index c66e42917912..dbac0c597397 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h @@ -15,12 +15,12 @@ enum m68k_table_types { }; extern void init_pointer_table(void *table, int type); -extern void *get_pointer_table(int type); +extern void *get_pointer_table(int type, struct mm_struct *mm); extern int free_pointer_table(void *table, int type); static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) { - return get_pointer_table(TABLE_PTE); + return get_pointer_table(TABLE_PTE, mm); } static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) @@ -30,7 +30,7 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) static inline pgtable_t pte_alloc_one(struct mm_struct *mm) { - return get_pointer_table(TABLE_PTE); + return get_pointer_table(TABLE_PTE, mm); } static inline void pte_free(struct mm_struct *mm, pgtable_t pgtable) @@ -47,7 +47,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable, static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - return get_pointer_table(TABLE_PMD); + return get_pointer_table(TABLE_PMD, mm); } static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) @@ -69,7 +69,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) static inline pgd_t *pgd_alloc(struct mm_struct *mm) { - return get_pointer_table(TABLE_PGD); + return get_pointer_table(TABLE_PGD, mm); } diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index fc16190ec2d6..7743480be0cf 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -113,7 +113,7 @@ void __init init_pointer_table(void *table, int type) return; } -void *get_pointer_table(int type) +void *get_pointer_table(int type, struct mm_struct *mm) { ptable_desc *dp = ptable_list[type].next; unsigned int mask = list_empty(&ptable_list[type]) ? 0 : PD_MARKBITS(dp); -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@infradead.org> To: linux-mm@kvack.org Cc: Catalin Marinas <catalin.marinas@arm.com>, linux-kernel@vger.kernel.org, "Matthew Wilcox \(Oracle\)" <willy@infradead.org>, Russell King <linux@armlinux.org.uk>, linux-m68k@lists.linux-m68k.org, Geert Uytterhoeven <geert@linux-m68k.org>, Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/7] m68k: Thread mm_struct throughout page table allocation Date: Tue, 28 Apr 2020 12:44:47 -0700 [thread overview] Message-ID: <20200428194449.22615-6-willy@infradead.org> (raw) In-Reply-To: <20200428194449.22615-1-willy@infradead.org> From: "Matthew Wilcox (Oracle)" <willy@infradead.org> An upcoming patch will pass mm_struct to the page table constructor. Make sure m68k has the appropriate mm_struct at the point it needs to call the constructor. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> --- arch/m68k/include/asm/motorola_pgalloc.h | 10 +++++----- arch/m68k/mm/motorola.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/m68k/include/asm/motorola_pgalloc.h b/arch/m68k/include/asm/motorola_pgalloc.h index c66e42917912..dbac0c597397 100644 --- a/arch/m68k/include/asm/motorola_pgalloc.h +++ b/arch/m68k/include/asm/motorola_pgalloc.h @@ -15,12 +15,12 @@ enum m68k_table_types { }; extern void init_pointer_table(void *table, int type); -extern void *get_pointer_table(int type); +extern void *get_pointer_table(int type, struct mm_struct *mm); extern int free_pointer_table(void *table, int type); static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) { - return get_pointer_table(TABLE_PTE); + return get_pointer_table(TABLE_PTE, mm); } static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) @@ -30,7 +30,7 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) static inline pgtable_t pte_alloc_one(struct mm_struct *mm) { - return get_pointer_table(TABLE_PTE); + return get_pointer_table(TABLE_PTE, mm); } static inline void pte_free(struct mm_struct *mm, pgtable_t pgtable) @@ -47,7 +47,7 @@ static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pgtable, static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) { - return get_pointer_table(TABLE_PMD); + return get_pointer_table(TABLE_PMD, mm); } static inline int pmd_free(struct mm_struct *mm, pmd_t *pmd) @@ -69,7 +69,7 @@ static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) static inline pgd_t *pgd_alloc(struct mm_struct *mm) { - return get_pointer_table(TABLE_PGD); + return get_pointer_table(TABLE_PGD, mm); } diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c index fc16190ec2d6..7743480be0cf 100644 --- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -113,7 +113,7 @@ void __init init_pointer_table(void *table, int type) return; } -void *get_pointer_table(int type) +void *get_pointer_table(int type, struct mm_struct *mm) { ptable_desc *dp = ptable_list[type].next; unsigned int mask = list_empty(&ptable_list[type]) ? 0 : PD_MARKBITS(dp); -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-04-28 19:44 UTC|newest] Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-28 19:44 [PATCH 0/7] Record the mm_struct in the page table pages Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-28 19:44 ` [PATCH 1/7] mm: Document x86 uses a linked list of pgds Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-28 21:41 ` Ira Weiny 2020-04-28 21:41 ` Ira Weiny 2020-04-28 22:52 ` Matthew Wilcox 2020-04-28 22:52 ` Matthew Wilcox 2020-04-29 18:29 ` Ira Weiny 2020-04-29 18:29 ` Ira Weiny 2020-04-28 19:44 ` [PATCH 2/7] mm: Move pt_mm within struct page Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-29 7:34 ` Geert Uytterhoeven 2020-04-29 7:34 ` Geert Uytterhoeven 2020-04-29 7:34 ` Geert Uytterhoeven 2020-04-29 12:53 ` Matthew Wilcox 2020-04-29 12:53 ` Matthew Wilcox 2020-04-28 19:44 ` [PATCH 3/7] arm: Thread mm_struct throughout page table allocation Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-28 19:44 ` [PATCH 4/7] arm64: " Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-29 9:58 ` Mark Rutland 2020-04-29 9:58 ` Mark Rutland 2020-04-28 19:44 ` Matthew Wilcox [this message] 2020-04-28 19:44 ` [PATCH 5/7] m68k: " Matthew Wilcox 2020-04-29 7:44 ` Geert Uytterhoeven 2020-04-29 7:44 ` Geert Uytterhoeven 2020-04-29 7:44 ` Geert Uytterhoeven 2020-04-28 19:44 ` [PATCH 6/7] mm: Set pt_mm in PTE constructor Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-29 7:46 ` Geert Uytterhoeven 2020-04-29 7:46 ` Geert Uytterhoeven 2020-04-29 7:46 ` Geert Uytterhoeven 2020-04-28 19:44 ` [PATCH 7/7] mm: Set pt_mm in PMD constructor Matthew Wilcox 2020-04-28 19:44 ` Matthew Wilcox 2020-04-29 0:52 ` Kirill A. Shutemov 2020-04-29 0:52 ` Kirill A. Shutemov 2020-04-29 0:26 ` [PATCH 0/7] Record the mm_struct in the page table pages Kirill A. Shutemov 2020-04-29 0:26 ` Kirill A. Shutemov 2020-04-29 1:51 ` Matthew Wilcox 2020-04-29 1:51 ` Matthew Wilcox 2020-05-24 7:42 ` Mike Rapoport 2020-05-24 7:42 ` Mike Rapoport
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200428194449.22615-6-willy@infradead.org \ --to=willy@infradead.org \ --cc=catalin.marinas@arm.com \ --cc=geert@linux-m68k.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-m68k@lists.linux-m68k.org \ --cc=linux-mm@kvack.org \ --cc=linux@armlinux.org.uk \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.