Received: by 10.213.65.68 with SMTP id h4csp358388imn; Wed, 28 Mar 2018 05:06:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48uvTO94WPbwVboJxG33d9+rWoqNiLEXab0sdDmsnbTDmlIZF98VB57hNV2Idjx3u2a40Dy X-Received: by 2002:a17:902:6984:: with SMTP id l4-v6mr3662040plk.61.1522238811440; Wed, 28 Mar 2018 05:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522238811; cv=none; d=google.com; s=arc-20160816; b=YO8iArN2SYxIdvJK0PkUDROAbCqIAa31n3h32POehczsCmIIFxB5ZmKnDW/Z6jxBS6 3oe1PCVit07YxWEVli7V3gaeXAjUS4J1t+SmNbjS7V3gTAX7zHVW7Fp0ZFsDRksOIsYp DSanITJEWDQME3ef78LxFJm6s9gMVSUHl9YN655NyU7xfLXTLmFHJkmrilhXQVIILTnG sK/jsEPsICVOP81vHsTurQyP2fkyFyavt4qNPvyQeIiOsiHJqqZUHtQ6O/zd5ht/9g7d sonJ2/lm/SXM1kv2Bn9d+ZFEcpRoPfkVRJ+6dAsGQh6AOoYmN9F7hcOUHDClJy/m2WRa e6pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=aLL86EvzuBfi0hiRJeW3kU7TVQVp1r3OUC6YmiGgwfs=; b=G9zvmEd+z61U7Qd2cNeW9Cunibc2jbtBAtpVpG6hwZGtWm/HxvLZpE4OQuLcVugapB +7RkltUskSFCwgq1SdW9AV8/d//Hjw9AIlG7FlzsL5SRMm/O8l+ea5dsc8nqDL3EW2Js 8sBGC2tNwkNeqWoAAU1GVsh6X6ioUXTSNKjru46CHxMCcUn/pRs4r+x/jf6ioHgI8l9R Vq5dL2Dcp2jNgmPhM/NMn6CGukrnCpgS8u87K3mBqhxkmm+r7jGn+FzFklVrjOn5Wvok Cqq2pBuPa3Svw1a8/7X4KaZi0Knh3XRImdzUSMluD2z21xvagq1avp6lnlsddpgIqxWJ 3/sA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x11-v6si3553158plm.326.2018.03.28.05.06.37; Wed, 28 Mar 2018 05:06:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342AbeC1Lu2 (ORCPT + 99 others); Wed, 28 Mar 2018 07:50:28 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:53840 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbeC1Lu0 (ORCPT ); Wed, 28 Mar 2018 07:50:26 -0400 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 91EDC1832D; Wed, 28 Mar 2018 13:50:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id MCq7hTHBFGFv; Wed, 28 Mar 2018 13:50:25 +0200 (CEST) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 68C241806E; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 458C31E072; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 365BD1E06C; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id 2813E3085; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id 20FAE40197; Wed, 28 Mar 2018 13:50:24 +0200 (CEST) From: Niklas Cassel To: kishon@ti.com, cyrille.pitchen@free-electrons.com, Lorenzo Pieralisi , Arnd Bergmann , Greg Kroah-Hartman , Alan Douglas , Bjorn Helgaas , Jingoo Han , Joao Pinto Cc: Niklas Cassel , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 00/12] PCI endpoint 64-bit BAR fixes Date: Wed, 28 Mar 2018 13:50:05 +0200 Message-Id: <20180328115018.31921-1-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PCI endpoint fixes to improve the way 64-bit BARs are handled. There are still future improvements that could be made: pci-epf-test.c always allocates space for 6 BARs, even when using 64-bit BARs (which really only requires us to allocate 3 BARs). pcitest.sh will print "NOT OKAY" for BAR1, BAR3, and BAR5 when using 64-bit BARs. This could probably be improved to say something like "N/A (64-bit BAR)". Niklas Cassel (12): PCI: endpoint: BAR width should not depend on sizeof dma_addr_t PCI: endpoint: Simplify epc->ops->set_bar()/pci_epc_set_bar() PCI: endpoint: Setting BAR_5 to 64-bits wide is invalid PCI: endpoint: Setting 64-bit/prefetch bit is invalid when IO is set PCI: endpoint: Setting a BAR size > 4 GB is invalid if 64-bit flag is not set PCI: designware-ep: Make dw_pcie_ep_set_bar() handle 64-bit BARs properly PCI: cadence: Set PCI_BASE_ADDRESS_MEM_TYPE_64 if a 64-bit BAR was set-up PCI: endpoint: Handle 64-bit BARs properly PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing PCI: designware-ep: Make dw_pcie_ep_reset_bar() handle 64-bit BARs properly misc: pci_endpoint_test: Handle 64-bit BARs properly drivers/misc/pci_endpoint_test.c | 12 +++++---- drivers/pci/cadence/pcie-cadence-ep.c | 15 ++++++++--- drivers/pci/dwc/pcie-designware-ep.c | 36 +++++++++++++++++++++------ drivers/pci/endpoint/functions/pci-epf-test.c | 28 +++++++++++++-------- drivers/pci/endpoint/pci-epc-core.c | 32 +++++++++++++++--------- drivers/pci/endpoint/pci-epf-core.c | 4 +++ include/linux/pci-epc.h | 11 ++++---- include/linux/pci-epf.h | 2 ++ 8 files changed, 95 insertions(+), 45 deletions(-) -- 2.14.2