From: Michael Ellerman <michael@ellerman.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: ppc-dev <linuxppc-dev@ozlabs.org>, paulus@samba.org
Subject: Re: [POWERPC] convert string i/o operations to C
Date: Wed, 20 Sep 2006 14:38:27 +1000 [thread overview]
Message-ID: <1158727107.3129.8.camel@localhost.localdomain> (raw)
In-Reply-To: <20060920133532.ce818ab7.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
On Wed, 2006-09-20 at 13:35 +1000, Stephen Rothwell wrote:
> This produces essentially the same code and will make the iSeries i/o
> consolidation easier.
A bit more white space would be nice :D, eg:
> +void _insb(volatile u8 __iomem *port, void *buf, long count)
> +{
> + u8 *tbuf = buf;
> + u8 tmp;
> +
> + if (unlikely(count <= 0))
> + return;
> + asm volatile("sync");
> + do {
> + tmp = *port;
> + asm volatile("eieio");
> + *tbuf++ = tmp;
> + } while (--count != 0);
> + asm volatile("twi 0,%0,0; isync" : : "r" (tmp));
> +}
> +EXPORT_SYMBOL(_insb);
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
prev parent reply other threads:[~2006-09-20 4:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-19 12:23 [POWERPC] convert string i/o operations to C Stephen Rothwell
2006-09-19 12:42 ` David Howells
2006-09-19 23:07 ` Stephen Rothwell
2006-09-19 18:29 ` Linas Vepstas
2006-09-19 18:52 ` Kim Phillips
2006-09-19 18:58 ` Matt Sealey
2006-09-19 19:10 ` Segher Boessenkool
2006-09-19 19:20 ` Matt Sealey
2006-09-19 19:47 ` Segher Boessenkool
2006-09-19 23:17 ` Benjamin Herrenschmidt
2006-09-19 23:14 ` Benjamin Herrenschmidt
2006-09-19 19:04 ` Linas Vepstas
2006-09-19 19:06 ` Segher Boessenkool
2006-09-19 23:12 ` Benjamin Herrenschmidt
2006-09-20 0:03 ` Segher Boessenkool
2006-09-20 0:08 ` Benjamin Herrenschmidt
2006-09-20 0:29 ` Segher Boessenkool
2006-09-20 3:35 ` Stephen Rothwell
2006-09-20 4:38 ` Michael Ellerman [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=1158727107.3129.8.camel@localhost.localdomain \
--to=michael@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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).