summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/bus.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-02-14 16:56:24 +0000
committermarcel <marcel@FreeBSD.org>2010-02-14 16:56:24 +0000
commitd64c132e246c63213bfdfdc38c07d59eb413b25b (patch)
treee8e5b400fb18761bbe3cd75bd951531f2fe23aa2 /sys/ia64/include/bus.h
parent8a3759078068fdea04520bae2eeda9cc36dee98e (diff)
downloadFreeBSD-src-d64c132e246c63213bfdfdc38c07d59eb413b25b.zip
FreeBSD-src-d64c132e246c63213bfdfdc38c07d59eb413b25b.tar.gz
Some code churn:
o Eliminate IA64_PHYS_TO_RR6 and change all places where the macro is used by calling either bus_space_map() or pmap_mapdev(). o Implement bus_space_map() in terms of pmap_mapdev() and implement bus_space_unmap() in terms of pmap_unmapdev(). o Have ia64_pib hold the uncached virtual address of the processor interrupt block throughout the kernel's life and access the elements of the PIB through this structure pointer. This is a non-functional change with the exception of using ia64_ld1() and ia64_st8() to write to the PIB. We were still using assignments, for which the compiler generates semaphore reads -- which cause undefined behaviour for uncacheable memory. Note also that the memory barriers in ipi_send() are critical for proper functioning. With all the mapping of uncached memory done by pmap_mapdev(), we can keep track of the translations and wire them in the CPU. This then eliminates the need to reserve a whole region for uncached I/O and it eliminates translation traps for device I/O accesses.
Diffstat (limited to 'sys/ia64/include/bus.h')
-rw-r--r--sys/ia64/include/bus.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/sys/ia64/include/bus.h b/sys/ia64/include/bus.h
index a2a02a0..bad4f85 100644
--- a/sys/ia64/include/bus.h
+++ b/sys/ia64/include/bus.h
@@ -132,28 +132,14 @@
/*
- * Map a region of device bus space into CPU virtual address space.
+ * Map and unmap a region of device bus space into CPU virtual address space.
*/
-static __inline int
-bus_space_map(bus_space_tag_t bst, bus_addr_t addr, bus_size_t size __unused,
- int flags __unused, bus_space_handle_t *bshp)
-{
-
- *bshp = (__predict_false(bst == IA64_BUS_SPACE_IO))
- ? addr : IA64_PHYS_TO_RR6(addr);
- return (0);
-}
-
-
-/*
- * Unmap a region of device bus space.
- */
-static __inline void
-bus_space_unmap(bus_space_tag_t bst __unused, bus_space_handle_t bsh __unused,
- bus_size_t size __unused)
-{
-}
+int
+bus_space_map(bus_space_tag_t, bus_addr_t, bus_size_t, int,
+ bus_space_handle_t *);
+void
+bus_space_unmap(bus_space_tag_t, bus_space_handle_t, bus_size_t size);
/*
* Get a new handle for a subregion of an already-mapped area of bus space.
OpenPOWER on IntegriCloud