]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Mega busdma API commit.
authorscottl <scottl@FreeBSD.org>
Tue, 1 Jul 2003 15:52:06 +0000 (15:52 +0000)
committerscottl <scottl@FreeBSD.org>
Tue, 1 Jul 2003 15:52:06 +0000 (15:52 +0000)
commit4d495abb9d6f6e6d703264c4133ce1f0c4e7df92
tree1bbd76935b6d5917753df7328c69bd2f3c75f15a
parent40bbdc533036dcf851a5b4c44f1b64b82b887a5a
Mega busdma API commit.

Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma.  At the moment, this is used for the
asynchronous busdma_swi and callback mechanism.  Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg.  dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create().  The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms.  The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by: tmm, gibbs
116 files changed:
sys/alpha/alpha/busdma_machdep.c
sys/alpha/include/bus.h
sys/alpha/isa/isa_dma.c
sys/amd64/amd64/busdma_machdep.c
sys/amd64/include/bus_dma.h
sys/dev/aac/aac.c
sys/dev/aac/aac_pci.c
sys/dev/advansys/adv_eisa.c
sys/dev/advansys/adv_isa.c
sys/dev/advansys/adv_pci.c
sys/dev/advansys/advansys.c
sys/dev/advansys/adw_pci.c
sys/dev/advansys/adwcam.c
sys/dev/aha/aha.c
sys/dev/aha/aha_isa.c
sys/dev/aha/aha_mca.c
sys/dev/ahb/ahb.c
sys/dev/aic7xxx/ahc_eisa.c
sys/dev/aic7xxx/ahc_pci.c
sys/dev/aic7xxx/ahd_pci.c
sys/dev/aic7xxx/aic79xx_osm.h
sys/dev/aic7xxx/aic7xxx_osm.h
sys/dev/amd/amd.c
sys/dev/amr/amr_pci.c
sys/dev/an/if_an_pci.c
sys/dev/ata/ata-dma.c
sys/dev/ath/if_ath_pci.c
sys/dev/buslogic/bt.c
sys/dev/buslogic/bt_eisa.c
sys/dev/buslogic/bt_isa.c
sys/dev/buslogic/bt_mca.c
sys/dev/buslogic/bt_pci.c
sys/dev/ciss/ciss.c
sys/dev/ct/ct_isa.c
sys/dev/dpt/dpt_eisa.c
sys/dev/dpt/dpt_isa.c
sys/dev/dpt/dpt_pci.c
sys/dev/dpt/dpt_scsi.c
sys/dev/em/if_em.c
sys/dev/en/midway.c
sys/dev/fatm/if_fatm.c
sys/dev/firewire/fwdma.c
sys/dev/firewire/fwohci.c
sys/dev/firewire/fwohci_pci.c
sys/dev/firewire/sbp.c
sys/dev/fxp/if_fxp.c
sys/dev/gem/if_gem.c
sys/dev/hatm/if_hatm.c
sys/dev/hifn/hifn7751.c
sys/dev/hme/if_hme.c
sys/dev/ida/ida.c
sys/dev/ida/ida_eisa.c
sys/dev/ida/ida_pci.c
sys/dev/iir/iir.c
sys/dev/iir/iir_pci.c
sys/dev/ips/ips.c
sys/dev/ips/ips_commands.c
sys/dev/ips/ips_ioctl.c
sys/dev/ips/ips_pci.c
sys/dev/isp/isp_pci.c
sys/dev/isp/isp_sbus.c
sys/dev/lnc/if_lnc_cbus.c
sys/dev/lnc/if_lnc_isa.c
sys/dev/lnc/if_lnc_pci.c
sys/dev/mlx/mlx.c
sys/dev/mlx/mlx_pci.c
sys/dev/mly/mly.c
sys/dev/mpt/mpt_pci.c
sys/dev/sound/isa/ad1816.c
sys/dev/sound/isa/ess.c
sys/dev/sound/isa/mss.c
sys/dev/sound/isa/sb16.c
sys/dev/sound/isa/sb8.c
sys/dev/sound/pci/als4000.c
sys/dev/sound/pci/au88x0.c
sys/dev/sound/pci/aureal.c
sys/dev/sound/pci/cmi.c
sys/dev/sound/pci/cs4281.c
sys/dev/sound/pci/csapcm.c
sys/dev/sound/pci/ds1.c
sys/dev/sound/pci/emu10k1.c
sys/dev/sound/pci/es137x.c
sys/dev/sound/pci/fm801.c
sys/dev/sound/pci/ich.c
sys/dev/sound/pci/maestro.c
sys/dev/sound/pci/maestro3.c
sys/dev/sound/pci/solo.c
sys/dev/sound/pci/t4dwave.c
sys/dev/sound/pci/via8233.c
sys/dev/sound/pci/via82c686.c
sys/dev/sound/pci/vibes.c
sys/dev/sound/usb/uaudio_pcm.c
sys/dev/sym/sym_hipd.c
sys/dev/trm/trm.c
sys/dev/twe/twe_freebsd.c
sys/dev/tx/if_tx.c
sys/dev/ubsec/ubsec.c
sys/dev/wds/wd7000.c
sys/dev/wi/if_wi.c
sys/i386/acpica/acpi_wakeup.c
sys/i386/i386/busdma_machdep.c
sys/i386/include/bus_dma.h
sys/i4b/layer1/itjc/i4b_itjc_pci.c
sys/ia64/ia64/busdma_machdep.c
sys/ia64/include/bus.h
sys/ia64/isa/isa_dma.c
sys/pci/if_rl.c
sys/pci/if_sis.c
sys/pci/if_xl.c
sys/powerpc/include/bus.h
sys/powerpc/powerpc/busdma_machdep.c
sys/sparc64/include/bus.h
sys/sparc64/pci/psycho.c
sys/sparc64/sbus/sbus.c
sys/sparc64/sparc64/bus_machdep.c
sys/sys/bus_dma.h