Re: Request for testing bus_get_bus_tag() nexus method

From: John Baldwin <jhb_at_freebsd.org>
Date: Fri, 05 Feb 2016 12:49:17 -0800
On Friday, February 05, 2016 05:11:19 PM Marcin Mazurek wrote:
> Hello,
> 
> I am looking for testers for a patch to add BUS_GET_BUS_TAG method to some
> platforms nexus that return per platform specific default tag.
> 
> It works fine on arm, but I do not have any powerpc or mips hardware to
> test it on,
> so I would like it if this could be tested on these platforms using this
> code to check
> if it does not break them.
> 
> Any comments and feedback are welcome.

I'm guess you mean this for memory access?  Have you thought about accepting
the resource type so you can do:

	bus_get_bus_tag(dev, SYS_RES_MEMORY);

vs

	bus_get_bus_tag(dev, SYS_RES_IOPORT);

I would also be inclined to call it 'bus_get_bus_space_tag()' since it is
returning a bus_space tag.  "bus tag" might too generic of a name.  In
general though it seems to be a workaround for not wanting to allocate an
actual resource with bus_alloc_resource() and then using
bus_activate_resource() to obtain a valid (tag, handle) tuple?

-- 
John Baldwin
Received on Fri Feb 05 2016 - 19:49:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:02 UTC