Skip to content
  • Lorenzo Pieralisi's avatar
    ACPI/IORT: Make dma masks set-up IORT specific · 18b709be
    Lorenzo Pieralisi authored
    
    
    The introduction of acpi_dma_configure() allows to configure DMA
    and related IOMMU for any device that is DMA capable. To achieve
    that goal it ensures DMA masks are set-up to sane default values
    before proceeding with IOMMU and DMA ops configuration.
    
    On x86/ia64 systems, through acpi_bind_one(), acpi_dma_configure() is
    called for every device that has an ACPI companion, in that every device
    is considered DMA capable on x86/ia64 systems (ie acpi_get_dma_attr() API),
    which has the side effect of initializing dma masks also for
    pseudo-devices (eg CPUs and memory nodes) and potentially for devices
    whose dma masks were not set-up before the acpi_dma_configure() API was
    introduced, which may have noxious side effects.
    
    Therefore, in preparation for IORT firmware specific DMA masks set-up,
    wrap the default DMA masks set-up in acpi_dma_configure() inside an IORT
    specific wrapper that reverts to a NOP on x86/ia64 systems, restoring the
    default expected behaviour on x86/ia64 systems and keeping DMA default
    masks set-up on IORT based (ie ARM) arch configurations.
    
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
    Tested-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Hanjun Guo <hanjun.guo@linaro.org>
    Cc: Bjorn Helgaas <bhelgaas@google.com>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Cc: Tomasz Nowicki <tn@semihalf.com>
    Cc: Joerg Roedel <joro@8bytes.org>
    Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
    Cc: Sricharan R <sricharan@codeaurora.org>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    18b709be