[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mips-cvs
Subject:    MIPS: dma-default: Fix 32-bit fall back to GFP_DMA
From:       linux-mips () linux-mips ! org
Date:       2015-04-07 13:33:55
Message-ID: S27014244AbbDGNd6f6w8b/20150407133358Z+294 () eddie ! linux-mips ! org
[Download RAW message or body]

Author: James Hogan <james.hogan@imgtec.com> Fri Mar 27 08:33:43 2015 +0000
Comitter: Ralf Baechle <ralf@linux-mips.org> Wed Apr 1 11:08:12 2015 +0200
Commit: 242cb571602ba24a86804efe5f6a743eff33b214
Gitweb: http://git.linux-mips.org/g/ralf/linux/242cb571602b
Branch: linux-3.5-stable

If there is a DMA zone (usually 24bit = 16MB I believe), but no DMA32
zone, as is the case for some 32-bit kernels, then massage_gfp_flags()
will cause DMA memory allocated for devices with a 32..63-bit
coherent_dma_mask to fall back to using __GFP_DMA, even though there may
only be 32-bits of physical address available anyway.

Correct that case to compare against a mask the size of phys_addr_t
instead of always using a 64-bit mask.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Fixes: a2e715a86c6d ("MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.")
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # 2.6.36+
Patchwork: https://patchwork.linux-mips.org/patch/9610/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit be6674e076522fa1676d329a7aa925b667072ab6)

---

 arch/mips/mm/dma-default.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic