From: Michael Ellerman <mpe@ellerman.id.au>
To: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
linuxppc-dev <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: powerpc/book3s: Fix flush_tlb cpu_spec hook to take a generic argument.
Date: Fri, 3 Oct 2014 17:36:22 +1000 (EST) [thread overview]
Message-ID: <20141003073622.3F0B8140180@ozlabs.org> (raw)
In-Reply-To: <20140923035330.6097.43515.stgit@mars>
On Tue, 2014-23-09 at 03:53:54 UTC, Mahesh Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>
> The flush_tlb hook in cpu_spec was introduced as a generic function hook
> to invalidate TLBs. But the current implementation of flush_tlb hook
> takes IS (invalidation selector) as an argument which is architecture
> dependent. Hence, It is not right to have a generic routine where caller
> has to pass non-generic argument.
>
> This patch fixes this and makes flush_tlb hook as high level API.
>
> The old code used to call flush_tlb hook with IS=0 (single page) resulting
> partial invalidation of TLBs which is not right. This fix now makes
> sure that whole TLB is invalidated to be able to successfully recover from
> TLB and ERAT errors.
Hi Mahesh,
It seems that the only detail we are abstracting here is that power7 has 128
TLB sets and power8 has 512. Is that right?
It seems like a lot of code to deal with that one detail.
I guess the other thing it does is cur_cpu_spec->flush_tlb() is only
implemented on power7 and power8, ie. not power6. But it seems that the two
callers can only ever run on power7/power8 anway.
So couldn't we just do:
- add the number of tlb_sets to cpu_spec
- use that in flush_tlb()
cheers
next prev parent reply other threads:[~2014-10-03 7:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 3:53 [PATCH] powerpc/book3s: Fix flush_tlb cpu_spec hook to take a generic argument Mahesh J Salgaonkar
2014-10-03 7:36 ` Michael Ellerman [this message]
2014-10-03 8:04 ` Benjamin Herrenschmidt
2014-11-28 22:38 ` Michael Ellerman
2014-12-02 9:01 ` Mahesh Jagannath Salgaonkar
2014-12-04 9:35 ` Michael Ellerman
2014-12-05 4:33 ` Mahesh Jagannath Salgaonkar
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=20141003073622.3F0B8140180@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--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).