Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/isa



On Tue, Mar 23, 2010 at 11:39:54AM +0100, Matthias Drochner wrote:
> dyoung%pobox.com@localhost said:
> > Can the two tags that pcdisplay_is_console() compared ever come from
> > different spaces?
> 
> Yes, if there are independant ISA buses they are distinguished
> by their tags.

Good to know.  I did not know that this ever occurred.

I would not expect for comparing tags with == to work reliably, now,
based on my reading of bus_space(9).  I do not expect for it to work for
very much longer.

Let us add a bus_space_is_equal(bus_space_tag_t t1, bus_space_tag_t
t2) for implementation in MD code.  kern_stub.c can provide a default
implementation that will work for now:

        return memcpy(&t1, &t2, sizeof(t1)) == 0;

That will work even if bus_space_tag_t is a struct.

(BTW, it was only by making bus_space_tag_t a struct that I got the
compiler to stop on some cases of bus_space_tag_t misuse.)

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index