Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Apr 2015 11:31:33 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Sergey Kandaurov <pluknet@gmail.com>
Cc:        arch@freebsd.org, amd64@freebsd.org
Subject:   Re: Move x86 idle code to the x86/ common place.
Message-ID:  <20150421083133.GI2390@kib.kiev.ua>
In-Reply-To: <CAE-mSO%2BgEFFRio4P3157NcSoNOpf9JifH98WqKgi9TmBu6hgvw@mail.gmail.com>
References:  <20150420162149.GE2390@kib.kiev.ua> <CAE-mSO%2BgEFFRio4P3157NcSoNOpf9JifH98WqKgi9TmBu6hgvw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 21, 2015 at 12:25:29AM +0300, Sergey Kandaurov wrote:
> On 20 April 2015 at 19:21, Konstantin Belousov <kostikbel@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150421083133.GI2390>