]> git.baikalelectronics.ru Git - kernel.git/commit
dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Mar 2018 13:35:35 +0000 (15:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Mar 2018 15:34:23 +0000 (17:34 +0200)
commit0535e1e3bd24af9697f4eb1e536bda7a598b13b7
tree194c925657ddd394d26ccc1ae707ffdac31c8534
parent2e04c8eb7955c32932e38cdf4935dc130041fbc0
dma-mapping: Don't clear GFP_ZERO in dma_alloc_attrs

Revert the clearing of __GFP_ZERO in dma_alloc_attrs and move it to
dma_direct_alloc for now.  While most common architectures always zero dma
cohereny allocations (and x86 did so since day one) this is not documented
and at least arc and s390 do not zero without the explicit __GFP_ZERO
argument.

Fixes: e10441b0c164 ("dma-mapping: clear harmful GFP_* flags in common code")
Reported-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Reported-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: iommu@lists.linux-foundation.org
Link: https://lkml.kernel.org/r/20180328133535.17302-2-hch@lst.de
include/linux/dma-mapping.h
lib/dma-direct.c