Re: [RFC] [PATCH] Fix b43 driver build for arm

From: Michael Buesch
Date: Mon Feb 18 2008 - 17:57:42 EST


On Monday 18 February 2008 23:50:30 Harvey Harrison wrote:
> On Mon, 2008-02-18 at 23:43 +0100, Michael Buesch wrote:
> > On Monday 18 February 2008 23:34:10 Russell King wrote:
> > >
> > > Well, don't expect this driver to work until you fix your broken
> > > assumptions about alignment requirements.
> >
> > Mr King, I'm not an idiot!
> >
> > Can you _please_ explain what makes ARM so special here?
> > Why can't we have an array of this structure on ARM?
> >
> > struct ssb_device_id {
> > __u16 vendor;
> > __u16 coreid;
> > __u8 revision;
> > };
> >
> > I will not apply any patches that I don't understand.
> > Why doesn't the compiler handle this? What's special? Can you please explain?
> >
>
> I believe this is a good place to start (although I could be totally
> off-base)
>
> http://lkml.org/lkml/2007/11/22/120

I know very well what unaligned access is. As I said the code
works on MIPS, which can't do unaligned accesses.

The _real_ question is, why doesn't align the compiler the stuff properly
on ARM? It does the right thing on x86_32/64, powerpc and MIPS. Why doesn't
it do the right thing on ARM and we have to manually align stuff?

See section "Code that doesn't cause unaligned access"

--
Greetings Michael.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/