From: "Joakim Tjernlund" <joakim.tjernlund@lumentis.se>
To: "'Paul Mackerras'" <paulus@samba.org>
Cc: <linuxppc-embedded@lists.linuxppc.org>
Subject: SV: SV: New invalidate/clean/flush_dcache functions
Date: Thu, 26 Dec 2002 14:52:33 +0100 [thread overview]
Message-ID: <000001c2ace6$0b811660$4cb8143e@hempc> (raw)
In-Reply-To: <15882.33210.146613.132083@argo.ozlabs.ibm.com>
> Joakim Tjernlund writes:
>
> > In my inline functions will just use 5 or 6 instructions in total
for
> > all
> > cases where len is known at compile time, which should be close to
the
> > number of instructions needed for preparing the arguments and making
the
> > call to the old versions(I did not check this, but I guess I will
have
> > to)
>
> Were you thinking that the address must be cacheline-aligned? If it
> isn't, the number of cachelines that you have to do depends not only
> on the length parameter but also on the low-order bits of the
> address. For example, if cache lines are 16 bytes and len = 18, then
> if addr = 0xc0000001 then we want to do 2 cache lines, but if addr =
> 0xc000000f then we need to do 3 cache lines.
You are right, on the other hand maybe it should be cache line aligned?
I can fix my functions but then I need to muck with the pointer address
and that will probably not generate very good assembler. Perhaps
these functions could coexist with the current ones, use the xx_range if
the address/len is not cache line aligned and mine if you know they are
cache line aligned? Invalidate on non cache line aligned memory is
usally
a bug.
>
> > Only the invalidate function is missing the sync instruction.
> > It's not needed. Invalidating the cache does not touch the memory
> > so there is no need to sync the memory. I have been running my
system
> > without it for a long time and I asked my HW contact at Motorola
about
> > it and he agreed. Others has used the dcbi without a sync without
> > problems.
>
> I don't have the architecture manual to hand, it's at work. I can
> easily believe that sync after dcbi is not needed on any current 8xx
> implementation, or on any 4xx either.
Which arch's do need sync? I don't understand what the sync is good
for when invalidating the dcache. If it has something to with draining
the
pipe into cache, then the sync should be before the dcbi's or ...?
Jocke
>
> Paul.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-12-26 13:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 16:21 E1/T1 on mpc8260 Omanakuttan
2002-12-20 17:46 ` New invalidate/clean/flush_dcache functions Joakim Tjernlund
2002-12-21 14:25 ` Joakim Tjernlund
2002-12-22 7:00 ` Paul Mackerras
2002-12-23 13:19 ` SV: " Joakim Tjernlund
2002-12-26 4:12 ` Paul Mackerras
2002-12-26 13:52 ` Joakim Tjernlund [this message]
2004-04-26 16:41 ` High resolution timer in driver bhupinder sahran
2004-04-26 18:06 ` Wolfgang Denk
2004-04-27 15:52 ` bhupinder sahran
2002-12-27 0:58 ` SV: New invalidate/clean/flush_dcache functions Segher Boessenkool
2002-12-27 20:20 ` SV: " Joakim Tjernlund
2002-12-28 4:01 ` Segher Boessenkool
2002-12-23 20:26 ` Dan Malek
2002-12-24 10:36 ` SV: " Joakim Tjernlund
2002-12-24 17:53 ` Dan Malek
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='000001c2ace6$0b811660$4cb8143e@hempc' \
--to=joakim.tjernlund@lumentis.se \
--cc=linuxppc-embedded@lists.linuxppc.org \
--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).