Re: [2.6 patch] kill include/linux/platform.h

From: Patrick Mochel
Date: Tue Nov 08 2005 - 14:46:39 EST



On Thu, 3 Nov 2005, Adrian Bunk wrote:

> On Mon, Oct 10, 2005 at 11:23:41AM -0700, Andrew Morton wrote:
> > Adrian Bunk <bunk@xxxxxxxxx> wrote:
> > >
> > > On Mon, Oct 03, 2005 at 02:07:12PM -0700, Tony Luck wrote:
> > > > > The default_idle() prototype should stay inside some header file.
> > > >
> > > > That would be best, yes.
> > > >
> > > > > @Patrick:
> > > > > Any suggestion where it should move to?
> > > >
> > > > Of the include files already included directly by arch/ia64/kernel/setup.c,
> > > > <linux/sched.h> looks the most promising. There's lots of .*idle.* things
> > > > already in there.
> > > >
> > > > Looking at existing precedent: ppc64 has a definition of default_idle()
> > > > in <asm/machdep.h>
> > >
> > > The question whether linux/ or asm/ is the best place for the definition
> > > boils down to the question whether it is expected that default_idle() is
> > > present on all architectures or whether it's an architecture-specific
> > > implementation detail.
> >
> > Yes, default_idle() is arch-specific and so its prototype should be in an
> > arch-specific header.
> >
> > All the implementations happen to have the same signature, so it's tempting
> > to put the prototype into some generic header, but given that there's no
> > non-arch-specific caller, we shouldn't do that.
>
> ppc64 has the prototype in machdep.h.
>
> The only other architectures that seem to require a non-static
> default_idle() are cris, i386 and ia64.
>
> Any hint which header file would suit best?

It seems that include/asm-{$arch}/idle.h would suffice. Any objections to
that?



Pat


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