CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2013/01/17 18:54:40

Modified files:
        sys/arch/amd64/amd64: bus_space.c 
        sys/arch/amd64/include: bus.h 

Log message:
twist the amd64 bus_space implementation a bit. instead of using the tag
as an identifier for IO or memory mappings that was checked inside the api,
turn it into a pointer to a structure of function pointers. the api then
generally becomes a set of macros that deref the function pointers on the
callers behalf. the idea is that following a pointer to very small
functions is cheap compared to doing compares continuously.

a notable exception to the macro wrappers is bus_space_barrier which is now
a static inline function. the only argument to it that gets used is the
flags, and thats usually a constant at compile time so it can be inlined
to a single fence instruction.

the kernel is smaller and the api is more cache friendly now.

ok deraadt@

Reply via email to