summaryrefslogtreecommitdiffstats
path: root/lib/libsmutil
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-12-30 18:15:25 +0000
committermarcel <marcel@FreeBSD.org>2009-12-30 18:15:25 +0000
commit33f49fd7d2616329eb37a173a60693cb55b3d81e (patch)
treeebb0b1331bf2a43f6fc8b0edfb8d1b40a8a8e178 /lib/libsmutil
parentb5e1bf6b39a54b6002831b1f842627cf421b0794 (diff)
downloadFreeBSD-src-33f49fd7d2616329eb37a173a60693cb55b3d81e.zip
FreeBSD-src-33f49fd7d2616329eb37a173a60693cb55b3d81e.tar.gz
Revamp bus_space access functions:
o Optimize for memory mapped I/O by making all I/O port acceses function calls and marking the test for the IA64_BUS_SPACE_IO tag with __predict_false(). Implement the I/O port access functions in a new file, called bus_machdep.c. o Change the bus_space_handle_t for memory mapped I/O to the virtual address rather than the physical address. This eliminates the PA->VA translation for every I/O access. The handle for I/O port access is still the port number. o Move inb(), outb(), inw(), outw(), inl(), outl(), and their string variants from cpufunc.h and define them in bus.h. On ia64 these are not CPU functions at all. In bus.h they are merely aliases for the new I/O port access functions defined in bus_machdep.h. o Handle the ACPI resource bug in nexus_set_resource(). There we can do it once so that we don't have to worry about it whenever we need to write to an I/O port that is really a memory mapped address. The upshot of this change is that the KBI is better defined and that I/O port access always involves a function call, allowing us to change the actual implementation without breaking the KBI. For memory mapped I/O the virtual address is abstracted, so that we can change the VA->PA mapping in the kernel without causing an KBI breakage. The exception at this time is for bus_space_map() and bus_space_unmap(). MFC after: 1 week.
Diffstat (limited to 'lib/libsmutil')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud