When creating a handle for a subregion, be sure to actually math out the new
handle address, where we're using handles as raw addresses. This fixes devices with subregions on Octeon PCI specifically, and likely also on MIPS more generally, where there isn't another bus_space in use that was doing the math already.
This commit is contained in:
parent
7b7463a5d2
commit
4228a524fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232410
@ -230,13 +230,12 @@ octopci_bs_unmap(void *t __unused, bus_space_handle_t bh __unused,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
octopci_bs_subregion(void *t __unused, bus_space_handle_t handle __unused,
|
octopci_bs_subregion(void *t __unused, bus_space_handle_t handle,
|
||||||
bus_size_t offset __unused, bus_size_t size __unused,
|
bus_size_t offset, bus_size_t size __unused,
|
||||||
bus_space_handle_t *nhandle __unused)
|
bus_space_handle_t *bshp)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("SUBREGION?!?!?!\n");
|
*bshp = handle + offset;
|
||||||
/* Do nothing */
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,13 +245,12 @@ generic_bs_unmap(void *t __unused, bus_space_handle_t bh __unused,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
generic_bs_subregion(void *t __unused, bus_space_handle_t handle __unused,
|
generic_bs_subregion(void *t __unused, bus_space_handle_t handle,
|
||||||
bus_size_t offset __unused, bus_size_t size __unused,
|
bus_size_t offset, bus_size_t size __unused,
|
||||||
bus_space_handle_t *nhandle __unused)
|
bus_space_handle_t *bshp)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("SUBREGION?!?!?!\n");
|
*bshp = handle + offset;
|
||||||
/* Do nothing */
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user