]> git.baikalelectronics.ru Git - kernel.git/commit
[SPARC64]: Handle little-endian unaligned loads/stores correctly.
authorDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2005 02:56:06 +0000 (19:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2005 02:56:06 +0000 (19:56 -0700)
commit7dba888a5e0cb3c235484a40cd74e8e6cf867f07
tree5cd542d07cb547d80bbf71fbd0e26df25d0895ea
parent73a82f6cad4de1a11efceb475ba8288cce4ae089
[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>
arch/sparc64/kernel/una_asm.S
arch/sparc64/kernel/unaligned.c