From: David Gibson <david@gibson.dropbear.id.au>
To: benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org,
agraf@suse.de
Cc: Sascha Hauer <kernel@pengutronix.de>,
aik@ozlabs.ru, linux-kernel@vger.kernel.org, mdroth@us.ibm.com,
Shawn Guo <shawn.guo@linaro.org>,
linuxppc-dev@lists.ozlabs.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 3/5] powerpc: Remove arch specific byteswappers from the MXC MMC driver
Date: Tue, 3 Feb 2015 16:36:23 +1100 [thread overview]
Message-ID: <1422941785-22557-4-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1422941785-22557-1-git-send-email-david@gibson.dropbear.id.au>
When the MXC MMUC driver is used on a Freescale MPC512x machine, it
contains some additional byteswapping code (I'm assuming this is a
workaround for a hardware defect). This uses the ppc specific st_le32()
function, but there's no reason not to use the generic swab32() function
instead. gcc is capable of generating the efficient ppc byte-reversing
load/store instructions without the arch-specific helper.
This patch, therefore, switches to the generic byteswap routine.
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
drivers/mmc/host/mxcmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 5316d9b..317d709 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -281,7 +281,7 @@ static inline void buffer_swap32(u32 *buf, int len)
int i;
for (i = 0; i < ((len + 3) / 4); i++) {
- st_le32(buf, *buf);
+ *buf = swab32(*buf);
buf++;
}
}
--
2.1.0
next prev parent 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 [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 ` David Gibson [this message]
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-4-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=kernel@pengutronix.de \
--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 \
--cc=shawn.guo@linaro.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).