* [PATCH 03/37] sparc64: use get/put_endian helpers
@ 2008-05-29 20:17 Harvey Harrison
0 siblings, 0 replies; only message in thread
From: Harvey Harrison @ 2008-05-29 20:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: David Miller, linux-arch
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
arch/sparc64/kernel/unaligned.c | 8 ++++----
arch/sparc64/lib/PeeCeeI.c | 14 +++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index afa7fc4..0066ff0 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -535,11 +535,11 @@ int handle_ldf_stq(u32 insn, struct pt_regs *regs)
u64 tmp;
switch (size) {
- case 1: data[0] = le32_to_cpup(data + 0); break;
- default:*(u64 *)(data + 0) = le64_to_cpup((u64 *)(data + 0));
+ case 1: data[0] = get_le32(data + 0); break;
+ default:*(u64 *)(data + 0) = get_le64((__le64 *)(data + 0));
break;
- case 4: tmp = le64_to_cpup((u64 *)(data + 0));
- *(u64 *)(data + 0) = le64_to_cpup((u64 *)(data + 2));
+ case 4: tmp = get_le64((__le64 *)(data + 0));
+ *(u64 *)(data + 0) = get_le64((__le64 *)(data + 2));
*(u64 *)(data + 2) = tmp;
break;
}
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c
index 8b313f1..acef744 100644
--- a/arch/sparc64/lib/PeeCeeI.c
+++ b/arch/sparc64/lib/PeeCeeI.c
@@ -21,27 +21,27 @@ void outsw(unsigned long __addr, const void *src, unsigned long count)
void __iomem *addr = (void __iomem *) __addr;
if (count) {
- u16 *ps = (u16 *)src;
- u32 *pi;
+ __le16 *ps = (__le16 *)src;
+ __le32 *pi;
if (((u64)src) & 0x2) {
- u16 val = le16_to_cpup(ps);
+ u16 val = get_le16(ps);
outw(val, addr);
ps++;
count--;
}
- pi = (u32 *)ps;
+ pi = (__le32 *)ps;
while (count >= 2) {
- u32 w = le32_to_cpup(pi);
+ u32 w = get_le32(pi);
pi++;
outw(w >> 0, addr);
outw(w >> 16, addr);
count -= 2;
}
- ps = (u16 *)pi;
+ ps = (__le16 *)pi;
if (count) {
- u16 val = le16_to_cpup(ps);
+ u16 val = get_le16(ps);
outw(val, addr);
}
}
--
1.5.6.rc0.277.g804cf
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-29 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 20:17 [PATCH 03/37] sparc64: use get/put_endian helpers Harvey Harrison
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox