Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e3510b2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'dma-mapping-4.16-2' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:
 "A few dma-mapping fixes for the fallout from the changes in rc1"

* tag 'dma-mapping-4.16-2' of git://git.infradead.org/users/hch/dma-mapping:
  powerpc/macio: set a proper dma_coherent_mask
  dma-mapping: fix a comment typo
  dma-direct: comment the dma_direct_free calling convention
  dma-direct: mark as is_phys
  ia64: fix build failure with CONFIG_SWIOTLB
parents af27d940 7bcfab20
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ ifneq ($(CONFIG_IA64_ESI),)
obj-y				+= esi_stub.o	# must be in kernel proper
endif
obj-$(CONFIG_INTEL_IOMMU)	+= pci-dma.o
obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb.o

obj-$(CONFIG_BINFMT_ELF)	+= elfcore.o

+1 −0
Original line number Diff line number Diff line
@@ -375,6 +375,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
	dev->ofdev.dev.of_node = np;
	dev->ofdev.archdata.dma_mask = 0xffffffffUL;
	dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask;
	dev->ofdev.dev.coherent_dma_mask = dev->ofdev.archdata.dma_mask;
	dev->ofdev.dev.parent = parent;
	dev->ofdev.dev.bus = &macio_bus_type;
	dev->ofdev.dev.release = macio_release_dev;
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)

/*
 * This is a hack for the legacy x86 forbid_dac and iommu_sac_force. Please
 * don't use this is new code.
 * don't use this in new code.
 */
#ifndef arch_dma_supported
#define arch_dma_supported(dev, mask)	(1)
+5 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
	return page_address(page);
}

/*
 * NOTE: this function must never look at the dma_addr argument, because we want
 * to be able to use it as a helper for iommu implementations as well.
 */
void dma_direct_free(struct device *dev, size_t size, void *cpu_addr,
		dma_addr_t dma_addr, unsigned long attrs)
{
@@ -152,5 +156,6 @@ const struct dma_map_ops dma_direct_ops = {
	.map_sg			= dma_direct_map_sg,
	.dma_supported		= dma_direct_supported,
	.mapping_error		= dma_direct_mapping_error,
	.is_phys		= 1,
};
EXPORT_SYMBOL(dma_direct_ops);