diff options
author | David S. Miller <davem@davemloft.net> | 2005-09-19 22:56:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-19 22:56:06 -0400 |
commit | ff171d8f66a7fe1a000e610e9de11224749f9a22 (patch) | |
tree | 5cd542d07cb547d80bbf71fbd0e26df25d0895ea /arch/sparc64/kernel/una_asm.S | |
parent | 875bd5ab01bc0b760fd4e97838931cd2e7456cbd (diff) |
[SPARC64]: Handle little-endian unaligned loads/stores correctly.
Because we use byte loads/stores to cons up the value
in and out of registers, we can't expect the ASI endianness
setting to take care of this for us. So do it by hand.
This case is triggered by drivers/block/aoe/aoecmd.c in the
ataid_complete() function where it goes:
/* word 100: number lba48 sectors */
ssize = le64_to_cpup((__le64 *) &id[100<<1]);
This &id[100<<1] address is 4 byte, rather than 8 byte aligned,
thus triggering the unaligned exception.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/una_asm.S')
-rw-r--r-- | arch/sparc64/kernel/una_asm.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/una_asm.S b/arch/sparc64/kernel/una_asm.S index cbb40585253c..da48400bcc95 100644 --- a/arch/sparc64/kernel/una_asm.S +++ b/arch/sparc64/kernel/una_asm.S | |||
@@ -17,7 +17,7 @@ kernel_unaligned_trap_fault: | |||
17 | __do_int_store: | 17 | __do_int_store: |
18 | rd %asi, %o4 | 18 | rd %asi, %o4 |
19 | wr %o3, 0, %asi | 19 | wr %o3, 0, %asi |
20 | ldx [%o2], %g3 | 20 | mov %o2, %g3 |
21 | cmp %o1, 2 | 21 | cmp %o1, 2 |
22 | be,pn %icc, 2f | 22 | be,pn %icc, 2f |
23 | cmp %o1, 4 | 23 | cmp %o1, 4 |