All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Tkhai <tkhai@yandex.ru>
To: sparclinux@vger.kernel.org
Subject: [PATCH]SPARC v9: __tsb_context_switch - demap old tsb_map_vaddr
Date: Tue, 05 Oct 2010 19:57:56 +0000	[thread overview]
Message-ID: <1286308676.11216.4.camel@hp> (raw)

SPARC v9: __tsb_context_switch - demap old tsb_map_vaddr
---
When TSB context switches in the function switch_mm() the following
situation could occur. We have old mapping between physical address
and tsb_map_vaddr in uTLB, and new mapping is written in fDTLB.
Because uDTLB has more priority than fDTLB, all transformations
occur through it, and TSB Pointer in tl0_damiss will be formed with
the wrong physical address. To prevent this, we need to flush old
tsb_map_vaddr (TSB_BASE) in TLB. Kernel version 2.6.35.7.


Signed-off-by: Tkhai Kirill <tkhai@yandex.ru>
---

--- arch/sparc/kernel/tsb.S.orig 2010-10-05 19:46:55.272218523 +0400
+++ arch/sparc/kernel/tsb.S 2010-10-05 19:48:56.136235329 +0400
@@ -396,6 +396,9 @@ __tsb_context_switch:

 2:	ldx	[%o1 + TSB_CONFIG_MAP_VADDR], %o4
 	brz	%o4, 9f
+	or	%o4, 1 << 5, %o5
+	stxa	%g0, [%o5] ASI_DMMU_DEMAP
+	membar	#Sync
 	 ldx	[%o1 + TSB_CONFIG_MAP_PTE], %o5
 
 	sethi	%hi(sparc64_highest_unlocked_tlb_ent), %g2


             reply	other threads:[~2010-10-05 19:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05 19:57 Kirill Tkhai [this message]
2010-10-05 20:38 ` [PATCH]SPARC v9: __tsb_context_switch - demap old tsb_map_vaddr David Miller

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=1286308676.11216.4.camel@hp \
    --to=tkhai@yandex.ru \
    --cc=sparclinux@vger.kernel.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.