Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965685AbcLWNHy (ORCPT ); Fri, 23 Dec 2016 08:07:54 -0500 Received: from mail-lf0-f51.google.com ([209.85.215.51]:32911 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752060AbcLWNHw (ORCPT ); Fri, 23 Dec 2016 08:07:52 -0500 Subject: Re: arm64: mm: bug around swiotlb_dma_ops To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org References: <8862fe21-0a82-a09a-c1cb-aa79d46179ec@cogentembedded.com> <2687486.uRNLKRAd5t@wuerfel> <549c88f2-4a17-1b92-4478-e58aa0dd104f@cogentembedded.com> Cc: Catalin Marinas , Will Deacon , Simon Horman , Magnus Damm , Vladimir Barinov , Artemi Ivanov , "linux-kernel@vger.kernel.org" From: Nikita Yushchenko Message-ID: <63639fa4-240b-0f7b-1adb-b79b2f33bef8@cogentembedded.com> Date: Fri, 23 Dec 2016 16:07:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <549c88f2-4a17-1b92-4478-e58aa0dd104f@cogentembedded.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 604 Lines: 11 > If trying to avoid big changes and only fixing particular problem with > particular device not working on arm64, I think best way is to > alter__swiotlb_dma_supported() in arch/arm64/mm/dma-mapping.c to detect > and decline (with -EIO) mask that is unsupported by device connection. > This will cover both dma_mask and coherent_dma_mask. > > This has to be combined with some way to explicitly extract information > about limitations. Checking device parent's dma masks won't work unless > somebody bothers to populate them. I'm trying to bring together a patch doing this, will post that when ready