From: David Gibson <david@gibson.dropbear.id.au>
To: benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org,
agraf@suse.de
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, mdroth@us.ibm.com,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 0/5] powerpc: Get rid of redundant arch specific swab functions
Date: Tue, 3 Feb 2015 16:36:20 +1100 [thread overview]
Message-ID: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au> (raw)
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))
2) They've become poorly named. The ld_le*() and st_le*() functions
in fact *always* byteswap, even in a little-endian powerpc kernel
build, in which case they'll actually be performing BE accesses.
This series removes the existing users of these arch-specific
functions, replacing them with calls to the generic byteswappers. 5/5
then removes the function definitions.
I've compile tested this series with pmac32_defconfig,
mpc512x_defconfig and ppc64_defconfig, and also those configs tweaked
to explicitly enable the BT8XX and MXC MMC drivers where possible.
I've tested the KVM patch (4/5) with both BE and LE guests, however I
don't have hardware to do any real testing of the drivers affected in
1..3/5.
David Gibson (5):
powerpc: Move Power Macintosh drivers to generic byteswappers
powerpc: Remove powerpc specific byteswap from bt8xx DVB driver
powerpc: Remove arch specific byteswappers from the MXC MMC driver
powerpc: Cleanup KVM emulated load/store endian handling
powerpc: Remove unused st_le*() and ld_le* functions
arch/powerpc/include/asm/dbdma.h | 12 ++++----
arch/powerpc/include/asm/kvm_host.h | 2 +-
arch/powerpc/include/asm/swab.h | 26 -----------------
arch/powerpc/include/asm/vga.h | 4 +--
arch/powerpc/kvm/powerpc.c | 38 ++++++++++++------------
drivers/ata/pata_macio.c | 10 +++----
drivers/block/swim3.c | 12 ++++----
drivers/ide/pmac.c | 10 +++----
drivers/macintosh/rack-meter.c | 30 +++++++++----------
drivers/media/pci/bt8xx/bt878.h | 4 +--
drivers/mmc/host/mxcmmc.c | 2 +-
drivers/net/ethernet/apple/bmac.c | 30 +++++++++----------
drivers/net/ethernet/apple/mace.c | 44 ++++++++++++++--------------
drivers/scsi/mac53c94.c | 10 +++----
drivers/scsi/mesh.c | 14 ++++-----
drivers/video/fbdev/controlfb.c | 2 +-
drivers/video/fbdev/platinumfb.c | 2 +-
sound/ppc/pmac.c | 58 ++++++++++++++++++-------------------
18 files changed, 141 insertions(+), 169 deletions(-)
--
2.1.0
next reply other threads:[~2015-02-03 5:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 5:36 David Gibson [this message]
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'
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=1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mdroth@us.ibm.com \
--cc=mpe@ellerman.id.au \
--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).