linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/3] powerpc/mm: Mark memory contexts requiring global TLBIs
@ 2017-06-22 10:06 Frederic Barrat
  2017-06-22 10:06 ` [RFC v2 1/3] powerpc/mm: Add marker for contexts requiring global TLB invalidations Frederic Barrat
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Frederic Barrat @ 2017-06-22 10:06 UTC (permalink / raw)
  To: mpe, aneesh.kumar, bsingharora, linuxppc-dev; +Cc: clombard

capi2 and opencapi require the TLB invalidations being sent for
addresses used on the cxl adapter or opencapi device to be global, as
there's a translation cache in the PSL (for capi2) or NPU (for
opencapi). The CAPP (for PSL) and NPU snoop the power bus.

This is not new: for the hash memory model, as soon as the cxl driver
is active, all local TLBIs become global. We need a similar mechanism
for the radix memory model. This patch tries to improve things a bit
by flagging the contexts requiring global TLBIs, therefore limiting
the "upgrade" and not affecting contexts not used by the card.

A longer-term goal is to modify the current implementation for hash to
follow the same direction, i.e. identify contexts needing global
TLBIs, but that will be for later. It would be required to support
hash for opencapi.

Changelog:
>From previous comments:
 - rename MM_CONTEXT_GLOBAL_TLBI -> MM_GLOBAL_TLBIE
 - add memory barriers to make sure the device doesn't miss any TLBI
 - also add barrier for the hash implemention to fix the same issue
 
Frederic Barrat (3):
  powerpc/mm: Add marker for contexts requiring global TLB invalidations
  cxl: Mark context requiring global TLBIs
  cxl: Add memory barrier to guarantee TLBI scope

 arch/powerpc/include/asm/book3s/64/mmu.h | 18 ++++++++++++++++++
 arch/powerpc/include/asm/tlb.h           | 23 +++++++++++++++++++++--
 arch/powerpc/mm/mmu_context_book3s64.c   |  1 +
 drivers/misc/cxl/api.c                   | 12 ++++++++++--
 drivers/misc/cxl/file.c                  | 12 ++++++++++--
 include/misc/cxl-base.h                  | 18 +++++++++++++++++-
 6 files changed, 77 insertions(+), 7 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-22 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 10:06 [RFC v2 0/3] powerpc/mm: Mark memory contexts requiring global TLBIs Frederic Barrat
2017-06-22 10:06 ` [RFC v2 1/3] powerpc/mm: Add marker for contexts requiring global TLB invalidations Frederic Barrat
2017-06-22 10:06 ` [RFC v2 2/3] cxl: Mark context requiring global TLBIs Frederic Barrat
2017-06-22 10:06 ` [RFC v2 3/3] cxl: Add memory barrier to guarantee TLBI scope Frederic Barrat

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).