From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] powerpc/mm: Fix tlbie to add AVAL fields for 64K pages
Date: Mon, 21 Apr 2014 15:25:37 +1000 [thread overview]
Message-ID: <1398057937.19682.39.camel@pasglop> (raw)
In-Reply-To: <1398056856-17891-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Mon, 2014-04-21 at 10:37 +0530, Aneesh Kumar K.V wrote:
> The if condition check was based on a draft ISA doc. Remove the same.
Is this a real bug ? Do we need to send that back to stable ?
Ben.
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/hash_native_64.c | 38 ++++++++++++++++----------------------
> 1 file changed, 16 insertions(+), 22 deletions(-)
>
> diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
> index 3ea26c25590b..cf1d325eae8b 100644
> --- a/arch/powerpc/mm/hash_native_64.c
> +++ b/arch/powerpc/mm/hash_native_64.c
> @@ -82,17 +82,14 @@ static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize)
> va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1);
> va |= penc << 12;
> va |= ssize << 8;
> - /* Add AVAL part */
> - if (psize != apsize) {
> - /*
> - * MPSS, 64K base page size and 16MB parge page size
> - * We don't need all the bits, but rest of the bits
> - * must be ignored by the processor.
> - * vpn cover upto 65 bits of va. (0...65) and we need
> - * 58..64 bits of va.
> - */
> - va |= (vpn & 0xfe);
> - }
> + /*
> + * AVAL bits:
> + * We don't need all the bits, but rest of the bits
> + * must be ignored by the processor.
> + * vpn cover upto 65 bits of va. (0...65) and we need
> + * 58..64 bits of va.
> + */
> + va |= (vpn & 0xfe); /* AVAL */
> va |= 1; /* L */
> asm volatile(ASM_FTR_IFCLR("tlbie %0,1", PPC_TLBIE(%1,%0), %2)
> : : "r" (va), "r"(0), "i" (CPU_FTR_ARCH_206)
> @@ -133,17 +130,14 @@ static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize)
> va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1);
> va |= penc << 12;
> va |= ssize << 8;
> - /* Add AVAL part */
> - if (psize != apsize) {
> - /*
> - * MPSS, 64K base page size and 16MB parge page size
> - * We don't need all the bits, but rest of the bits
> - * must be ignored by the processor.
> - * vpn cover upto 65 bits of va. (0...65) and we need
> - * 58..64 bits of va.
> - */
> - va |= (vpn & 0xfe);
> - }
> + /*
> + * AVAL bits:
> + * We don't need all the bits, but rest of the bits
> + * must be ignored by the processor.
> + * vpn cover upto 65 bits of va. (0...65) and we need
> + * 58..64 bits of va.
> + */
> + va |= (vpn & 0xfe);
> va |= 1; /* L */
> asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)"
> : : "r"(va) : "memory");
next prev parent reply other threads:[~2014-04-21 5:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 5:07 [PATCH] powerpc/mm: Fix tlbie to add AVAL fields for 64K pages Aneesh Kumar K.V
2014-04-21 5:25 ` Benjamin Herrenschmidt [this message]
2014-04-21 8:02 ` Aneesh Kumar K.V
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=1398057937.19682.39.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--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 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.