From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: Tell me why 8 continuos ocbp ins's exist in sh4_flush_purge_region().
Date: Wed, 27 Jun 2012 12:34:49 +0000 [thread overview]
Message-ID: <20120627123448.GJ24033@linux-sh.org> (raw)
In-Reply-To: <20120627115255.4576ee43bd7b6c4ecf34de73@kanno.co.jp>
On Wed, Jun 27, 2012 at 11:52:55AM +0900, MASAO TAKAHASHI wrote:
> Hi everybody.
>
> Please tell me why 8 continuos "ocbp" instructions exist
> in sh4_flush_purge_region() as follows.
> --------------------------------------------------
> while (cnt >= 8) {
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> __ocbp(v); v += L1_CACHE_BYTES;
> cnt -= 8;
> }
> -----------------------------------------------------
>
> The previous version was like this.
> -------------------------------------------------------
> for (v = begin; v < end; v+=L1_CACHE_BYTES) {
> asm volatile("ocbp %0"
> : /* no output */
> : "m" (__m(v)));
> }
> --------------------------------------------------------
>
We unroll the loop for better performance. The same applies for the wback
and invalidate cases, too. If you're passing in a small size then the >8 case is surpassed and you go to line-at-a-time obcp as before.
prev parent reply other threads:[~2012-06-27 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-27 2:52 Tell me why 8 continuos ocbp ins's exist in sh4_flush_purge_region() MASAO TAKAHASHI
2012-06-27 12:34 ` Paul Mundt [this message]
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=20120627123448.GJ24033@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@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.