Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2097671rwn; Fri, 9 Sep 2022 08:29:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bwz7+E2123cW6maZVVg2f45wvsOWkDUkm2a9MzaysNSvyDeD7BYMDichxiM/tvFdiIoFt X-Received: by 2002:a17:907:60c6:b0:730:d10f:4 with SMTP id hv6-20020a17090760c600b00730d10f0004mr9923973ejc.217.1662737376462; Fri, 09 Sep 2022 08:29:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662737376; cv=none; d=google.com; s=arc-20160816; b=MiCd9NSEPm1v3Pzy/Gw3MPersGhOe4+318apYT+jw4GcmLiHXYgUy/0yIVc2BlefOK YJEw4H23EllPsV8zUooMmNvkbzRgMoHl0ShSrqGKkNpD3x9JDtcAM+O1VyVkTHiwtkdL cWCEF53q4z6lK4X78Oi961HcddXttZ8/0l2tN/tquJNWyJEkK3p9hLCyI0z9NQ6LBs0l jssYdngXVPpTWJajNQRWzyw/33B8vkDiXAE8Ckdn19JayGlC0RuvoECCQJAMKoPtDnyf Ajf4VLxiWDJb6jMFvjyMRb/E2bBy5lcFptbzwsCQYEMo5cs/dK1nPPmfOLbjUPZz12s1 oGvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=RCPo4kBNTYDM/dUh+CVJkO1l0LloiJAgv1pR6z9GkJM=; b=lI64bcr8A0QnlODLK9AYqIpVNyytvipypuhYVmNkZmZlSwe/RZDzlMzcAw7Zf0oBq2 Qs8E/1Ty88q8KGdcEBm2U/NTQG6y8xGqofj/LnJb6fd8IdesiZkBf68SkY7aHsbcNPVP lOfCjV7yG4JcypTQiIiHtEQzprd03QVIGgr0H/e9czUeacysqHh9UanckVJ8trJlR7c0 +d09pnA6n2PXnHUGEp0I4s7eUnt/GHMwTl4xmkIYCAKfYvIFjSUAMqiJ2GYkUf8qpvb8 y3FJ3cxTLLog3mVtr4MtkDTDTAGCcNCd8wIj9TRKyBvPmaURF5JSvjwGxuV/s4wWk1Jy Bl/A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa11-20020a1709076d0b00b007413f3f0acbsi772611ejc.357.2022.09.09.08.29.11; Fri, 09 Sep 2022 08:29:36 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230206AbiIIPAn (ORCPT + 99 others); Fri, 9 Sep 2022 11:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiIIPAk (ORCPT ); Fri, 9 Sep 2022 11:00:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F866D5733; Fri, 9 Sep 2022 08:00:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BD1C165C; Fri, 9 Sep 2022 08:00:43 -0700 (PDT) Received: from [10.57.15.197] (unknown [10.57.15.197]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6252E3F73D; Fri, 9 Sep 2022 08:00:34 -0700 (PDT) Message-ID: <6d1da046-1f14-4204-e0c5-8d5b315e3839@arm.com> Date: Fri, 9 Sep 2022 16:00:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v5 2/2] PCI: dwc: Add support for 64-bit MSI target address Content-Language: en-GB To: Christoph Hellwig Cc: Will McVicker , Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Rob Herring , =?UTF-8?Q?Krzysztof_Wilczy=c5=84ski?= , Bjorn Helgaas , kernel-team@android.com, Vidya Sagar , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot References: <20220825185026.3816331-1-willmcvicker@google.com> <20220825185026.3816331-3-willmcvicker@google.com> <5bfd7d4d-d431-6321-89bc-663dcd36e930@arm.com> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 2022-09-09 15:47, Christoph Hellwig wrote: > On Fri, Sep 09, 2022 at 02:47:19PM +0100, Robin Murphy wrote: >> On 2022-09-09 14:29, Christoph Hellwig wrote: >>> On Thu, Aug 25, 2022 at 06:50:25PM +0000, Will McVicker wrote: >>>> Since not all devices require a 32-bit MSI address, add support to the >>>> PCIe host driver to allow setting the DMA mask to 64-bits if the 32-bit >>>> allocation fails. This allows kernels to disable ZONE_DMA32 and bounce >>>> buffering (swiotlb) without risking not being able to get a 32-bit address >>>> during DMA allocation. >>> >>> Umm. You can't just disable ZONE_DMA32. Linux absolutely requires a >>> 32-bit dma mask to work, it is in fact the implicit default. >> >> Eh, it's behind CONFIG_EXPERT, which makes it enough of a "I think I know >> what I'm doing and accept responsibility for picking up the pieces if it >> breaks" thing. > > Seem like indeed on arm64 there is a way to disable it. The x86 model > is to just select it unconditionally, which I think is the right way > if we don't want to get into completely random failures. IIRC there were reasons for wanting as much ZONE_NORMAL memory as possible; for the embedded folks who are already typically running with "swiotlb=noforce" to save memory because they know their hardware, we may as well let them have the footgun. Distros and other general-purpose configs should rightly not be going anywhere near this. Cheers, Robin.