From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH 3/5] powerpc/mm: Drop the 64K on 4K version of pte_pagesize_index()
Date: Mon, 10 Aug 2015 11:04:29 +0530 [thread overview]
Message-ID: <87y4hjpuze.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1438928387-6454-3-git-send-email-mpe@ellerman.id.au>
Michael Ellerman <mpe@ellerman.id.au> writes:
> Now that support for 64k pages with a 4K kernel is removed, this code is
> unreachable.
>
> CONFIG_PPC_HAS_HASH_64K can only be true when CONFIG_PPC_64K_PAGES is
> also true.
>
> But when CONFIG_PPC_64K_PAGES is true we include pte-hash64.h which
> includes pte-hash64-64k.h, which defines both pte_pagesize_index() and
> crucially __real_pte, which means this defintion can never be used.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/asm/pgtable-ppc64.h | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index 7ee2300ee392..fa1dfb7f7b48 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -134,23 +134,11 @@
>
> #define pte_iterate_hashed_end() } while(0)
>
> -#ifdef CONFIG_PPC_HAS_HASH_64K
> /*
> * We expect this to be called only for user addresses or kernel virtual
> * addresses other than the linear mapping.
> */
> -#define pte_pagesize_index(mm, addr, pte) \
> - ({ \
> - unsigned int psize; \
> - if (is_kernel_addr(addr)) \
> - psize = MMU_PAGE_4K; \
> - else \
> - psize = get_slice_psize(mm, addr); \
> - psize; \
> - })
> -#else
> #define pte_pagesize_index(mm, addr, pte) MMU_PAGE_4K
> -#endif
>
> #endif /* __real_pte */
>
> --
> 2.1.4
next prev parent reply other threads:[~2015-08-10 5:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 6:19 [PATCH 1/5] powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash Michael Ellerman
2015-08-07 6:19 ` [PATCH 2/5] powerpc/cell: Drop support for 64K local store on 4K kernels Michael Ellerman
2015-08-10 8:14 ` Jeremy Kerr
2015-08-07 6:19 ` [PATCH 3/5] powerpc/mm: Drop the 64K on 4K version of pte_pagesize_index() Michael Ellerman
2015-08-10 5:34 ` Aneesh Kumar K.V [this message]
2015-08-07 6:19 ` [PATCH 4/5] powerpc/mm: Simplify page size kconfig dependencies Michael Ellerman
2015-08-10 5:36 ` Aneesh Kumar K.V
2015-08-07 6:19 ` [PATCH 5/5] powerpc/mm: Drop CONFIG_PPC_HAS_HASH_64K Michael Ellerman
2015-08-10 5:37 ` Aneesh Kumar K.V
2015-08-10 5:33 ` [PATCH 1/5] powerpc/mm: Fix pte_pagesize_index() crash on 4K w/64K hash Aneesh Kumar K.V
2015-08-19 23:14 ` [1/5] " Michael Ellerman
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=87y4hjpuze.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=jk@ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).