From: Paul M. <le...@li...> - 2007-08-07 10:08:40
|
On Tue, Aug 07, 2007 at 11:58:45AM +0200, EXTERNAL Brunner Markus (Praktikant; ST-FIR/Eng) wrote: > Paul Mundt wrote: > > Does something like this help? > > > > diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c > > index 23c5948..129b2cf 100644 > > --- a/arch/sh/kernel/machvec.c > > +++ b/arch/sh/kernel/machvec.c > > @@ -91,6 +91,13 @@ void __init sh_mv_setup(void) > > (unsigned long)&__machvec_start); > > > > /* > > + * Sanity check for machvec section alignment. Ensure > > + * __initmv hasn't been misused. > > + */ > > + if (machvec_size % sizeof(struct sh_machine_vector)) > > + panic("machvec misaligned, invalid __initmv > use?"); > > + > > + /* > > * If the machvec hasn't been preselected, use the first > > * vector (usually the only one) from .machvec.init. > > */ > > It would have found my fault and it will probably find the faults of > others. > I don't think this error is very extraordinary, because __initmv abuse > was once a goodness. ;-) > http://lkml.org/lkml/diff/2007/6/23/116/1 > Yes, I didn't ack the patch primarily because it completely missed the point. The __initmv cleanup largely happened here: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=82f81f4784479df17a80caff4a7156da0a2f7dea I'll apply the sanity check so people aren't more inclined to step on this. This is actually the first time this issue has come up, but it's also the first time we've enabled use of the machvec section unconditionally. Hopefully the sanity check will curb some confusion. |