Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1465031imu; Sun, 16 Dec 2018 01:05:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/UFKVw5InBaCXalvQf7eu+6SrTKURFf4bDAMemI90xt9BDaqqJEmc8D1vaoDpQdKVCjJgDr X-Received: by 2002:a62:b15:: with SMTP id t21mr9385829pfi.136.1544951142264; Sun, 16 Dec 2018 01:05:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544951142; cv=none; d=google.com; s=arc-20160816; b=SEHbMec/Ed2NCCtUp6/gRrJuRL9wCvvX0fJaQgOBuswnmCRj6dR0gGBVsilTq03kti XEGN++sNnS1vajTKE+apbx9ko6mTjLcwpFad4cZaaDe7AqKTnDUfbpw0ZL+NAhOs+lio cA9YBiZ7nA1PMB+0LpXeWBkn2iJMFrhXzWAw3DE7Ao1TdGal+Po1e1XsMMaWnZjpcID4 FamNhHq7UwOHLkxLbMtWDHzvGUDAQFlizwxW/Ma/QmmlAMbw3K3SGgWpeXiH1flj6S20 73QGppNSSAWTi9Q9QxijLLBRqeLX2qvyCdOGll+lKtyaRhPNulZ2IHJ/hLsjxfhLPhFL 5hKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=E4PHOr+eh0aLiwsBSR9vQvawIl+MoCPOcf5HQhKPYJU=; b=bpUdoQVyuwM5fBzKwATkHk8HEPzS6808ZNu0vrYOMC8Sg8UKuZnmmQaUpTlm1iRjze AGI7JVxSrrsClPTRSfCY6KmEqYP0ltzPdsUUOruwpPUj/1owc1nUfOuNcfKQvcsG2LMY C984aRLLnyetMnP/mwNH+mQMxakW9d/avko27ouYJK50Z7sUYGHh7qNyPxlRr4xK2A7e 73inj0tI9UIH31kZoP5Iqe+yQIK/IcbH5IBjsgi5Jtaf9vXdtNiW5i8cq7BxcHdZeB84 EZLjSMAlROG0RwUIOToarcmwKq4DM9X3AUpH8oMEOwqdzvIkTbhEVl80nI0ka4tymmYO iIvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s123si8332466pgs.93.2018.12.16.01.04.59; Sun, 16 Dec 2018 01:05:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729910AbeLPJCo (ORCPT + 99 others); Sun, 16 Dec 2018 04:02:44 -0500 Received: from verein.lst.de ([213.95.11.211]:56419 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729758AbeLPJCo (ORCPT ); Sun, 16 Dec 2018 04:02:44 -0500 Received: by newverein.lst.de (Postfix, from userid 2407) id 20CD068D93; Sun, 16 Dec 2018 10:02:42 +0100 (CET) Date: Sun, 16 Dec 2018 10:02:42 +0100 From: Christoph Hellwig To: Guenter Roeck Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Linus Torvalds , Jesper Dangaard Brouer , Tariq Toukan , Ilias Apalodimas , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Robin Murphy , Konrad Rzeszutek Wilk , Tony Luck , Fenghua Yu , Marek Szyprowski , Keith Busch , Jonathan Derrick , linux-pci@vger.kernel.org, linux-ia64@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [15/15] dma-mapping: bypass indirect calls for dma-direct Message-ID: <20181216090242.GA30702@lst.de> References: <20181207190720.18517-16-hch@lst.de> <20181215174654.GA25694@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181215174654.GA25694@roeck-us.net> 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 Sat, Dec 15, 2018 at 09:46:54AM -0800, Guenter Roeck wrote: > Hi, > > On Fri, Dec 07, 2018 at 11:07:20AM -0800, Christoph Hellwig wrote: > > Avoid expensive indirect calls in the fast path DMA mapping > > operations by directly calling the dma_direct_* ops if we are using > > the directly mapped DMA operations. > > > > This patch results in arm64 boot failures. Reverting the patch fixes > the problem. Bisect results are attached. Per logs, the system fails > to instantiate the root device. Examples from two logs: This patch should fix it, it has already been sent out Friday and I'm just waiting for an ACK from the arm64 maintainers before applying it: -- From e6dc770875bc551ff77fe5673f5dd3c8ac242536 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 14 Dec 2018 15:18:08 +0100 Subject: arm64: default to the direct mapping in get_arch_dma_ops Otherwise the direct mapping won't work at all given that a NULL dev->dma_ops causes a fallback. Note that we already explicitly set dev->dma_ops to dma_dummy_ops for dma-incapable devices, so this fallback should not be needed anyway. Fixes: 356da6d0cd ("dma-mapping: bypass indirect calls for dma-direct") Signed-off-by: Christoph Hellwig Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski --- arch/arm64/include/asm/dma-mapping.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h index 273e778f7de2..95dbf3ef735a 100644 --- a/arch/arm64/include/asm/dma-mapping.h +++ b/arch/arm64/include/asm/dma-mapping.h @@ -26,11 +26,7 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) { - /* - * We expect no ISA devices, and all other DMA masters are expected to - * have someone call arch_setup_dma_ops at device creation time. - */ - return &dma_dummy_ops; + return NULL; } void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, -- 2.19.2