kernel oops due to aligment error in cmdlinepart.c
dwmw2 at infradead.org
Fri Aug 1 09:24:11 EDT 2003
On Fri, 2003-08-01 at 01:02, George G. Davis wrote:
> I've been using the latest MTD CVS (+/- a few days) on an ARM
> Integrator/CM920T running linux-2.4.20'ish and have found that
> cmdlinepart.c has a struct alignment problem which causes a kernel
> oops. The attached patch fixes the alignment problem
No Likee. Linux requires that you fix up misaligned loads and stores.
Therefore, explicit working around alignment 'breakage' isn't permitted.
I've added it before and been told to remove it.
IF your hardware _cannot_ do this, and I know some ARM7 uCLinux systems
really can't, then you need to deal with it properly in 2.5 -- talk to
DaveM and Linus about it.
Alternatively, in this case you could probably just refactor the code to
allocate the idents separately or at least arrange its storage so that
the aligned bits are first, like I think the RedBoot code does.
More information about the linux-mtd