From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
aneesh.kumar@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v2 05/11] powerpc/mm: get rid of mm_ctx_slice_mask_xxx()
Date: Thu, 25 Apr 2019 14:29:31 +0000 (UTC) [thread overview]
Message-ID: <cc95821273df454eb146871bf6e5eeabef7c4ac9.1556202029.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <cover.1556202028.git.christophe.leroy@c-s.fr>
Now that slice_mask_for_size() is in mmu.h, the mm_ctx_slice_mask_xxx()
are not needed anymore, so drop them. Note that the 8xx ones where
not used anyway.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/include/asm/book3s/64/mmu.h | 32 ++++------------------------
arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 17 ---------------
2 files changed, 4 insertions(+), 45 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index ad00355f874f..e3d7f1404e20 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -179,45 +179,21 @@ static inline void mm_ctx_set_slb_addr_limit(mm_context_t *ctx, unsigned long li
ctx->hash_context->slb_addr_limit = limit;
}
-#ifdef CONFIG_PPC_64K_PAGES
-static inline struct slice_mask *mm_ctx_slice_mask_64k(mm_context_t *ctx)
-{
- return &ctx->hash_context->mask_64k;
-}
-#endif
-
-static inline struct slice_mask *mm_ctx_slice_mask_4k(mm_context_t *ctx)
-{
- return &ctx->hash_context->mask_4k;
-}
-
-#ifdef CONFIG_HUGETLB_PAGE
-static inline struct slice_mask *mm_ctx_slice_mask_16m(mm_context_t *ctx)
-{
- return &ctx->hash_context->mask_16m;
-}
-
-static inline struct slice_mask *mm_ctx_slice_mask_16g(mm_context_t *ctx)
-{
- return &ctx->hash_context->mask_16g;
-}
-#endif
-
static inline struct slice_mask *slice_mask_for_size(mm_context_t *ctx, int psize)
{
#ifdef CONFIG_PPC_64K_PAGES
if (psize == MMU_PAGE_64K)
- return mm_ctx_slice_mask_64k(&ctx);
+ return &ctx->hash_context->mask_64k;
#endif
#ifdef CONFIG_HUGETLB_PAGE
if (psize == MMU_PAGE_16M)
- return mm_ctx_slice_mask_16m(&ctx);
+ return &ctx->hash_context->mask_16m;
if (psize == MMU_PAGE_16G)
- return mm_ctx_slice_mask_16g(&ctx);
+ return &ctx->hash_context->mask_16g;
#endif
VM_BUG_ON(psize != MMU_PAGE_4K);
- return mm_ctx_slice_mask_4k(&ctx);
+ return &ctx->hash_context->mask_4k;
}
#ifdef CONFIG_PPC_SUBPAGE_PROT
diff --git a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
index a0f6844a1498..beded4df1f50 100644
--- a/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
+++ b/arch/powerpc/include/asm/nohash/32/mmu-8xx.h
@@ -255,23 +255,6 @@ static inline void mm_ctx_set_slb_addr_limit(mm_context_t *ctx, unsigned long li
ctx->slb_addr_limit = limit;
}
-static inline struct slice_mask *mm_ctx_slice_mask_base(mm_context_t *ctx)
-{
- return &ctx->mask_base_psize;
-}
-
-#ifdef CONFIG_HUGETLB_PAGE
-static inline struct slice_mask *mm_ctx_slice_mask_512k(mm_context_t *ctx)
-{
- return &ctx->mask_512k;
-}
-
-static inline struct slice_mask *mm_ctx_slice_mask_8m(mm_context_t *ctx)
-{
- return &ctx->mask_8m;
-}
-#endif
-
static inline struct slice_mask *slice_mask_for_size(mm_context_t *ctx, int psize)
{
#ifdef CONFIG_HUGETLB_PAGE
--
2.13.3
next prev parent reply other threads:[~2019-04-25 14:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 14:29 [PATCH v2 00/11] Reduce ifdef mess in slice.c Christophe Leroy
2019-04-25 14:29 ` [PATCH v2 01/11] powerpc/mm: fix erroneous duplicate slb_addr_limit init Christophe Leroy
2019-04-26 6:32 ` Aneesh Kumar K.V
2019-05-03 6:59 ` Michael Ellerman
2019-04-25 14:29 ` [PATCH v2 02/11] powerpc/mm: no slice for nohash/64 Christophe Leroy
2019-04-26 6:33 ` Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 03/11] powerpc/mm: hand a context_t over to slice_mask_for_size() instead of mm_struct Christophe Leroy
2019-04-26 6:34 ` Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 04/11] powerpc/mm: move slice_mask_for_size() into mmu.h Christophe Leroy
2019-04-26 6:36 ` Aneesh Kumar K.V
2019-04-25 14:29 ` Christophe Leroy [this message]
2019-04-26 6:37 ` [PATCH v2 05/11] powerpc/mm: get rid of mm_ctx_slice_mask_xxx() Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 06/11] powerpc/mm: remove unnecessary #ifdef CONFIG_PPC64 Christophe Leroy
2019-04-25 14:29 ` [PATCH v2 07/11] powerpc/mm: remove a couple of #ifdef CONFIG_PPC_64K_PAGES in mm/slice.c Christophe Leroy
2019-04-26 6:40 ` Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 08/11] powerpc/8xx: get rid of #ifdef CONFIG_HUGETLB_PAGE for slices Christophe Leroy
2019-04-25 14:29 ` [PATCH v2 09/11] powerpc/mm: define get_slice_psize() all the time Christophe Leroy
2019-04-26 6:42 ` Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 10/11] powerpc/mm: define subarch SLB_ADDR_LIMIT_DEFAULT Christophe Leroy
2019-04-26 6:43 ` Aneesh Kumar K.V
2019-04-25 14:29 ` [PATCH v2 11/11] powerpc/mm: drop slice DEBUG Christophe Leroy
2019-04-26 6:44 ` Aneesh Kumar K.V
2019-04-26 6:49 ` Christophe Leroy
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=cc95821273df454eb146871bf6e5eeabef7c4ac9.1556202029.git.christophe.leroy@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=aneesh.kumar@linux.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).