Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2075058imm; Tue, 10 Jul 2018 12:48:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd1covaIvj1uYZkC+2Apyb/btGrrdCKdeFjHpoUZe0qQw5O8kZRxSX0QU249UfipMhrSPE1 X-Received: by 2002:a63:dd09:: with SMTP id t9-v6mr5710204pgg.370.1531252107780; Tue, 10 Jul 2018 12:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531252107; cv=none; d=google.com; s=arc-20160816; b=O1L/2ukIkvMmHsSIxa5V8VnjwqrPsbqEoIVW5A722x3Hu5j2W3yMRHMgq9jbv3aZSO Pt0dFh/yKSQlvJuu/5spenhoSh2/0NMLCtSqrA4KOHfcBdvHekQI4ykwJEuZey0v/NuN N3ctGLOSMLWbu4u0OYJeuBWVHRU7rR/MoCyjG1FhNMiD1MSFwOJ5hOQXCv8bZYV8YhWO ll7ux6N0/Zc+lx3lyaCg5f17tjzudTV0YjnsRxbEFjzt+fxspmbiUtjGcRBPxXpDlRH9 mCMAoCYFQSUXmlX0P/8ayZcLtFH0q+p75X8SVPyvJGLeV+yVfnn1s3wfiNwG3bLmOA29 MgWQ== 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:arc-authentication-results; bh=i9md2ntt26p8MdZdIlCunojI8USGcmVkGw8hjeoILAg=; b=BVW/tEimpT6oDHvVxNZSUtyn8U7PhwK50kEDbkMQr/7tdA8pmyJ3+/lnYMH/hSuNGp 165wWUmZs/ebasQEfxzl5AMdDXjFB76jcfB9H2LGhokwR+m04a4dLtew70FvOjyHqlBj BH9ZDJNHCSx/lAHRUlOeZsXr8af2cvK0bNa8aoF+2HcbfVRRCuzMdiLpu5JM0AS4eciX y8w1ZafZgpNkNlYZ+ziz4tliqviGjs81pJV9Wv82smmSV/NuSIl3LwcvINwYFi9Jl2AN lHOCVaI9ulUURo8BJaGX9sct988kcbjIYWXlOvkEm5fWucGuoX+c1ubXoFxQbx3ZIf9C SJIw== 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 v6-v6si17203581plp.60.2018.07.10.12.48.12; Tue, 10 Jul 2018 12:48:27 -0700 (PDT) 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 S1732458AbeGJSSt (ORCPT + 99 others); Tue, 10 Jul 2018 14:18:49 -0400 Received: from verein.lst.de ([213.95.11.211]:49076 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732298AbeGJSSs (ORCPT ); Tue, 10 Jul 2018 14:18:48 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 3DFDD68B97; Tue, 10 Jul 2018 20:04:33 +0200 (CEST) Date: Tue, 10 Jul 2018 20:04:33 +0200 From: Christoph Hellwig To: Robin Murphy Cc: hch@lst.de, m.szyprowski@samsung.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, robh+dt@kernel.org, frowand.list@gmail.com, gregkh@linuxfoundation.org, joro@8bytes.org, x86@kernel.org Subject: Re: [RFC PATCH 1/4] dma-mapping: Generalise dma_32bit_limit flag Message-ID: <20180710180433.GB26285@lst.de> References: 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 Tue, Jul 10, 2018 at 06:17:16PM +0100, Robin Murphy wrote: > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index 8be8106270c2..95e185347e34 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -183,7 +183,7 @@ int dma_direct_supported(struct device *dev, u64 mask) > * Various PCI/PCIe bridges have broken support for > 32bit DMA even > * if the device itself might support it. > */ > - if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32)) > + if (dev->bus_dma_mask && mask > dev->bus_dma_mask) > return 0; The comment above this check needs an updated (or just be removed). Also we still have a few architectures not using dma-direct. I guess most were doing fine without such limits anyway, but at least arm will probably need an equivalent check.