linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: 'David Gibson' <david@gibson.dropbear.id.au>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "aik@ozlabs.ru" <aik@ozlabs.ru>, "agraf@suse.de" <agraf@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"paulus@samba.org" <paulus@samba.org>,
	"mdroth@us.ibm.com" <mdroth@us.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions
Date: Thu, 5 Feb 2015 00:41:34 +1100	[thread overview]
Message-ID: <20150204134134.GB25675@voom.fritz.box> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1CADA5A5@AcuExch.aculab.com>

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

On Wed, Feb 04, 2015 at 11:54:39AM +0000, David Laight wrote:
> From: David Gibson
> > arch/powerpc/include/asm/swab.h includes some powerpc specific
> > byteswapping functions, which are implemented in terms of powerpc's
> > built in byte reversed load/store instructions.  There are two problems with this:
> > 
> > 1) They're not necessary - gcc is perfectly capable of generating the
> >    byte-reversed load and store instructions when using the normal,
> >    generic byteswapping functions (tested with gcc (GCC) 4.8.3
> >    20140911 (Red Hat 4.8.3-9))
> 
> Should you be worrying about older versions of gcc?
> IIRC the internal byteswap 'stuff' is relatively recent (like
> the last couple of years) so people building current kernels
> on older distributions might have issues.

Well.. even then, surely the worst that will happen is that there will
be a few extra instructions to do the byteswap in registers.  Given
that these are mostly used for IO, I find it hard to imagine that
would make a measurable performance difference.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-02-04 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  5:36 [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions David Gibson
2015-02-03  5:36 ` [PATCH 1/5] powerpc: Move Power Macintosh drivers to generic byteswappers David Gibson
2015-02-03  5:36 ` [PATCH 2/5] powerpc: Remove powerpc specific byteswap from bt8xx DVB driver David Gibson
2015-03-24  2:32   ` Benjamin Herrenschmidt
2015-02-03  5:36 ` [PATCH 3/5] powerpc: Remove arch specific byteswappers from the MXC MMC driver David Gibson
2015-02-03  5:36 ` [PATCH 4/5] powerpc: Cleanup KVM emulated load/store endian handling David Gibson
2015-02-04 14:30   ` Alexander Graf
2015-02-03  5:36 ` [PATCH 5/5] powerpc: Remove unused st_le*() and ld_le* functions David Gibson
2015-02-04 11:54 ` [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions David Laight
2015-02-04 13:41   ` 'David Gibson' [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=20150204134134.GB25675@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=David.Laight@ACULAB.COM \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mdroth@us.ibm.com \
    --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).