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

From: Andrew Morton
Date: Mon Oct 10 2005 - 13:27:48 EST


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.

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