freebsd-dev/sys/sparc64/include
Thomas Moestl 928a49644f Lock down the IOMMU bus_dma implementation to make it safe to use
without Giant held.

A quick outline of the locking strategy:
Since all IOMMUs are synchronized, there is a single lock, iommu_mtx,
which protects the hardware registers (where needed) and the global and
per-IOMMU software states. As soon as the IOMMUs are divorced, each struct
iommu_state will have its own mutex (and the remaining global state
will be moved into the struct).
The dvma rman has its own internal mutex; the TSB slots may only be
accessed by the owner of the corresponding resource, so neither needs
extra protection.
Since there is a second access path to maps via LRU queues, the consumer-
provided locking is not sufficient; therefore, each map which is on a
queue is additionally protected by iommu_mtx (in part, there is one
member which only the map owner may access). Each map on a queue may
be accessed and removed from or repositioned in a queue in any context as
long as the lock is held; only the owner may insert a map.
To reduce lock contention, some bus_dma functions remove the map from
the queue temporarily (on behalf of the map owner) for some operations and
reinsert it when they are done. Shorter operations and operations which are
not done on behalf of the lock owner are completely covered by the lock.

To facilitate the locking, reorganize the streaming buffer handling;
while being there, fix an old oversight which would cause the streaming
buffer to always be flushed, regardless of whether streaming was enabled
in the TSB entry. The streaming buffer is still disabled for now, since
there are a number of drivers which lack critical bus_dmamp_sync() calls.

Additional testing by:	jake
2003-07-10 23:27:35 +00:00
..
_inttypes.h
_limits.h sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
_stdint.h
_types.h - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
asi.h
asm.h - Fix placement of cvs ids in previous commit to match .S files in libc. 2003-04-29 00:37:41 +00:00
asmacros.h I was wrong, the ENTRY bits in asm.h did have a purpose -- for userland. 2003-04-26 20:54:45 +00:00
atomic.h
bus_common.h
bus_memio.h
bus_pio.h
bus_private.h Lock down the IOMMU bus_dma implementation to make it safe to use 2003-07-10 23:27:35 +00:00
bus.h Lock down the IOMMU bus_dma implementation to make it safe to use 2003-07-10 23:27:35 +00:00
cache.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
ccr.h
clock.h
cpu.h
cpufunc.h add support for peeking at pci busses on UltraSparc systems. This prevents 2003-06-22 01:26:08 +00:00
critical.h
db_machdep.h BKPT_INST is supposed to be a breakpoint, not 0. 2003-06-07 18:24:37 +00:00
eeprom.h
elf.h
endian.h
exec.h
float.h
floatingpoint.h
fp.h - Rename pcb_fpstate to pcb_ufp (user floating point), and change it to 2003-04-01 04:02:45 +00:00
frame.h
fsr.h
idprom.h
ieee.h
ieeefp.h
in_cksum.h
instr.h
intr_machdep.h Renamed intr_enqueue to intr_vector and intr_dequeue to intr_fast, to 2002-09-28 03:06:35 +00:00
iommureg.h
iommuvar.h Lock down the IOMMU bus_dma implementation to make it safe to use 2003-07-10 23:27:35 +00:00
kerneldump.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
kse.h
ktr.h Two tokens that don't together form a vaid preprocssor token cannot be 2003-04-26 17:00:10 +00:00
limits.h sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
lsu.h
md_var.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
metadata.h Slight reorg and added AMD64 support. A couple of the MODINFOMD_* values 2003-05-01 03:31:18 +00:00
mutex.h
nexusvar.h
ofw_bus.h Add the new sparc64 OFW PCI framework, conditional on options OFW_NEWPCI 2003-07-01 14:52:47 +00:00
ofw_machdep.h
ofw_mem.h - Declare sparc64_memreg and sparc64_nmemreg in machine/ofw_mem.h. 2003-06-07 18:29:29 +00:00
ofw_nexus.h
ofw_upa.h
param.h Migrate the thread stack management functions from the machine-dependent 2003-06-14 23:23:55 +00:00
pcb.h - Add space for kernel floating point registers to the pcb. These will be 2003-04-03 18:28:03 +00:00
pcpu.h Remove unused fields. 2003-03-18 08:15:24 +00:00
pmap.h - Move the routine for flushing all user mappings from the tlb from pmap to 2003-04-13 21:54:58 +00:00
proc.h
profile.h
pstate.h
ptrace.h
reg.h
reloc.h
resource.h
runq.h
setjmp.h
sigframe.h
signal.h
smp.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
stdarg.h
sysarch.h
tick.h
tlb.h - Move the routine for flushing all user mappings from the tlb from pmap to 2003-04-13 21:54:58 +00:00
trap.h Allow fast instruction and data access mmu miss traps to be handled by 2003-04-29 21:30:59 +00:00
tsb.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
tstate.h
tte.h Handle the fictitious pages created by the device pager. For fictitious 2003-03-27 02:16:31 +00:00
ucontext.h
upa.h
utrap.h Allow fast instruction and data access mmu miss traps to be handled by 2003-04-29 21:30:59 +00:00
varargs.h
ver.h
vmparam.h
watch.h Use vm_paddr_t for physical addresses. 2003-04-08 06:35:09 +00:00
wstate.h