[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190211173723.GA31035@e107981-ln.cambridge.arm.com>
Date: Mon, 11 Feb 2019 17:37:32 +0000
From: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To: Kishon Vijay Abraham I <kishon@...com>
Cc: Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Alan Douglas <adouglas@...ence.com>,
Shawn Lin <shawn.lin@...k-chips.com>,
Heiko Stuebner <heiko@...ech.de>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jingoo Han <jingoohan1@...il.com>, linux-omap@...r.kernel.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 08/15] PCI: endpoint: Fix pci_epf_alloc_space to set
correct MEM TYPE flags
On Mon, Jan 14, 2019 at 04:45:06PM +0530, Kishon Vijay Abraham I wrote:
> pci_epf_alloc_space() sets the MEM TYPE flags to indicate a 32-bit
> Base Address Register irrespective of the size. Fix it here to indicate
> 64-bit BAR if the size is > 2GB.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
> ---
> drivers/pci/endpoint/pci-epf-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
This looks like a fix and should me marked as such. Does it work
as as standalone patch if it gets backported ?
Lorenzo
> diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c
> index 825fa24427a3..8bfdcd291196 100644
> --- a/drivers/pci/endpoint/pci-epf-core.c
> +++ b/drivers/pci/endpoint/pci-epf-core.c
> @@ -131,7 +131,9 @@ void *pci_epf_alloc_space(struct pci_epf *epf, size_t size, enum pci_barno bar)
> epf->bar[bar].phys_addr = phys_addr;
> epf->bar[bar].size = size;
> epf->bar[bar].barno = bar;
> - epf->bar[bar].flags = PCI_BASE_ADDRESS_SPACE_MEMORY;
> + epf->bar[bar].flags |= upper_32_bits(size) ?
> + PCI_BASE_ADDRESS_MEM_TYPE_64 :
> + PCI_BASE_ADDRESS_MEM_TYPE_32;
>
> return space;
> }
> --
> 2.17.1
>
Powered by blists - more mailing lists