From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org
Cc: Michael Neuling <michael.neuling@au1.ibm.com>
Subject: Re: [PATCH 1/2] powerpc/mm/radix: Properly clear process table entry
Date: Mon, 10 Jul 2017 10:45:13 +0530 [thread overview]
Message-ID: <87bmosrhy6.fsf@skywalker.in.ibm.com> (raw)
In-Reply-To: <1499517932.3397.22.camel@kernel.crashing.org>
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On radix, the process table entry we want to clear when
> destroying a context is entry 0, not entry 1
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/mm/mmu_context_book3s64.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/mmu_context_book3s64.c
> index 79d8c8a..9404b5e 100644
> --- a/arch/powerpc/mm/mmu_context_book3s64.c
> +++ b/arch/powerpc/mm/mmu_context_book3s64.c
> @@ -226,9 +226,15 @@ void destroy_context(struct mm_struct *mm)
> mm->context.cop_lockp = NULL;
> #endif /* CONFIG_PPC_ICSWX */
>
> - if (radix_enabled())
> - process_tb[mm->context.id].prtb1 = 0;
> - else
> + if (radix_enabled()) {
> + /*
> + * Radix doesn't have a valid bit in the process table
> + * entries. However we know that at least P9 implementation
> + * will avoid caching an entry with an invalid RTS field,
> + * and 0 is invalid. So this will do.
> + */
> + process_tb[mm->context.id].prtb0 = 0;
> + } else
> subpage_prot_free(mm);
> destroy_pagetable_page(mm);
> __destroy_context(mm->context.id);
next prev parent reply other threads:[~2017-07-10 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 12:45 [PATCH 1/2] powerpc/mm/radix: Properly clear process table entry Benjamin Herrenschmidt
2017-07-10 3:51 ` Michael Ellerman
2017-07-10 3:59 ` Benjamin Herrenschmidt
2017-07-10 10:36 ` Michael Ellerman
2017-07-10 4:26 ` Nicholas Piggin
2017-07-10 5:15 ` Aneesh Kumar K.V [this message]
2017-07-11 12:48 ` [1/2] " 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=87bmosrhy6.fsf@skywalker.in.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael.neuling@au1.ibm.com \
/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).