Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Apr 2001 00:05:18 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        "Michael Richards" <michael@fastmail.ca>
Cc:        freebsd-alpha@FreeBSD.ORG, mjacob@feral.com
Subject:   Re: Proposed Loader fix 
Message-ID:  <200104020705.f3275IC08101@mass.dis.org>
In-Reply-To: Your message of "Mon, 02 Apr 2001 01:18:48 EDT." <3AC80BB8.000059.59989@frodo.searchcanada.ca> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Hate to be polluting the list with babble about how my 
> underpowered :) brain is working on what I thought would be a simple 
> loader problem. 

It's not a simple problem, and I'm glad that you've been slogging through 
it.  It's effort like yours that gets these last-5% problems fixed, so 
don't put it down too much. 8)

> Here is the problem:
> Every time open (in libstand) gets called, it must get info on the 
> device through the devopen() call. The problem is, devopen() has no 
> concept of whether the device is open or not so it blindly tries to 
> open the device (even though it may already be open). This results in 
> a call to prom_open which is causing the problems with some versions 
> of SRM.

The devopen() call is necessary, because the media may have changed, etc.a

> My proposed solution is:
> Modify the devsw struct. Here is the original:
...
> This appears to carry info about the device. So I say that I should 
> be able to add a flag to it so it will not be opened multiple times.

Don't do this.  Try adding some caching to libalpha so that it doesn't 
open the prom device more than once.  Since we only need one handle (SRM 
doesn't support more than one device), once we've got one, we can always 
reuse it.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




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