fix ehci alignment error
PATCH 1/1 fix ehci alignment error
An embedded and charset-unspecified text was scrubbed...
Name: fix-ehci-alignment-error.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111010/016cc19d/attachment.ksh>
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"
What is "The Kirkwood"? What size processor is this?
Quoted 6 lines · Greg KH
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"What is "The Kirkwood"? What size processor is this?
It's an ARM926-like CPU from Marvell.
Signature · 2 lines
M?ns Rullg?rd mans at mansr.com
Quoted 10 lines · M?ns Rullg?rd
Quoted 6 lines · Greg KH
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"What is "The Kirkwood"? What size processor is this?
It's an ARM926-like CPU from Marvell.
32 or 64bit?
Quoted 8 lines · Greg KH
Quoted 7 lines · M?ns Rullg?rd
Quoted 5 lines · Greg KH
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
What is "The Kirkwood"? What size processor is this?
It's an ARM926-like CPU from Marvell.
32 or 64bit?
All ARMs are 32-bit, but some have instructions for loading or storing 2 x 32 bits at a time, but also require the corresponding memory address to be 64-bit aligned.
Quoted 11 lines · Mikael Pettersson
Quoted 10 lines · Greg KH
Quoted 9 lines · M?ns Rullg?rd
Quoted 6 lines · Greg KH
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"What is "The Kirkwood"? What size processor is this?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
It's an ARM926-like CPU from Marvell.
32 or 64bit?
All ARMs are 32-bit, but some have instructions for loading or storing 2 x 32 bits at a time, but also require the corresponding memory address to be 64-bit aligned.
Ah, ok, that makes more sense here. I'll go queue it up.
greg k-h
Quoted 12 lines · Greg KH
Quoted 11 lines · Mikael Pettersson
Quoted 10 lines · Greg KH
Quoted 9 lines · M?ns Rullg?rd
Quoted 6 lines · Greg KH
Quoted 3 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"What is "The Kirkwood"? What size processor is this?
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
It's an ARM926-like CPU from Marvell.
32 or 64bit?
All ARMs are 32-bit, but some have instructions for loading or storing 2 x 32 bits at a time, but also require the corresponding memory address to be 64-bit aligned.
To be perfectly accurate, all ARMs have the dual load/store instructions, but only some (ARMv5 and earlier) require a 64-bit aligned address for these. The Kirkwood is an ARMv5 so it does need this alignment.
Furthermore, the standard ARM ABI requires 8-byte alignment for 64-bit data types regardless of CPU version, which is perhaps a bit unusual for a 32-bit architecture.
Signature · 2 lines
M?ns Rullg?rd mans at mansr.com
Quoted 14 lines · Harro Haan
The Kirkwood gave an unaligned memory access error on line 742 of
drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable=ktime_get_real();"Signed-off-by Harro Haan <[email protected]>--- include/linux/usb/hcd.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/linux/usb/hcd.h +0
-0
include/linux/usb/hcd.h struct usb_hcd { · line 184
Quoted 8 lines
include/linux/usb/hcd.h +1
-1@@ -178,7 +178,7 @@ struct usb_hcd {* this structure. */ unsigned long hcd_priv[0] - __attribute__ ((aligned(sizeof(unsigned long)))); + __attribute__ ((aligned(sizeof(s64)))); };/* 2.4 does this a bit differently ... */