cvs commit: src/sys/amd64/isa atpic.c src/sys/contrib/dev/oltr
if_oltr.c src/sys/dev/aac aac_pci.c src/sys/dev/acpic
Bill Paul
wpaul at FreeBSD.ORG
Mon Mar 22 11:15:43 PST 2004
> > By doing this, you have fixed it to people can't use the NDISulator
> > code on 5.2-RELEASE or 5.2.1-RELEASE. I think it is hardly worth it
> > to break source code compatibility in this case just to avoid having
> > to type a few extra arguments. At the very least, bus_alloc_resource_any()
> > could have been implemented as a macro: then I could just test for its
> > existence and #define it myself so the code would run on older systems.
> > I'm very susprised that bde never raised this point.
>
> Bill, I can understand that you're upset.
I am less upset than I am horribly confused.
> The reason why we made this
> change now is that API compatibility needs to be fixed before 5.3R. I
> MFCd the function itself to 4-STABLE, but it won't go into 5.2 or 5.2.1
> due to the fact that only security changes are allowed there.
I think you're missing the point. There are people with 5.2.1 CD kits --
not just downloaded ISO images but actual physical CDs -- that don't have
this API. You can't go out and change the contents of these CDs. I
want to make it as painless as possible for people to just grab the
existing NDISulator code and drop it into a 5.2.1 system, because the
less trouble it is for them, the less trouble they make for me.
> Perhaps I should do a version bump? Then you can add have source
> compatibility with 5.2*. In any case, I would appreciate it if you'd go
> back to the convenience function before 5.3R branches so that 5.3R and
> 5-stable will have the new api.
Ok, just a minute. Do you want to:
a) _Supplement_ bus_alloc_resource() with bus_alloc_resource_any()
Or:
b) _Replace_ bus_alloc_resource() with bus_alloc_resource_any()
Please be clear. Calling bus_alloc_resource_any() a "convenience function"
implies that it's an addition to the API, which does not preclude me
from using the older API routines if I really, really want to.
> The reason for this change, BTW, is to unify a function for people who
> just want whatever resource is at a given RID. Some drivers were
> specifying different values even though they wanted the default.
This is the entire bus_alloc_resource_any() function:
static __inline struct resource *
bus_alloc_resource_any(device_t dev, int type, int *rid, u_int flags)
{
return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags));
}
Please to be explaining why this isn't a macro:
#define bus_alloc_resource_any(dev, type, rid, flags) \
bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags)
-Bill
--
=============================================================================
-Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu
wpaul at windriver.com | Wind River Systems
=============================================================================
<adamw> you're just BEGGING to face the moose
=============================================================================
More information about the cvs-src
mailing list