git: busdma - Remove filter functionality

Michael Neumann mneumann at crater.dragonflybsd.org
Sat Dec 9 20:21:45 PST 2023


commit 030b0c8c4cf27c560ccec70410c8e21934ae677d
Author: Michael Neumann <mneumann at ntecs.de>
Date:   Sat Dec 9 02:46:00 2023 +0100

    busdma - Remove filter functionality
    
    - Remove filtfunc and filtarg arguments from bus_dma_tag_create() and
      fix all callers. All callers use NULL today for both filterfunc and
      filterarg with one exception: if_jme.
    
    - Remove filter functionality internally and parent tag tracking.
      Without filter functions, we do not need to keep track of tag
      ancestry.  All inheritance of the parent tag's parameters occurs when
      creating the new child tag.
    
    - rename run_filter() to addr_needs_bounce().
    
    - FreeBSD keeps the filtfunc and filtarg arguments but requires them to
      be NULL.
    
    - Drop filterfunc usage from if_jme.
    
      In case of "JMC260 chip full mask revision 2", which has a hardware bug
      when it comes to DMA transfers crossing the 4 GB bounday, the parent
      buffer tag already limits DMA memory to 32bit address space. As such it
      should be safe to drop the filterfunc. The filterfunc was checking if
      the lower 32bits of the physical address used for DMA are all 0. In case
      of a 32bit address space, the only address where all lower 32-bits are
      all zero is 0 itself and I am here assuming that the physical address 0
      is not used for DMA transfers!
    
    Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)

Summary of changes:
 share/man/man9/bus_dma.9                         | 52 ++---------------
 sys/bus/firewire/fwdma.c                         |  6 +-
 sys/bus/firewire/fwohci.c                        |  2 +
 sys/bus/firewire/fwohci_pci.c                    |  2 +
 sys/bus/u4b/usb_busdma.c                         |  2 -
 sys/dev/crypto/hifn/hifn7751.c                   |  1 -
 sys/dev/crypto/safe/safe.c                       |  3 -
 sys/dev/crypto/ubsec/ubsec.c                     |  2 -
 sys/dev/disk/advansys/adv_pci.c                  |  2 -
 sys/dev/disk/advansys/advansys.c                 |  2 -
 sys/dev/disk/advansys/adw_pci.c                  |  1 -
 sys/dev/disk/advansys/adwcam.c                   |  4 --
 sys/dev/disk/ahci/ahci_attach.c                  |  8 ---
 sys/dev/disk/amd/amd.c                           |  1 -
 sys/dev/disk/buslogic/bt.c                       |  8 ---
 sys/dev/disk/buslogic/bt_pci.c                   |  2 -
 sys/dev/disk/isp/isp_freebsd.h                   |  8 ++-
 sys/dev/disk/mpt/mpt.h                           |  2 +-
 sys/dev/disk/nata/ata-dma.c                      |  8 +--
 sys/dev/disk/nvme/nvme_attach.c                  |  8 ---
 sys/dev/disk/sbp/sbp.c                           |  2 +
 sys/dev/disk/sdhci/sdhci.c                       |  2 +-
 sys/dev/disk/sili/sili_attach.c                  |  4 --
 sys/dev/disk/sym/sym_hipd.c                      |  3 +-
 sys/dev/disk/trm/trm.c                           |  7 ---
 sys/dev/misc/dcons/dcons_crom.c                  |  1 -
 sys/dev/netif/ae/if_ae.c                         |  1 -
 sys/dev/netif/age/if_age.c                       |  9 ---
 sys/dev/netif/alc/if_alc.c                       |  9 ---
 sys/dev/netif/ale/if_ale.c                       |  7 ---
 sys/dev/netif/ath/ath/if_ath_ahb.c               |  3 +
 sys/dev/netif/ath/ath/if_ath_descdma.c           |  3 +
 sys/dev/netif/ath/ath/if_ath_pci.c               |  3 +
 sys/dev/netif/bce/if_bce.c                       | 10 ++--
 sys/dev/netif/bfe/if_bfe.c                       |  3 -
 sys/dev/netif/bge/if_bge.c                       |  4 +-
 sys/dev/netif/bnx/if_bnx.c                       |  6 +-
 sys/dev/netif/bwn/bwn/if_bwn.c                   | 10 ++++
 sys/dev/netif/de/if_de.c                         |  6 +-
 sys/dev/netif/em/if_em.c                         |  3 -
 sys/dev/netif/emx/if_emx.c                       |  3 -
 sys/dev/netif/et/if_et.c                         |  3 -
 sys/dev/netif/igb/if_igb.c                       |  4 +-
 sys/dev/netif/iwi/if_iwi.c                       | 10 ++--
 sys/dev/netif/iwm/if_iwm.c                       |  2 -
 sys/dev/netif/iwn/if_iwn.c                       |  6 +-
 sys/dev/netif/ix/if_ix.c                         |  4 +-
 sys/dev/netif/jme/if_jme.c                       | 23 +-------
 sys/dev/netif/lnc/if_lnc_pci.c                   |  2 -
 sys/dev/netif/msk/if_msk.c                       |  6 --
 sys/dev/netif/mxge/if_mxge.c                     |  4 --
 sys/dev/netif/nfe/if_nfe.c                       |  3 -
 sys/dev/netif/oce/oce_queue.c                    |  2 -
 sys/dev/netif/oce/oce_util.c                     |  2 -
 sys/dev/netif/ral/rt2560.c                       |  8 +--
 sys/dev/netif/ral/rt2661.c                       |  8 +--
 sys/dev/netif/ral/rt2860.c                       |  8 +--
 sys/dev/netif/re/if_re.c                         |  3 -
 sys/dev/netif/re/re.c                            |  2 +-
 sys/dev/netif/rl/if_rl.c                         |  2 -
 sys/dev/netif/sis/if_sis.c                       |  3 -
 sys/dev/netif/sk/if_sk.c                         |  5 --
 sys/dev/netif/stge/if_stge.c                     |  3 -
 sys/dev/netif/vge/if_vge.c                       |  4 --
 sys/dev/netif/wpi/if_wpi.c                       |  6 +-
 sys/dev/netif/xl/if_xl.c                         |  3 -
 sys/dev/raid/aac/aac.c                           |  3 -
 sys/dev/raid/aac/aac_pci.c                       |  1 -
 sys/dev/raid/amr/amr_pci.c                       |  6 --
 sys/dev/raid/arcmsr/arcmsr.c                     |  6 --
 sys/dev/raid/asr/asr.c                           |  2 -
 sys/dev/raid/ciss/ciss.c                         |  4 --
 sys/dev/raid/dpt/dpt_pci.c                       |  2 -
 sys/dev/raid/dpt/dpt_scsi.c                      |  3 -
 sys/dev/raid/hpt27xx/hpt27xx_osm_bsd.c           |  1 -
 sys/dev/raid/hptiop/hptiop.c                     |  5 --
 sys/dev/raid/hptmv/entry.c                       |  1 -
 sys/dev/raid/hptrr/hptrr_osm_bsd.c               |  1 -
 sys/dev/raid/ida/ida.c                           |  2 -
 sys/dev/raid/ida/ida_pci.c                       |  2 +-
 sys/dev/raid/iir/iir.c                           |  3 -
 sys/dev/raid/iir/iir_pci.c                       |  1 -
 sys/dev/raid/ips/ips.c                           |  6 --
 sys/dev/raid/ips/ips_commands.c                  |  6 --
 sys/dev/raid/ips/ips_ioctl.c                     |  2 -
 sys/dev/raid/ips/ips_pci.c                       |  2 -
 sys/dev/raid/mfi/mfi.c                           |  9 ---
 sys/dev/raid/mfi/mfi_pci.c                       |  1 -
 sys/dev/raid/mlx/mlx.c                           |  2 -
 sys/dev/raid/mlx/mlx_pci.c                       |  1 -
 sys/dev/raid/mly/mly.c                           |  5 --
 sys/dev/raid/mpr/mpr.c                           |  7 ---
 sys/dev/raid/mpr/mpr_pci.c                       |  1 -
 sys/dev/raid/mpr/mpr_user.c                      |  1 -
 sys/dev/raid/mps/mps.c                           |  6 --
 sys/dev/raid/mps/mps_pci.c                       |  1 -
 sys/dev/raid/mps/mps_user.c                      |  1 -
 sys/dev/raid/mrsas/mrsas.c                       | 13 -----
 sys/dev/raid/mrsas/mrsas_ioctl.c                 |  3 -
 sys/dev/raid/twa/tw_osl_freebsd.c                |  4 --
 sys/dev/raid/twe/twe_freebsd.c                   |  4 --
 sys/dev/raid/tws/tws.c                           |  3 -
 sys/dev/sound/pci/als4000.c                      |  1 -
 sys/dev/sound/pci/atiixp.c                       |  2 -
 sys/dev/sound/pci/aureal.c                       |  1 -
 sys/dev/sound/pci/cmi.c                          |  1 -
 sys/dev/sound/pci/cs4281.c                       |  1 -
 sys/dev/sound/pci/emu10k1.c                      |  1 -
 sys/dev/sound/pci/emu10kx.c                      |  1 -
 sys/dev/sound/pci/envy24.c                       |  1 -
 sys/dev/sound/pci/envy24ht.c                     |  1 -
 sys/dev/sound/pci/es137x.c                       |  1 -
 sys/dev/sound/pci/fm801.c                        |  1 -
 sys/dev/sound/pci/hda/hdac.c                     |  4 --
 sys/dev/sound/pci/hdspe.c                        |  2 -
 sys/dev/sound/pci/ich.c                          |  4 +-
 sys/dev/sound/pci/maestro.c                      |  2 -
 sys/dev/sound/pci/solo.c                         |  1 -
 sys/dev/sound/pci/t4dwave.c                      |  1 -
 sys/dev/sound/pci/via8233.c                      |  2 -
 sys/dev/sound/pci/via82c686.c                    |  2 -
 sys/dev/sound/pci/vibes.c                        |  1 -
 sys/dev/video/cxm/cxm.c                          |  6 +-
 sys/dev/virtual/amazon/ena/ena.c                 |  3 -
 sys/dev/virtual/vmware/pvscsi/pvscsi.c           |  6 +-
 sys/dev/virtual/vmware/vmxnet3/if_vmx.c          |  3 -
 sys/kern/subr_busdma.c                           |  2 +-
 sys/netproto/802_11/README.DRAGONFLY             |  1 -
 sys/platform/pc64/x86_64/busdma_machdep.c        | 72 ++++++------------------
 sys/platform/vkernel64/platform/busdma_machdep.c | 70 ++++++-----------------
 sys/sys/bus_dma.h                                | 14 +----
 131 files changed, 130 insertions(+), 548 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/030b0c8c4cf27c560ccec70410c8e21934ae677d


-- 
DragonFly BSD source repository


More information about the Commits mailing list