From patchwork Thu Nov 14 11:03:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 13874965 X-Patchwork-Delegate: kw@linux.com Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C51151F77B0 for ; Thu, 14 Nov 2024 11:03:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582221; cv=none; b=osvX4cnlFZc0aFTvix4IElFBHn9K7sHEZ5e2M5VleMfde+X2NjV9hZn0qQyrX4yyKSK+MaZZChvkecwqRx49ODM/D2eD3ndXB69rhQOldNF+xOvlwRxB3A6qsxhZBwKSpnKhubJIM3vEJ5voigLAmxQRkk0dIKx9DqlXbb9SVQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582221; c=relaxed/simple; bh=oUrd/B6QQtwDFNLlM3M2EW72SiN6g4CCW5sNa5Udfcs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KGHcOvvKNyXNhL+wwPQpuRtOrEmtsIZsRvAvpSk8BkpwSbQ6ZoXdAtMg7lgmJMWTG76Jr/VjILrHlUFQNKaM8mZmlJc2lW0w6vHfwFKbvfaLWZZhBUHYx3r8JBWuse1tpkPDZiFICPdIiHvmfUyfAQ8soNSSA6pKdBTi0nvz1+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nmKUD5ZY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nmKUD5ZY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EFE3C4CECD; Thu, 14 Nov 2024 11:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731582220; bh=oUrd/B6QQtwDFNLlM3M2EW72SiN6g4CCW5sNa5Udfcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nmKUD5ZY2CA4/3a2xfQrXWv9PQ70VJEo4eTdCu2Jjn0XMX1jajQpiZkcAOvaSUfpe KB092FbS40MTXmf8kqV7WBBlIbnV1MvbME+XfmiN/xCfzXf9VIQP7U5LG5FXDWvV/I HRmW4YpYyGiGigLuT1BJsRaOSuyh01PPjgiGBC06jQ00YbrkirxZeczgayp7BxX74j B4Yf1O95o2Uuz8fjrafHQVXKKyXiQHhns4xcps4RcRzUI2YYpZEZFdABqo9keogfvw EqWk9DyEVlAM8dPJ/4h1zop2ORbC03u124gm1ZjjyU9zQMWYiOEX5OF0Wr/RQEtuF5 g717QEPX68TMQ== From: Niklas Cassel To: Jesper Nilsson , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas Cc: Damien Le Moal , Frank Li , Niklas Cassel , linux-arm-kernel@axis.com, linux-pci@vger.kernel.org Subject: [PATCH 1/3] PCI: artpec6: Implement dw_pcie_ep operation get_features Date: Thu, 14 Nov 2024 12:03:27 +0100 Message-ID: <20241114110326.1891331-6-cassel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241114110326.1891331-5-cassel@kernel.org> References: <20241114110326.1891331-5-cassel@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1556; i=cassel@kernel.org; h=from:subject; bh=oUrd/B6QQtwDFNLlM3M2EW72SiN6g4CCW5sNa5Udfcs=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGNJNb/z7ahjK1/Jr4fcIkR0BhZEh1Yc77k+Xtdo/McFKx PJ4YcusjlIWBjEuBlkxRRbfHy77i7vdpxxXvGMDM4eVCWQIAxenAExk6yVGhgeazqud894vW1+V /m7p41ndkws4wmVb/iWyv1KMYfSSusHwv5zvr+C0K3ZLV3SLtX2U+7P4/+opns8sFJe6+ro9kxC oZAcA X-Developer-Key: i=cassel@kernel.org; a=openpgp; fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA All non-DWC EPC drivers implement (struct pci_epc *)->ops->get_features(). All DWC EPC drivers implement (struct dw_pcie_ep *)->ops->get_features(), except for pcie-artpec6.c. epc_features has been required in pci-epf-test.c since commit 6613bc2301ba ("PCI: endpoint: Fix NULL pointer dereference for ->get_features()"). A follow-up commit will make further use of epc_features in EPC core code. Implement epc_features in the only EPC driver where it is currently not implemented. Signed-off-by: Niklas Cassel Reviewed-by: Frank Li --- drivers/pci/controller/dwc/pcie-artpec6.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c index f8e7283dacd47..234c8cbcae3af 100644 --- a/drivers/pci/controller/dwc/pcie-artpec6.c +++ b/drivers/pci/controller/dwc/pcie-artpec6.c @@ -369,9 +369,22 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no, return 0; } +static const struct pci_epc_features artpec6_pcie_epc_features = { + .linkup_notifier = false, + .msi_capable = true, + .msix_capable = false, +}; + +static const struct pci_epc_features * +artpec6_pcie_get_features(struct dw_pcie_ep *ep) +{ + return &artpec6_pcie_epc_features; +} + static const struct dw_pcie_ep_ops pcie_ep_ops = { .init = artpec6_pcie_ep_init, .raise_irq = artpec6_pcie_raise_irq, + .get_features = artpec6_pcie_get_features, }; static int artpec6_pcie_probe(struct platform_device *pdev) From patchwork Thu Nov 14 11:03:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 13874966 X-Patchwork-Delegate: kw@linux.com Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EBCF1DA113 for ; Thu, 14 Nov 2024 11:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582223; cv=none; b=ad3AuL7tRbphRPtw7AU2CvTExsNjnHGFEZFYW4tFdW6ueygmp/H1KXB3whBH5hNTfYasirVGZsuoDxwIEVM4XKNTdEXYemLT94vzJxNswhRJumTROYCXQukVgFLCj/P6OcBT5txtV6kSm1Lp0hSGJ9gS005l2pf6YMytUaqW5Ds= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582223; c=relaxed/simple; bh=MATHqujhnAZlTONcB8NdFoRympzQ0lwOsgTO+x9Od04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OGjwOJ3ZrRlgibPt7cotlsr0Yx96u1HC1iZhOafOcHVjZQAUIjs9yVRaXkcRBl+JWNu/3X1rf7wvlXxEqNogmq/ZCV/9bF/GGsSCVPV/dHFvlflfx8Fff2z9VuuhKpl7XzpBno63kbAGkG47c7gEtJTFsqC029ET4kvxIHYIYKQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YO1Lh1jA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YO1Lh1jA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14B20C4CED4; Thu, 14 Nov 2024 11:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731582223; bh=MATHqujhnAZlTONcB8NdFoRympzQ0lwOsgTO+x9Od04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YO1Lh1jAp3NUpX3juakPpSvyyhiKzNshrZ0/M+zE1RQrdui7Wm36NM8+NL9ujNYPk v2ybU+SYo/CL/oS/n8frVqZQL/jlV3ov6yGksI19SGFojaj8W25n5nyhm0oEmCRc2a q67vUWZ0EgxyJ7XcsgsY6/mKNRToe/KwUyFQxCnKpj3LEc7ZkVeTd1ZTJ+OnLVObWD 8gfmsadL+jJ7HvgzzLXBp2USAMI1HwCyBvnKcY2jD89m0d5EHV+zcu2E2x9p5qqMKx 1FFe2L6gYPcDEm2KSkKVyKcX1KWkqGz3Cv5LML22fdIJZ+xVD+stnzXnAzKspAuMAh FhZLAwTd8R4yg== From: Niklas Cassel To: Manivannan Sadhasivam , =?utf-8?q?Krzy?= =?utf-8?q?sztof_Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas Cc: Damien Le Moal , Frank Li , Jesper Nilsson , Niklas Cassel , linux-pci@vger.kernel.org Subject: [PATCH 2/3] PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() Date: Thu, 14 Nov 2024 12:03:28 +0100 Message-ID: <20241114110326.1891331-7-cassel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241114110326.1891331-5-cassel@kernel.org> References: <20241114110326.1891331-5-cassel@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1784; i=cassel@kernel.org; h=from:subject; bh=MATHqujhnAZlTONcB8NdFoRympzQ0lwOsgTO+x9Od04=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGNJNb/xb8abOZfKz+5NKbtUxKn0vkNnySPOZ3We7J25Xc tTNXjQYdpSyMIhxMciKKbL4/nDZX9ztPuW44h0bmDmsTCBDGLg4BWAifeqMDAetMuvuxR05J8Kz ytI9g/f89ZV1leLTEx/UmD6xWR7D9Yfhv9Mt/qjmNSv3f/4uM51NXe3bkvKLVb9mPDrEvfzAkZb VHCwA X-Developer-Key: i=cassel@kernel.org; a=openpgp; fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA A BAR of type BAR_FIXED has a fixed BAR size (the size cannot be changed). When using pci_epf_alloc_space() to allocate backing memory for a BAR, pci_epf_alloc_space() will always set the size to the fixed BAR size if the BAR type is BAR_FIXED (and will give an error if you the requested size is larger than the fixed BAR size). However, some drivers might not call pci_epf_alloc_space() before calling pci_epc_set_bar(), so add a check in pci_epc_set_bar() to ensure that an EPF driver cannot set a size different from the fixed BAR size, if the BAR type is BAR_FIXED. The pci_epc_function_is_valid() check is removed because this check is now done by pci_epc_get_features(). Signed-off-by: Niklas Cassel Reviewed-by: Frank Li --- drivers/pci/endpoint/pci-epc-core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index bed7c7d1fe3c3..c69c133701c92 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -609,10 +609,17 @@ EXPORT_SYMBOL_GPL(pci_epc_clear_bar); int pci_epc_set_bar(struct pci_epc *epc, u8 func_no, u8 vfunc_no, struct pci_epf_bar *epf_bar) { - int ret; + const struct pci_epc_features *epc_features; + enum pci_barno bar = epf_bar->barno; int flags = epf_bar->flags; + int ret; - if (!pci_epc_function_is_valid(epc, func_no, vfunc_no)) + epc_features = pci_epc_get_features(epc, func_no, vfunc_no); + if (!epc_features) + return -EINVAL; + + if (epc_features->bar[bar].type == BAR_FIXED && + (epc_features->bar[bar].fixed_size != epf_bar->size)) return -EINVAL; if ((epf_bar->barno == BAR_5 && flags & PCI_BASE_ADDRESS_MEM_TYPE_64) || From patchwork Thu Nov 14 11:03:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 13874967 X-Patchwork-Delegate: kw@linux.com Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3858139CFA for ; Thu, 14 Nov 2024 11:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582226; cv=none; b=dSan6yjtVGcosSnBcZHYTFQXyPo/iOfjEDCs9Z6TJgp5V8xgqYJP0BlktaIwE5yjTkB28xDVGLtkBJoWmdg5/yMHAfn0+9lS0sGhKcf8bHeoI/O2gMSz3+FOCxEfzHoqiEPUlZhLSWDyxrr4deJucuVhqQJHEJm+fOeQ2BAjk60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731582226; c=relaxed/simple; bh=abotO2HAnrJ6WH0HrCwpozQx2eXGtw03RjZB+isfNDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=olZ8g6KJidUMa/zmTRDutAgBx9T0Lr9+HHXE6vuE5XrrDosEvzzxJdygZTlX9lNvpz1GH7OEXD4B4WxBy26QXlGSW3zxktQSA1p9uwt4IFMn5CatC8EH+BN60C3zah+C+jDW4+y2pmpGlWognHh0i8bjUKP3/pUx4CaUqzio2ig= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F966ltl8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F966ltl8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEA58C4CED6; Thu, 14 Nov 2024 11:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731582226; bh=abotO2HAnrJ6WH0HrCwpozQx2eXGtw03RjZB+isfNDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F966ltl8bfsTG7XYONHWalO/5MMWWXUQnGHZTVkN2XNC471h6Olk7fQkNPaRKy4n2 jY1J31jU0wdOfb2kDLg7xTmt/BAVjImGRMO7i8+NotW4GvcpL7P71QWxeh1HGBd8bM Rr5zfq/yAaJyX6TXQ5A354UUH6z987bcACUVHjdXL6lDGT1qbfr6xtjek86ELmvhhw 7jIeOtCLV9yXHxtI8HTFgM0dZeeHIZXVLOs9Lvxmlq1Dd2gRtqHvny6znhrktw5Km/ HR3RVgRo3uJ54MF1fbHJ22WTjVt5tlAmDAUF3gDkOTVNYl1osXnEq5VtW7r+NY7gSE Ia7r1c8h5K6cg== From: Niklas Cassel To: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas Cc: Damien Le Moal , Frank Li , Jesper Nilsson , Niklas Cassel , linux-pci@vger.kernel.org Subject: [PATCH 3/3] PCI: dwc: ep: Improve alignment check in dw_pcie_prog_ep_inbound_atu() Date: Thu, 14 Nov 2024 12:03:29 +0100 Message-ID: <20241114110326.1891331-8-cassel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241114110326.1891331-5-cassel@kernel.org> References: <20241114110326.1891331-5-cassel@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4206; i=cassel@kernel.org; h=from:subject; bh=abotO2HAnrJ6WH0HrCwpozQx2eXGtw03RjZB+isfNDE=; b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGNJNb/zX5WnrrRL+UX+A8bZi5MrJblu2mcZaTNZ78fNXn srjNceOdJSyMIhxMciKKbL4/nDZX9ztPuW44h0bmDmsTCBDGLg4BWAizAWMDHOb/+u5Rv5vYuTi kjRR/rwz6k7C9wlbBPd8EbmUdfIQ0x+G/67rutQ3TM3Sfh288fHfmJavfqy5Oaab8pLfOqsxhpQ 28QIA X-Developer-Key: i=cassel@kernel.org; a=openpgp; fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA dw_pcie_prog_ep_inbound_atu() is used to program an inbound iATU in "BAR Match Mode". While a memory address returned by kmalloc() is guaranteed to be naturally aligned (aligned to the size of the allocation), it is not guaranteed that the address that is supplied to pci_epc_set_bar() (and thus the addres that is supplied to dw_pcie_prog_ep_inbound_atu()) is naturally aligned. See the register description for IATU_LWR_TARGET_ADDR_OFF_INBOUND_i, specifically fields LWR_TARGET_RW and LWR_TARGET_HW in the DWC Databook. "Field size depends on log2(BAR_MASK+1) in BAR match mode." I.e. only the upper bits are writable, and the number of writable bits is dependent on the configured BAR_MASK. Add a check to ensure that the physical address programmed in the iATU is aligned to the size of the BAR (BAR_MASK+1), as without this, we can get hard to debug errors, as we could write to bits that are read-only (without getting a write error), which could cause the iATU to end up redirecting to a physical address that is different from the address that we intended. Signed-off-by: Niklas Cassel --- drivers/pci/controller/dwc/pcie-designware-ep.c | 8 +++++--- drivers/pci/controller/dwc/pcie-designware.c | 5 +++-- drivers/pci/controller/dwc/pcie-designware.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 507e40bd18c8f..4ad6ebd2ea320 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -128,7 +128,8 @@ static int dw_pcie_ep_write_header(struct pci_epc *epc, u8 func_no, u8 vfunc_no, } static int dw_pcie_ep_inbound_atu(struct dw_pcie_ep *ep, u8 func_no, int type, - dma_addr_t cpu_addr, enum pci_barno bar) + dma_addr_t cpu_addr, enum pci_barno bar, + size_t size) { int ret; u32 free_win; @@ -145,7 +146,7 @@ static int dw_pcie_ep_inbound_atu(struct dw_pcie_ep *ep, u8 func_no, int type, } ret = dw_pcie_prog_ep_inbound_atu(pci, func_no, free_win, type, - cpu_addr, bar); + cpu_addr, bar, size); if (ret < 0) { dev_err(pci->dev, "Failed to program IB window\n"); return ret; @@ -229,7 +230,8 @@ static int dw_pcie_ep_set_bar(struct pci_epc *epc, u8 func_no, u8 vfunc_no, else type = PCIE_ATU_TYPE_IO; - ret = dw_pcie_ep_inbound_atu(ep, func_no, type, epf_bar->phys_addr, bar); + ret = dw_pcie_ep_inbound_atu(ep, func_no, type, epf_bar->phys_addr, bar, + size); if (ret) return ret; diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c index 6d6cbc8b5b2c6..3c683b6119c39 100644 --- a/drivers/pci/controller/dwc/pcie-designware.c +++ b/drivers/pci/controller/dwc/pcie-designware.c @@ -597,11 +597,12 @@ int dw_pcie_prog_inbound_atu(struct dw_pcie *pci, int index, int type, } int dw_pcie_prog_ep_inbound_atu(struct dw_pcie *pci, u8 func_no, int index, - int type, u64 cpu_addr, u8 bar) + int type, u64 cpu_addr, u8 bar, size_t size) { u32 retries, val; - if (!IS_ALIGNED(cpu_addr, pci->region_align)) + if (!IS_ALIGNED(cpu_addr, pci->region_align) || + !IS_ALIGNED(cpu_addr, size)) return -EINVAL; dw_pcie_writel_atu_ib(pci, index, PCIE_ATU_LOWER_TARGET, diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 347ab74ac35aa..fc08727116725 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -491,7 +491,7 @@ int dw_pcie_prog_outbound_atu(struct dw_pcie *pci, int dw_pcie_prog_inbound_atu(struct dw_pcie *pci, int index, int type, u64 cpu_addr, u64 pci_addr, u64 size); int dw_pcie_prog_ep_inbound_atu(struct dw_pcie *pci, u8 func_no, int index, - int type, u64 cpu_addr, u8 bar); + int type, u64 cpu_addr, u8 bar, size_t size); void dw_pcie_disable_atu(struct dw_pcie *pci, u32 dir, int index); void dw_pcie_setup(struct dw_pcie *pci); void dw_pcie_iatu_detect(struct dw_pcie *pci);