Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2459465rwb; Fri, 16 Dec 2022 02:17:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7xQpf1mLDmdIBB8BI9GC1/zTFbmndmTgseSM1/x3bWbgrELnweogm3XG+uLAlNixtvV1M3 X-Received: by 2002:a17:907:c00b:b0:7c1:7d81:d2a8 with SMTP id ss11-20020a170907c00b00b007c17d81d2a8mr17156658ejc.3.1671185828904; Fri, 16 Dec 2022 02:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671185828; cv=none; d=google.com; s=arc-20160816; b=D69LbyuuurdpgH9q7l3y9O6NimvGPM2DbGIMkpjP7abKAXMJMryl92JNrc8pNoABjS UlxZTDqb9Uw7Gm3LH74/SI4chypEuT7nIgbaWuffV7WWvNlklDPxjMq1HNEE5Q/shhHO LeZMS1N9kJyCaDinPbV31vWzsPr8PSbpIQWMHPqZJPiqvD736a1ntZ+EGJzE5GZVLznd OwoYLukvb1/nC9zR8Mm9OADPpMKQSEjwi5v77h7Ni261yBvPQ4neeDz5HA3qsRrR7opB hHmoCNnuAW8Wg7WqRcKCM+EEVzVDP1IXZcYuCKJK4gGyG0VFwmpwHVnqnt8p1qc3PTlW 6bXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2FEpUqFtUCg4BaQ5RPfVF2QeTfCFgqWEGQxWo8YHLz0=; b=YzBrcrbixUOn8degdrjqj2E7UoM8pd6QbnHQCNtSoC3rp5HVKCaMvg6Nit7JQ+y0DG IybNHjs97FV/SCP6fUsNqloVp8pEXsH3N1N4lSGPATkXqBkPAT+guyuM7nlVsZ9PLoyL QtC34IsWNG5kY+6/sLC7QxvUYqLsaRbD1bEkykrNVMFdjfItH72/6eJI7XA2o3ibvPYA 4mxo85YspHqOtl3uSZKxb+dBOnLxu0vLUwlUS+W5kOif5Cai2PiFQ5eB7dIP03hVJ4Ji SP062l/zxYjDavJ43VqNSSP1YoLj+KWEqdCJSYKkt7+IIxaCRiqap26QMwUMscEspUAx o0xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="GPins/Ws"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd18-20020a1709069b9200b00715867834e3si2161353ejc.506.2022.12.16.02.16.49; Fri, 16 Dec 2022 02:17:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="GPins/Ws"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbiLPJuT (ORCPT + 68 others); Fri, 16 Dec 2022 04:50:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbiLPJuQ (ORCPT ); Fri, 16 Dec 2022 04:50:16 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB77C47315; Fri, 16 Dec 2022 01:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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; bh=2FEpUqFtUCg4BaQ5RPfVF2QeTfCFgqWEGQxWo8YHLz0=; b=GPins/Wsg8zG7IJAo0k2xmY5AD zzACZxOv8OWMsnL7Bsfugrya8kVziIavxbxzQlcCUURIygFTv0De4HsiWDRmVdasC22tzeIGYUbBr t9W78Xx/jVJ3abbvcZBsl7Xz47gWBiToenqtE4yfFSR7z2UTMH52E2IMt28z3Ccz/IPWHV4yi2Gvx ReBAnBjColH1viDVnYPnCvK+1lrLv9txoaxxfQqTxn67HA9bmkhGTmB29HvFToGV4i0w6WzMpfuzT 7x4yjFEgClnOz/stdfCbk8TjbXJmvTrTPWPTuR/r2A8REfKSM+abn/4SzrU8r2mqzsY0La1vLXqS1 yQCbumzQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p67LW-00DuLl-Aa; Fri, 16 Dec 2022 09:49:38 +0000 Date: Fri, 16 Dec 2022 01:49:38 -0800 From: Christoph Hellwig To: Serge Semin Cc: Christoph Hellwig , Robin Murphy , Serge Semin , Gustavo Pimentel , Vinod Koul , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Cai Huoqing , Jingoo Han , Frank Li , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Alexey Malahov , Pavel Parkhomenko , caihuoqing , Yoshihiro Shimoda , linux-pci@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 23/25] PCI: dwc: Restore DMA-mask after MSI-data allocation Message-ID: References: <20221214235305.31744-1-Sergey.Semin@baikalelectronics.ru> <20221214235305.31744-24-Sergey.Semin@baikalelectronics.ru> <20221215092721.tvz3hpaql3kotgnu@mobilestation> <07ec7610-f1be-9b5c-416d-17781a22427d@arm.com> <20221215235218.wsuwy5uckqfxjnb6@mobilestation> <20221216093423.4bettdxisserdzsh@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221216093423.4bettdxisserdzsh@mobilestation> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 16, 2022 at 12:34:23PM +0300, Serge Semin wrote: > What about instead of save/restore pattern I'll just change the > dma_set_mask_and_coherent() method with the dma_set_coherent_mask() > function call? It seems cleaner. Like this: > Thus the platform-specific streaming DMA mask would be preserved. > Since it's PCIe then having the streaming DMA-mask less than 32-bits > wide is very much improbable. Moreover DW PCIe AXI-interface can be > synthesize only with one out of two address bus widths: 32 and 64. Where platform-specific means the dwc subdriver? Yes, that seems to work. Alternatively have a flag that says which streaming mask to set.