Move x86 idle code to the x86/ common place.
Konstantin Belousov
kostikbel at gmail.com
Tue Apr 21 08:31:43 UTC 2015
On Tue, Apr 21, 2015 at 12:25:29AM +0300, Sergey Kandaurov wrote:
> On 20 April 2015 at 19:21, Konstantin Belousov <kostikbel at gmail.com> wrote:
> [..]
> > +struct {
> > + void *id_fn;
> > + char *id_name;
> > +} idle_tbl[] = {
> > + { cpu_idle_spin, "spin" },
> > + { cpu_idle_mwait, "mwait" },
> > + { cpu_idle_hlt, "hlt" },
> > +#if !defined(__i386__) || !defined(PC98)
> > + { cpu_idle_acpi, "acpi" },
> > +#endif
> > + { NULL, NULL }
> > +};
> > +
>
> I believe this conditional could be left unchanged as #ifndef PC98
> (also in several other places), given that pc98 may not be present
> other than under i386. Otherwise, looks good.
Sure, you are correct. I know that PC98 is i386 only, and I considered
both approaches when I did the merge. My decision to add explicit __i386__
check was to make it clearer for reader who might be interested in the
__amd64__ flow.
That said, I do not mind doing the pass to revert the
#if !defined(__i386__) || !defined(PC98)
to
#ifndef PC98
if people consider this preferable.
More information about the freebsd-amd64
mailing list