[PATCH] ia64: use generic put_unaligned()

Simon Horman horms at verge.net.au
Fri Sep 5 02:24:34 EDT 2008


Now that put_unaligned() has been revived from the dead it can be used.

Signed-off-by: Signed-off-by: Simon Horman <horms at verge.net.au>

Index: kexec-tools/kexec/arch/ia64/kexec-elf-rel-ia64.c
===================================================================
--- kexec-tools.orig/kexec/arch/ia64/kexec-elf-rel-ia64.c	2008-09-05 12:54:42.000000000 +1000
+++ kexec-tools/kexec/arch/ia64/kexec-elf-rel-ia64.c	2008-09-05 12:58:36.000000000 +1000
@@ -66,15 +66,6 @@ ia64_patch (uint64_t insn_addr, uint64_t
         b[1] = (b1 & ~m1) | (v1 & m1);
 }
 
-static void
-put_unaligned64(unsigned long val, unsigned char *location)
-{
-	unsigned char *src = (unsigned char *)&val;
-	int i;
-	for (i = 0; i < sizeof(long); i++)
-		*location++ = *src++;
-}
-
 static inline uint64_t
 bundle (const uint64_t insn)
 {
@@ -136,7 +127,7 @@ void machine_apply_elf_rel(struct mem_eh
 		break;
 	case R_IA64_PCREL64LSB: {
 		value = value - address;
-		put_unaligned64(value, location);
+		put_unaligned(value, (uint64_t *)location);
 	} break;
 	case R_IA64_GPREL22:
 	case R_IA64_LTOFF22X:



More information about the kexec mailing list