Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp67276rwb; Wed, 10 Aug 2022 15:01:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gfgahoW8vAUoIhnYUU9GD/QVBmWgp8jVnm8PufWppNkz1QTqrGzXURPHLvjwJ61gnwm1T X-Received: by 2002:a17:907:d9e:b0:731:1a5:8c68 with SMTP id go30-20020a1709070d9e00b0073101a58c68mr18101520ejc.365.1660168893078; Wed, 10 Aug 2022 15:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660168893; cv=none; d=google.com; s=arc-20160816; b=MHjum6JKBRrWZ48FLTpgMrDqUTaJiYg/B8EpC9syl3M1ot5kanYG5WGrmcmr6Dag/+ g4TVRFn9XAdxNImNWuLiDtUjlk4FVIQb+yzDnrLpcLu/9jXfZ/GN4RVZ35VK2Kuf9KZ+ toxsbsbMgtiQIlhGIFJ0E0KXmGrziRTED6urpnY7DnZLHO3q4o5l4ES/6G9QywBNzVr2 2Woh9JP3RKiusHmYyoX2Ks5JIFaco8awxMDDySILG9X3hrpXx9pXTwW+xw8VSPWYw7Em M4DxBcbviEdpkDqFEdrHwFRLhYvnvCQtMz9L2FnCbTo5XFLSrA4zzEmi8xSuE0cvK1nA y1hw== 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; bh=1LBUVir9vATe8Xj/pz3Y3zCIETCVWzxLWfVraL7qb4Y=; b=J+uuvcdnsf25kHyv1TosV53o3nJPXg1GtUdZv64dWaJ1XVpCx6G8gOLs2WD5WLQdge zKYvDu7Bk1bx95FrHpVXCpHrLd6pLTmiR3q5g9B9MiHBMXFLW0MiWm8PvjyKoLwspRYy tCh3k/sW2P1xL+BHo6Le0zrKbpE4oNrzepvKMHABObsCBP/rfiHakcjwEjKIQf+sULAz B1lg1y55VAsJVkPgTh952igEykORuFeDJx/yBLdg7s8HVE/dbFk7yKLdhnRiay/3dCoj 29/2WbjYmHnkacAG7DOOn5NnS3y0A6tpRdOOS/ei6ALSe0CPTCxFtqUEz4MIGE4S4004 876w== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a056402271400b0043e74bbfab2si13904003edd.162.2022.08.10.15.01.04; Wed, 10 Aug 2022 15:01:33 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233102AbiHJVa3 (ORCPT + 99 others); Wed, 10 Aug 2022 17:30:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiHJVa2 (ORCPT ); Wed, 10 Aug 2022 17:30:28 -0400 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4560426F2; Wed, 10 Aug 2022 14:30:27 -0700 (PDT) Received: by mail-io1-f42.google.com with SMTP id o2so13244319iof.8; Wed, 10 Aug 2022 14:30:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=1LBUVir9vATe8Xj/pz3Y3zCIETCVWzxLWfVraL7qb4Y=; b=PYkBu60GQjh+VzNnuOEbLfoZ/0Ur8GE4v/AurKXvUDUwvFkauzmtJmoc79sIxVCg3C AmzBLRyeju3hK2q7W8gnehl2BryvwbrAntN3O8mwSe4VSboOqKeb8NdIc9zPHiqLfp6X mSZqkdOS+GLQVHPJ/G5/Zbn5ffFSymF5tnvteO7NvcrSX5Y4A0/cvabSLsCAc7L0aXBb Vaek8S0H8TmOB9gkw0DYHmK31iIreM7ORmAvUh86rlHbAz09+mOhGCG3oCK4AnP39Uww SfI44xkaja/nLDZ1gFTWHLe7A3ecFBXKizkZ+5NBS69aTzlSmW8sB2W5tali86rRd9CP VjLQ== X-Gm-Message-State: ACgBeo0SYQuG/frezM7jZzkuQRKxRNT92zY3oU14UBmBA1LQDRG5prDQ M5eB73JkLqWMVBNuaejNIQ== X-Received: by 2002:a05:6638:4194:b0:33f:4795:5c68 with SMTP id az20-20020a056638419400b0033f47955c68mr13230426jab.193.1660167026570; Wed, 10 Aug 2022 14:30:26 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id s2-20020a02b142000000b00343478edef5sm734022jah.65.2022.08.10.14.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 14:30:25 -0700 (PDT) Received: (nullmailer pid 584812 invoked by uid 1000); Wed, 10 Aug 2022 21:30:23 -0000 Date: Wed, 10 Aug 2022 15:30:23 -0600 From: Rob Herring To: Will McVicker Cc: Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , kernel-team@android.com, Vidya Sagar , kernel test robot , "Isaac J . Manjarres" , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] PCI: dwc: add support for 64-bit MSI target address Message-ID: <20220810213023.GB557589-robh@kernel.org> References: <20220810183536.1630940-1-willmcvicker@google.com> <20220810183536.1630940-3-willmcvicker@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220810183536.1630940-3-willmcvicker@google.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Aug 10, 2022 at 06:35:35PM +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. 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. > Basically, in the slim chance that there are no 32-bit allocations > available, the current PCIe host driver will fail to allocate the > msi_msg page due to a DMA address overflow (seen in [1]). With this > patch, the PCIe driver can advertise 64-bit support via it's MSI > capabilities to hint to the PCIe host driver to set the DMA mask to > 64-bits. > > [1] https://lore.kernel.org/all/Yo0soniFborDl7+C@google.com/ > > Reported-by: kernel test robot > Signed-off-by: Will McVicker > --- > drivers/pci/controller/dwc/pcie-designware-host.c | 14 ++++++++++++-- > drivers/pci/controller/dwc/pcie-designware.c | 9 +++++++++ > drivers/pci/controller/dwc/pcie-designware.h | 1 + > 3 files changed, 22 insertions(+), 2 deletions(-) Reviewed-by: Rob Herring