From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9479C43610 for ; Tue, 20 Nov 2018 09:25:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 91E1B20671 for ; Tue, 20 Nov 2018 09:25:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91E1B20671 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727431AbeKTTxZ (ORCPT ); Tue, 20 Nov 2018 14:53:25 -0500 Received: from verein.lst.de ([213.95.11.211]:43962 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbeKTTxZ (ORCPT ); Tue, 20 Nov 2018 14:53:25 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 969EC68B02; Tue, 20 Nov 2018 10:25:16 +0100 (CET) Date: Tue, 20 Nov 2018 10:25:16 +0100 From: Christoph Hellwig To: John Stultz Cc: Christoph Hellwig , Will Deacon , Catalin Marinas , Robin Murphy , Konrad Rzeszutek Wilk , linux-arm-kernel , iommu@lists.linux-foundation.org, lkml , Valentin Schneider Subject: Re: [PATCH 06/10] swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs Message-ID: <20181120092516.GC7270@lst.de> References: <20181008080246.20543-1-hch@lst.de> <20181008080246.20543-7-hch@lst.de> <20181109074955.GA27489@lst.de> <20181114141311.GA26677@lst.de> <20181114161239.GA29462@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 19, 2018 at 03:22:13PM -0800, John Stultz wrote: > > + sg->dma_address = dma_addr; > > sg_dma_len(sg) = sg->length; > > } > > I know Robin has already replied with more detailed info, but just to > close the loop as I'm finally home, applying this patch didn't seem to > help with the IO hangs I'm seeing w/ HiKey960. If Robins observation is right this should fix the problem for you: diff --git a/include/linux/dma-direct.h b/include/linux/dma-direct.h index bd73e7a91410..1833f0c1fba0 100644 --- a/include/linux/dma-direct.h +++ b/include/linux/dma-direct.h @@ -5,7 +5,7 @@ #include #include -#define DIRECT_MAPPING_ERROR 0 +#define DIRECT_MAPPING_ERROR (~(dma_addr_t)0x0) #ifdef CONFIG_ARCH_HAS_PHYS_TO_DMA #include