lkml.org 
[lkml]   [2011]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: ARM unaligned MMIO access with attribute((packed))
On Wed, Apr 27, 2011 at 00:21, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Tue, 26 Apr 2011, Rabin Vincent wrote:
>> In my case it's this writel() in ehci-hub.c that gets chopped into
>> strbs:
>>
>>       /* force reset to complete */
>>       ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET),
>>                               status_reg);
>
> Why would that get messed up?  The status_reg variable doesn't have any
> __atribute__((packed)) associated with it.

The initialization of status_reg is:

u32 __iomem *status_reg
= &ehci->regs->port_status[(wIndex & 0xff) - 1];

where ehci->regs is a pointer to the packed struct ehci_regs. So, this
is the same problem of casting pointers to stricter alignment.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-27 16:09    [W:0.064 / U:8.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site