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=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 DDC6FC433E2 for ; Mon, 31 Aug 2020 23:30:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C158D2078B for ; Mon, 31 Aug 2020 23:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725941AbgHaXaV (ORCPT ); Mon, 31 Aug 2020 19:30:21 -0400 Received: from kernel.crashing.org ([76.164.61.194]:52112 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgHaXaV (ORCPT ); Mon, 31 Aug 2020 19:30:21 -0400 X-Greylist: delayed 347 seconds by postgrey-1.27 at vger.kernel.org; Mon, 31 Aug 2020 19:30:19 EDT Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 07VNOEVW017234 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 31 Aug 2020 18:24:17 -0500 Message-ID: Subject: Re: [PATCH] arm64: Enable PCI write-combine resources under sysfs From: Benjamin Herrenschmidt To: Clint Sbisa , linux-pci@vger.kernel.org Cc: Lorenzo Pieralisi , Bjorn Helgaas Date: Tue, 01 Sep 2020 09:24:13 +1000 In-Reply-To: <20200831151827.pumm2p54fyj7fz5s@amazon.com> References: <20200831151827.pumm2p54fyj7fz5s@amazon.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Mon, 2020-08-31 at 15:18 +0000, Clint Sbisa wrote: > Using write-combine is crucial for performance of PCI devices where > significant amounts of transactions go over PCI BARs. > > arm64 supports write-combine PCI mappings, so the appropriate define > has been added which will expose write-combine mappings under sysfs > for prefetchable PCI resources. > > Signed-off-by: Clint Sbisa Acked-by: Benjamin Herrenschmidt > --- > arch/arm64/include/asm/pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/include/asm/pci.h > b/arch/arm64/include/asm/pci.h > index 70b323cf8300..b33ca260e3c9 100644 > --- a/arch/arm64/include/asm/pci.h > +++ b/arch/arm64/include/asm/pci.h > @@ -17,6 +17,7 @@ > #define pcibios_assign_all_busses() \ > (pci_has_flag(PCI_REASSIGN_ALL_BUS)) > > +#define arch_can_pci_mmap_wc() 1 > #define ARCH_GENERIC_PCI_MMAP_RESOURCE 1 > > extern int isa_dma_bridge_buggy;