Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Dec 2001 14:32:16 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Thomas Moestl <tmoestl@gmx.net>
Cc:        arch@FreeBSD.org
Subject:   Re: Please review: changes to MI bus code for sparc64
Message-ID:  <3C192C70.9A79B3C5@mindspring.com>
References:  <20011213192033.A871@crow.dom2ip.de> <3C18F78D.C537D487@mindspring.com> <20011213201213.B871@crow.dom2ip.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Moestl wrote:
> > I don't understand the, isa_init() parameter change, as the post-patch
> > code does not appear to use "dev"?
> 
> The sparc64 one does.

OK; explains why it's not int he patches.

> > The PCI_BROKEN_INTPIN/PCI_INTLINE_0_BAD seem to be the same thing;

Still agree with Mike.

[ ... PCI routines becoming global ... ]

> I did this change to support the Sun APB bridge, which does not have
> base and limit registers, but uses a different mechanism to set the
> decoded ranges. So, to check resource allocations correctly, the apb
> driver needs to implement it's own alloc_resource method. The pcib
> functions which need not be 'overridden' can be directly used in the
> method table.

I still think that the proper way is to call a function to get the
addresses of the static functions.  Ideally, you would pass and/or
break out the alloc_resource method, which would make the Sun APB
brige "standard".

> > Also in subr_rman.c, in int_rman_activate_resource(), the change from
> > 32 to 31 is not obvious... should you also change "> 0" to ">= 0"?  It's
> > not clear to me what this change fixes.  I'm probably just missing
> > something...
> 
> 1 << 32 is out of u_int32_t range, so it just would make no sense. In
> addition, it will overflow i (which is an int) on most architectures.

I was more concerned with the 1 << 0 not being hit at all.  I agree
on the overflow fix; I was just curious why the entire range was not
shifted down 1, instead of just avoiding the overflow.

-- Terry

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C192C70.9A79B3C5>