Date: Wed, 22 Aug 2001 12:54:37 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Bruce Evans <bde@zeta.org.au> Cc: Terry Lambert <tlambert2@mindspring.com>, Jake Burkholder <jake@k7.locore.ca>, John Baldwin <jhb@FreeBSD.ORG>, <freebsd-smp@FreeBSD.ORG>, <freebsd-alpha@FreeBSD.ORG> Subject: Re: Preliminary proposed rollup of kernel submap initialization code Message-ID: <200108221954.f7MJsbd77448@earth.backplane.com> References: <20010823051540.U15063-100000@besplex.bde.org>
index | next in thread | previous in thread | raw e-mail
:Make it global in an MI section and it automatically implements it in all
:platforms at once (platforms that haven't been "fixed" simply don't use it).
The danger of this is that down the line someone might assume in MI
code that the globals are initialized when, potentially, not all
platforms initialize them. This way the MI code has no access to the
global data that MD code is initializing and misuse in MI code sections
will result in a compile-time error. There's nothing wrong with
having MI structures that can be applied to multiple platforms but which
are only used by MD routines.
:> One could also argue that the mainline kernel code has no direct need to
:> know about the contents of kmi but that wasn't the main reason for doing
:> it that way.
:
:I prefer keeping the variables separate like they used to be. There is
:even less need for them to be combined in a struct than there used to be,
:since centralizing the their initializations ensures that they are the same
:for all arches.
:
:Bruce
All the fields are related. They belong in a structure rather then
as free globals or free statics. And it makes it easier for the MD
code to call the MI code. My opinion, anyway.
-Matt
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108221954.f7MJsbd77448>
