Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1772528ybn; Thu, 26 Sep 2019 01:54:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6S0ETny7dYy3HdIKHOnr3l3Zqty6cZGIKd3SW/Iu/95IpPzI6SRLLzUqoxFj2xellCyJp X-Received: by 2002:a17:906:2cc8:: with SMTP id r8mr2000343ejr.197.1569488061225; Thu, 26 Sep 2019 01:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569488061; cv=none; d=google.com; s=arc-20160816; b=MYDbSJJ4yNP5EntAwHF9CahhvFmqhgkk89UVhQSQwyErnZpiHXjgxIMWEfRr45cLjT SShwAKiEn2rRj/W8x/NFJmMKh+pf807KmYOTTiav0S8pc/oX77iOVxdzm1D4BJLehZnV 64kkVuACV98PF18QMfVkOvVO+K4g1iYu3VL3UlZG8B1S4nlQbA4JxbWvPBW0G8BdqrwU +HlOg5Qz0fIrv1xOrUf0IwasBnhjp3IHWW4xM8bTjFYp7wtvJ9Te+srXfDk0AHSUR9TB qHwpo5lZA1UZRybkzkoIIJsARku0/gQVodW6Rug5jxtyJrMV75mce9pqzitSsNcXP5fl 6jMA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3Nl/M/81LcQwj7Jem8TYPzQWZ7GuYvGnAxD0Gu0l+1c=; b=kWQC78Yuy1kGxi0NAjUYurMrGBjQr2y90pAimvV4Uxl8BtkZ1teT26qCE4/4V+i7yz QkIybQATMybEEJWM/1RnVtkkOgRX6PpQueHrCll9Ld2pVZ5sBZilkNCRgZhzbh8iZY/p IhiIeBqEYayTkGXMHS7aU6Gt9UUGC0eOO8xGHHbuNOyz86gjAWd0tZQzAEo/F7jFZoKl GmnEIK+xb4dpFGhcQ9nURtxe6Vct7MRSCjvtJDWkHQll6W6+q5FhR9mQ+SKkZGSfG09s ELNbQPK8HIeJfVAGXIRVh+TDDSm0PjzVdf5nCbFEj/uYKyvRrtBeNoUDVgDka17xz4F+ R56Q== 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 v8si940269edi.22.2019.09.26.01.53.58; Thu, 26 Sep 2019 01:54:21 -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 S2633516AbfIXV0E (ORCPT + 99 others); Tue, 24 Sep 2019 17:26:04 -0400 Received: from verein.lst.de ([213.95.11.211]:52754 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441769AbfIXVZ7 (ORCPT ); Tue, 24 Sep 2019 17:25:59 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3E12D68B05; Tue, 24 Sep 2019 23:25:55 +0200 (CEST) Date: Tue, 24 Sep 2019 23:25:54 +0200 From: Christoph Hellwig To: James Bottomley Cc: Sven Schnelle , Christoph Hellwig , Helge Deller , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: allow larger than require DMA masks Message-ID: <20190924212554.GA31357@lst.de> References: <20190215144559.8777-1-hch@lst.de> <20190923211415.GA1875@stackframe.org> <1569286782.3657.29.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1569286782.3657.29.camel@HansenPartnership.com> 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, Sep 23, 2019 at 08:59:42PM -0400, James Bottomley wrote: > > if (mask > ~0U) > > ? ? return 0; > > > > Removing the if() makes the DMA mapping work. It's almost midnight > > here, so i won't look into that any further today. Does anyone have > > an opinion on this behaviour? Otherwise i will look a bit more into > > this in the next days. > > The reason for the if was to kick the device into 32 bit descriptors, > which are usually more efficient, especially with older dual descriptor > format cards like we have on parisc systems. These days we use the dma_get_required_mask API to query for that. Svens patch looks right for how we are now using the DMA mask setting API.