diff options
author | 2010-05-10 22:06:04 +0000 | |
---|---|---|
committer | 2010-05-10 22:06:04 +0000 | |
commit | a9eb44cd5fbd133014a3312b536c2284eb5311a7 (patch) | |
tree | 4c691f7b7feef742bb1e03baf49ea5174aea7aa7 /sys/netinet/ip_gre.c | |
parent | /* XXX - we don't use __COMPILER_INT64__ */ so remove it. (diff) | |
download | wireguard-openbsd-a9eb44cd5fbd133014a3312b536c2284eb5311a7.tar.xz wireguard-openbsd-a9eb44cd5fbd133014a3312b536c2284eb5311a7.zip |
Continue with the horrible habit of using agp_machdep.c for agp related MD
things that there really isn't a decent api for elsewhere.
Since on recent intel IGPs the gtt aperture is too big (256meg is not
uncommon) to be mapped on a kva-constrained arch like i386, introduce an agp
mapping api that does things depending on arch.
On amd64 which can afford the space (and will use the direct mapping
again soon)just do bus_space_map() on init, then parcels things out
using bus_space_subregion(), thus avoiding map/unmap overhead on every
call (this is how inteldrm does things right now).
On i386, we do bus_space_map() and bus_space_unmap as appropriate. Linux
has some tricks here involving ``atomic'' maps that are on only one cpu
and that you may not sleep with to avoid the ipi overhead for tlb
flushing. For now we don't go down that route but it is being
considered.
I am also considering if it is worth abstracting this a little more,
improving the api and making it a general MD interface.
Tested by myself on i386 and amd64 and by drahn@ (who has one of the
machines with an aperture that is too big) on i386.
Diffstat (limited to 'sys/netinet/ip_gre.c')
0 files changed, 0 insertions, 0 deletions