From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc/swsusp_32: Fix TLB invalidation
Date: Wed, 30 Dec 2009 20:40:17 +0300 [thread overview]
Message-ID: <20091230174017.GA32283@oksana.dev.rtsoft.ru> (raw)
It seems there is a thinko in the TLB invalidation code that makes the
tlbie in the loop executed just once. The intended check was probably
'gt', not 'lt'.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
Btw, 'lis r4,0x1000' seems needlessly too high. e300 core reference
manual says:
The [...]tlbie[...] instruction invalidates the TLB entry indexed by
the EA, and operates on both the instruction and data TLBs
simultaneously invalidating four TLB entries (both sets in each TLB).
The index corresponds to bits 15-19 of the EA. To invalidate all
entries within both TLBs, 32 tlbie instructions should be issued,
incrementing this field by one each time.
So, shouldn't 0x1000 be 0x0002? Are there any classic PowerPCs
for which this wouldn't work?
arch/powerpc/kernel/swsusp_32.S | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S
index b47d8ce..b0754e2 100644
--- a/arch/powerpc/kernel/swsusp_32.S
+++ b/arch/powerpc/kernel/swsusp_32.S
@@ -303,7 +303,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_USE_HIGH_BATS)
lis r4,0x1000
1: addic. r4,r4,-0x1000
tlbie r4
- blt 1b
+ bgt 1b
sync
/* restore the MSR and turn on the MMU */
--
1.6.5.7
reply other threads:[~2009-12-30 17:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20091230174017.GA32283@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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.