summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/misc_64.S
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2013-05-13 00:23:38 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-05-14 16:00:17 +1000
commitca9d7aea5952c5e90bfe28ed738a7e962c0adad2 (patch)
tree5e8cdcf9447c2263219eaa7f0b4f5ad7fd176ee7 /arch/powerpc/kernel/misc_64.S
parentb2b48584dfc69a5ebc70ee7976524d7122e5df5f (diff)
downloadlinux-ca9d7aea5952c5e90bfe28ed738a7e962c0adad2.tar.bz2
powerpc: Provide __bswapdi2
Some versions of GCC apparently expect this to be provided by libgcc. Updates from Mikey to fix 32 bit version and adding "r" to registers. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/misc_64.S')
-rw-r--r--arch/powerpc/kernel/misc_64.S11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 5cfa8008693b..6820e45f557b 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -234,6 +234,17 @@ _GLOBAL(__flush_dcache_icache)
isync
blr
+_GLOBAL(__bswapdi2)
+ srdi r8,r3,32
+ rlwinm r7,r3,8,0xffffffff
+ rlwimi r7,r3,24,0,7
+ rlwinm r9,r8,8,0xffffffff
+ rlwimi r7,r3,24,16,23
+ rlwimi r9,r8,24,0,7
+ rlwimi r9,r8,24,16,23
+ sldi r7,r7,32
+ or r3,r7,r9
+ blr
#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE)
/*