Re: [BUILD_FAILURE] 2.6.24-git18 build fails section type conflictpsmouse-base

From: Ivan Kokshaysky
Date: Fri Feb 08 2008 - 17:25:55 EST


On Fri, Feb 08, 2008 at 03:30:22PM +0200, Adrian Bunk wrote:
> > > On Fri, Feb 08, 2008 at 04:02:59PM +0530, Kamalesh Babulal wrote:
> > >> The 2.6.24-git18 kernel build fails on the power machine with following message
> > >> drivers/input/mouse/psmouse-base.c:44: error: __param_proto causes a section type conflict

My fault - I somehow overlooked that ppc64 is the club member...

> The comment is wrong now, the #if's should refer to kconfig variables,
> and I don't know whether this patch is really the best solution.

I think it's the best, because it at least points at some of
the problems which arise when you blindly rely on some undocumented
behaviour of __attribute__(section()) on certain platform, and
assume it's the same for the rest of the world...

Alternatives are:
- drop the 'const' qualifier from that macro unconditionally, so that
__param section gets read/write on all arches. I'd be fine with it,
but then we'll probably have the same problem again and again...
- make the offending module_param functions global (psmouse and 3-4
other places). But how do you explain that to driver writers?
These functions are logically private to this particular module,
so it's obviously not the same as "we don't export static functions",
though underlying problem is precisely the same on our three
platforms...
- hack up gcc. But I don't even have a proposal, because it's not a bug
from gcc point of view. Ideally, I'd like to pass some extra parameters
to __attribute__(section()), like r/w control and some equivalent of
-fno-jump-tables...

Oh, well. Updated patch in a minute.

Ivan.
--
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/