public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "David S. Miller" <davem@redhat.com>, <andre@linux-ide.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: readsw/writesw readsl/writesl
Date: Tue, 27 Aug 2002 08:46:31 +0200	[thread overview]
Message-ID: <20020827064632.27053@192.168.4.1> (raw)
In-Reply-To: <20020827.003027.26962443.davem@redhat.com>

>The only reason insl() exists is because the x86 has special
>instructions to perform that operation.
>
>It used to be an optimization when cpus were really slow.
>
>No cpu to my knowledge has special instructions to readsl et al.  and
>on no cpu would be faster than a hand coded loop.
>
>In fact I would instead vote to delete {in,out}s{b,w,l}() and friends.
>:-)

The problem with that approach is that the "s" versions must also take
care of byte swapping (or rather _not_ byteswapping while the non-"s"
do the byteswapping).

So we would need to have raw_{in,out}{b,w,l}. Currently, it's not
possible to implement {in,out}s{b,w,l} in an efficient way because of
that.

Then we would also need to expose the io_barrier for CPUs like PPC

etc...

I tend to think that makes us expose too much CPU-specific things, which
is why I'd rather have the {read,write}s{b,w,l} versions provided by the
arch so those can be done "the right way" in the arch code, and drivers
not care about some of the gory details.

Ben.



  reply	other threads:[~2002-08-27 15:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 20:52 [BKPATCH] Read-Copy Update 2.5 Dipankar Sarma
2002-08-27  0:24 ` Rusty Russell
2002-08-27  6:11   ` Dipankar Sarma
2002-08-27  6:11     ` David S. Miller
2002-08-27  6:23       ` readsw/writesw readsl/writesl Andre Hedrick
2002-08-27  6:43         ` David S. Miller
2002-08-27  6:55           ` Andre Hedrick
2002-08-27  7:30         ` David S. Miller
2002-08-27  6:46           ` Benjamin Herrenschmidt [this message]
2002-08-27  6:49             ` Benjamin Herrenschmidt
2002-08-27 17:25           ` Alan Cox
2002-08-27 21:31             ` David S. Miller
2002-08-27 13:58       ` [BKPATCH] Read-Copy Update 2.5 Dipankar Sarma
  -- strict thread matches above, loose matches on Subject: below --
2002-08-27 16:00 readsw/writesw readsl/writesl Richard.Zidlicky
2002-08-27  9:29 ` Benjamin Herrenschmidt
2002-08-28 12:23   ` Richard Zidlicky
2002-08-28 16:17     ` Benjamin Herrenschmidt
2002-08-29  9:17       ` Richard Zidlicky

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=20020827064632.27053@192.168.4.1 \
    --to=benh@kernel.crashing.org \
    --cc=andre@linux-ide.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox