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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 90607C4360C for ; Mon, 30 Sep 2019 08:20:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A899218DE for ; Mon, 30 Sep 2019 08:20:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AN6E2r5+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729964AbfI3IU5 (ORCPT ); Mon, 30 Sep 2019 04:20:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43008 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729923AbfI3IU5 (ORCPT ); Mon, 30 Sep 2019 04:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=If3yq1ODv3mmckOcV5bip4UCF3kVbPW2FQhUrotgaDI=; b=AN6E2r5+esnTrZkRBItKdRjse DHWl6KMtx8uvrMrd6Rm3NccrVdj8sgohG5IhvUu7yiSapvzR4zG/bp79mucxPjSJszkOKVpH8j+Tx 2LjUq3ltPhxUC0kfPwVvE/2+q38SwH4IotQGcGmUr4Up6EtdRTQiZ0wvN21iKY4deDJKGwH+Nv2Il 5HZKNU7KLYBypju4ygZ+GcaHczmiCKoY912aV98rRbc4Dnuh4t7KU3uSDZtsZ0InOTzuzjs+hLISZ 5jXl5ucrYxXR2QxMdaSLYGmnw9DWtFeZwFoRF8dgR6/P6gEdioEZk6JQsrYYRYqhTGEevN4Kgr3OW yvuEbI6JA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEqvP-000835-Nr; Mon, 30 Sep 2019 08:20:55 +0000 Date: Mon, 30 Sep 2019 01:20:55 -0700 From: Christoph Hellwig To: Arnd Bergmann Cc: Rob Herring , DTML , Linux ARM , "linux-kernel@vger.kernel.org" , linux-pci , Nicolas Saenz Julienne , Robin Murphy , Florian Fainelli , Stefan Wahren , Frank Rowand , Marek Vasut , Geert Uytterhoeven , Simon Horman , Lorenzo Pieralisi , Oza Pawandeep , Christoph Hellwig , Thierry Reding Subject: Re: [PATCH 00/11] of: dma-ranges fixes and improvements Message-ID: <20190930082055.GA21971@infradead.org> References: <20190927002455.13169-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sun, Sep 29, 2019 at 01:16:20PM +0200, Arnd Bergmann wrote: > On a semi-related note, Thierry asked about one aspect of the dma-ranges > property recently, which is the behavior of dma_set_mask() and related > functions when a driver sets a mask that is larger than the memory > area in the bus-ranges but smaller than the available physical RAM. > As I understood Thierry's problem and the current code, the generic > dma_set_mask() will either reject the new mask entirely or override > the mask set by of_dma_configure, but it fails to set a correct mask > within the limitations of the parent bus in this case. There days dma_set_mask will only reject a mask if it is too small to be supported by the hardware. Larger than required masks are now always accepted. 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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8463CC4360C for ; Mon, 30 Sep 2019 08:23:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 467752086A for ; Mon, 30 Sep 2019 08:23:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hXwnQij+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 467752086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cOIXAHuJVquMtlyZWVu5Hmk7yJ21MFzkL3PKlPj2U2w=; b=hXwnQij+OjtUCM JuvDAyf3xv9jPuHXlLeQbSPZ3mX6CIAVQfaiHz3+31KVujFN8n2qsIZbZLkozC1nNYDVmYi8/eLMC z4xg3DduMaGBSax7AcFZZbvayQ91TxeRlQta5bLg+RE4hYRQEbq/YBDPTyiJwLbWYb8xlVzpl60Su /2GxEkr+/EcBEJZPksdWXc5x8DWsfTk/RRJTKb/3cipSuRHEc9jV6IOurpwiLyai2e3U/k+OPC3MN xfJy/+MaaUENkNsl0ntjq2tbT6emGMLAf1u1Dr22vR58qCdwGN6ubSgCN0xmicW23dtmwyR6YAJxS GXWcs1RwKelEeOW2QKZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEqxk-0001xf-Rf; Mon, 30 Sep 2019 08:23:20 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEqvP-000835-Nr; Mon, 30 Sep 2019 08:20:55 +0000 Date: Mon, 30 Sep 2019 01:20:55 -0700 From: Christoph Hellwig To: Arnd Bergmann Subject: Re: [PATCH 00/11] of: dma-ranges fixes and improvements Message-ID: <20190930082055.GA21971@infradead.org> References: <20190927002455.13169-1-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Reding , Rob Herring , Florian Fainelli , Geert Uytterhoeven , Frank Rowand , DTML , linux-pci , "linux-kernel@vger.kernel.org" , Christoph Hellwig , Marek Vasut , Lorenzo Pieralisi , Oza Pawandeep , Linux ARM , Simon Horman , Robin Murphy , Nicolas Saenz Julienne , Stefan Wahren Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Sep 29, 2019 at 01:16:20PM +0200, Arnd Bergmann wrote: > On a semi-related note, Thierry asked about one aspect of the dma-ranges > property recently, which is the behavior of dma_set_mask() and related > functions when a driver sets a mask that is larger than the memory > area in the bus-ranges but smaller than the available physical RAM. > As I understood Thierry's problem and the current code, the generic > dma_set_mask() will either reject the new mask entirely or override > the mask set by of_dma_configure, but it fails to set a correct mask > within the limitations of the parent bus in this case. There days dma_set_mask will only reject a mask if it is too small to be supported by the hardware. Larger than required masks are now always accepted. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel