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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45B7DECAAD3 for ; Fri, 9 Sep 2022 15:00:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbiIIPAl (ORCPT ); Fri, 9 Sep 2022 11:00:41 -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 Precedence: bulk List-ID: X-Mailing-List: linux-pci@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.