From patchwork Wed Oct 7 20:11:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 1378262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C658Y1D5Dz9sPB; Thu, 8 Oct 2020 07:11:57 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kQFn0-0005uX-6m; Wed, 07 Oct 2020 20:11:54 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kQFmx-0005tJ-CX for kernel-team@lists.ubuntu.com; Wed, 07 Oct 2020 20:11:51 +0000 Received: from 3.general.kamal.us.vpn ([10.172.68.53] helo=ascalon) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kQFmw-0005LF-Va; Wed, 07 Oct 2020 20:11:51 +0000 Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1kQFmt-0003eJ-Hy; Wed, 07 Oct 2020 13:11:47 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [PATCHv2][AWS-{F, G}] UBUNTU: SAUCE: arm64: Enable PCI write-combine resources under sysfs Date: Wed, 7 Oct 2020 13:11:20 -0700 Message-Id: <20201007201120.12793-3-kamal@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201007201120.12793-1-kamal@canonical.com> References: <20201007201120.12793-1-kamal@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamal Mostafa MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Clint Sbisa BugLink: https://bugs.launchpad.net/bugs/1893817 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 Reference: https://lore.kernel.org/linux-pci/20200831151827.pumm2p54fyj7fz5s@amazon.com/ Signed-off-by: Kamal Mostafa Acked-by: Stefan Bader Acked-by: Andrea Righi --- 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;