From: Thiemo Seufer <ths@networkno.de>
To: linux-mips@linux-mips.org
Subject: Performance bug in c-r4k.c cache handling code
Date: Mon, 19 Sep 2005 17:40:56 +0200 [thread overview]
Message-ID: <20050919154056.GG3386@hattusa.textio> (raw)
Hello All,
I found an performance bug in c-r4k.c:r4k_dma_cache_inv, where a
Hit_Writeback_Inv instead of Hit_Invalidate is done. Ralf mentioned
this is probably due to broken Hit_Invalidate cache ops on some
CPUs, does anybody have more information about this? The appended
patch works apparently fine on R4400, R4600v2.0, R5000.
Thiemo
Index: arch/mips/mm/c-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/c-r4k.c,v
retrieving revision 1.119
diff -u -p -r1.119 c-r4k.c
--- arch/mips/mm/c-r4k.c 9 Sep 2005 20:26:54 -0000 1.119
+++ arch/mips/mm/c-r4k.c 19 Sep 2005 15:33:35 -0000
@@ -685,7 +685,7 @@ static void r4k_dma_cache_inv(unsigned l
a = addr & ~(sc_lsize - 1);
end = (addr + size - 1) & ~(sc_lsize - 1);
while (1) {
- flush_scache_line(a); /* Hit_Writeback_Inv_SD */
+ invalidate_scache_line(a); /* Hit_Invalidate_SD */
if (a == end)
break;
a += sc_lsize;
@@ -702,7 +702,7 @@ static void r4k_dma_cache_inv(unsigned l
a = addr & ~(dc_lsize - 1);
end = (addr + size - 1) & ~(dc_lsize - 1);
while (1) {
- flush_dcache_line(a); /* Hit_Writeback_Inv_D */
+ invalidate_dcache_line(a); /* Hit_Invalidate_D */
if (a == end)
break;
a += dc_lsize;
next reply other threads:[~2005-09-19 15:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-19 15:40 Thiemo Seufer [this message]
2005-09-19 16:54 ` Performance bug in c-r4k.c cache handling code Atsushi Nemoto
2005-09-19 18:31 ` Thiemo Seufer
2005-09-19 17:01 ` Maciej W. Rozycki
2005-09-20 9:09 ` Dominic Sweetman
2005-09-20 12:22 ` Ralf Baechle
2005-09-20 12:37 ` Maciej W. Rozycki
2005-09-20 13:18 ` Dominic Sweetman
2005-09-20 14:51 ` Maciej W. Rozycki
2005-09-19 17:31 ` peter fuerst
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=20050919154056.GG3386@hattusa.textio \
--to=ths@networkno.de \
--cc=linux-mips@linux-mips.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