public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Greg KH <gregkh@suse.de>
Cc: "Mikael Pettersson" <mikpe@it.uu.se>,
	"Måns Rullgård" <mans@mansr.com>,
	"Nicolas Pitre" <nico@fluxnic.net>,
	linux-usb@vger.kernel.org, "Harro Haan" <hrhaan@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Lennert Buytenhek" <kernel@wantstofly.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] fix ehci alignment error
Date: Mon, 10 Oct 2011 19:41:55 +0100	[thread overview]
Message-ID: <yw1x4nzgzo24.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <20111010173845.GB25114@suse.de> (Greg KH's message of "Mon, 10 Oct 2011 10:38:45 -0700")

Greg KH <gregkh@suse.de> writes:

> On Mon, Oct 10, 2011 at 07:31:26PM +0200, Mikael Pettersson wrote:
>> Greg KH writes:
>>  > On Mon, Oct 10, 2011 at 05:29:13PM +0100, Måns Rullgård wrote:
>>  > > Greg KH <gregkh@suse.de> writes:
>>  > > 
>>  > > > On Mon, Oct 10, 2011 at 02:38:27PM +0200, Harro Haan wrote:
>>  > > >> 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?
>> 
>> 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.

-- 
Måns Rullgård
mans@mansr.com

  reply	other threads:[~2011-10-10 18:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 12:38 [PATCH] fix ehci alignment error Harro Haan
2011-10-10 14:14 ` Greg KH
2011-10-10 16:29   ` Måns Rullgård
2011-10-10 17:00     ` Greg KH
2011-10-10 17:31       ` Mikael Pettersson
2011-10-10 17:38         ` Greg KH
2011-10-10 18:41           ` Måns Rullgård [this message]
2011-10-10 15:28 ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1x4nzgzo24.fsf@unicorn.mansr.com \
    --to=mans@mansr.com \
    --cc=gregkh@suse.de \
    --cc=hrhaan@gmail.com \
    --cc=kernel@wantstofly.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=nico@fluxnic.net \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox