All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Sparc memcpy question
@ 2011-07-28 13:08 Julian Calaby
  2011-07-28 13:23 ` David Miller
  2011-07-31  8:23 ` Roland Vossen
  0 siblings, 2 replies; 3+ messages in thread
From: Julian Calaby @ 2011-07-28 13:08 UTC (permalink / raw)
  To: sparclinux

Hi Roland,

First things first, you're asking the wrong person. =)

This sounds like a sparc specific question, so it should really be
addressed to the sparclinux mailing list as that's where the sparc
people hang out. I've CC'd that list in this mail.

On Thu, Jul 28, 2011 at 20:40, Roland Vossen <rvossen@broadcom.com> wrote:
> Hello Julian,
>
> I am testing our brcm80211 driver on a sparc64 machine. When executing a
> memcpy, I encountered an exception:
>
> memcpy(fffff8001cf3f46c, fffff8001cf3f57e, 4); results in:
>
> Kernel unaligned access at TPC[10489624] brcms_c_ioctl+0x64/0x740 [brcmsmac]
>
> I was under the impression that there are no alignment requirements for the
> pointers to memcpy, but perhaps I am wrong.

There are, they just happen to be small enough that you haven't noticed.

As far as I know, every architecture has some alignment requirements.
Sparc's are the most onerous. I don't know the full details, but I
believe that it needs to be aligned to the size of any reads. (so
reading an int - 4 bytes => 4 byte alignment on the addresses)

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-31  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28 13:08 Sparc memcpy question Julian Calaby
2011-07-28 13:23 ` David Miller
2011-07-31  8:23 ` Roland Vossen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.