Subject: Re: L2 CACHE
To: Tim Kelly <hockey@dialectronics.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 12/21/2004 09:28:35
--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 21, 2004 at 09:47:58AM -0500, Tim Kelly wrote:
> Hi Bill,
>=20
> >This option turns into the following line in opt_ppcparam.h:
> >
> >#define  L2CR_CONFIG     (L2SIZ_1M|L2CLK_20|L2RAM_PIPELINE_BURST|L2CR_L2=
WT)
> >
> >Thus by the time the C compiler is involved, this will turn into an
> >integer. :-)
>=20
> Ok, thanks :-) How do I know when to use the " " and when not to? It seems
> to me that when I do things like
>=20
> options         LOCKDEBUG
> options         MCDEBUG
>=20
> in the conf file either the problem is nowhere near where I think it is, =
or
> these options aren't getting compiled in, because I'm not getting the
> debugging messages I expect to see.

I don't see any definition of MCDEBUG, so it won't work well as a kernel=20
option. You certainly can define it in a .h file, but I don't think it'll=
=20
work in a kernel config file.

LOCKDEBUG is one of the options that gets added to the CPPFLAGS variable=20
and brought in at compile time. As such, when you change it, you have to=20
recompile everything. Manually. make clean; make will do.

Most options, however, have been "defopt"ed. That means that the line in=20
sys/conf/files that describes this option has a file name in it. Whenever=
=20
that option is changed (defined, undefined, defined to a different value),=
=20
the relevant file is updated. The file names are all of the form=20
opt_XXX.h. The files that then need to know about this option include this=
=20
file, and thus the end .o files end up with a dependency. Thus when you=20
update the kernel config, all the relevant .o's get remade.

I think LOCKDEBUG hasn't been defopt'd because it applies to everything. =
=20
And it doesn't often change. Since you need to remake everything, it's
easier to just remember to make clean rather than add a dependency to
every .o; rather than add the computation overhead to every .o, just make
the admin know about the issue.

Take care,

Bill

--LZvS9be/3tNcYl/X
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFByF1CWz+3JHUci9cRAs9rAJ40kAZAYnKKlA3jTeGpm/PdQLQCbgCeInOJ
Iu7FwMMVrMmeZORmJzhEFTg=
=XzDq
-----END PGP SIGNATURE-----

--LZvS9be/3tNcYl/X--