summaryrefslogtreecommitdiffstats
path: root/sys/arm/versatile
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-01-21 01:06:08 +0000
committerian <ian@FreeBSD.org>2015-01-21 01:06:08 +0000
commitc25b839fb87a16beaf55843df79865bc1ec5cae0 (patch)
tree3ca2071ba877fa738001c7bbd1987b50baa34d23 /sys/arm/versatile
parentbb3fec85f3e1707e781d798d53ae711a5269082a (diff)
downloadFreeBSD-src-c25b839fb87a16beaf55843df79865bc1ec5cae0.zip
FreeBSD-src-c25b839fb87a16beaf55843df79865bc1ec5cae0.tar.gz
Revise the arm bus_space implementation to avoid dereferencing the tag on
every operation to retrieve the bs_cookie value almost nothing actually uses. The bus_space struct contains a private data pointer (poorly named bs_cookie, now renamed to bs_privdata) which is used only by a few old armv4 xscale implementations. The bus_space functions were all defined to take this value as the first parameter instead of the bus_space_tag_t, requiring all the inline macro and function expansions to dereference the tag to pass it to another function, which never uses it. Now all the functions take the tag as the first parameter and retrieve the privdata if they need it. Also fix a couple bus_space_unmap() implementations that were calling kva_free() instead of pmap_unmapdev(). Discussed with: cognet
Diffstat (limited to 'sys/arm/versatile')
-rw-r--r--sys/arm/versatile/bus_space.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/versatile/bus_space.c b/sys/arm/versatile/bus_space.c
index 375c551..e7ffc09 100644
--- a/sys/arm/versatile/bus_space.c
+++ b/sys/arm/versatile/bus_space.c
@@ -46,7 +46,7 @@ bs_protos(generic_armv4);
struct bus_space _base_tag = {
/* cookie */
- .bs_cookie = (void *) 0,
+ .bs_privdata = (void *) 0,
/* mapping/unmapping */
.bs_map = generic_bs_map,
OpenPOWER on IntegriCloud