Re: [PATCH v3 04/11] PCI: brcmstb: Expand inbound size calculation helper

From: Bjorn Helgaas
Date: Mon Oct 14 2024 - 12:58:13 EST


On Mon, Oct 14, 2024 at 04:07:03PM +0300, Stanimir Varbanov wrote:
> BCM2712 memory map can supports up to 64GB of system
> memory, thus expand the inbound size calculation in
> helper function up to 64GB.

The fact that the calculation is done in a helper isn't important
here. Can you make the subject line say something about supporting
DMA for up to 64GB of system memory?

This is being done specifically for BCM2712, but I assume it's safe
for *all* brcmstb devices, right?

s/can supports/can support/

Rewrap commit log to fill 75 columns.

> Signed-off-by: Stanimir Varbanov <svarbanov@xxxxxxx>
> Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
> ---
> v2 -> v3:
> - Added Reviewed-by tags.
> - Improved patch description (Florian).
>
> drivers/pci/controller/pcie-brcmstb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
> index 9321280f6edb..b0ef2f31914d 100644
> --- a/drivers/pci/controller/pcie-brcmstb.c
> +++ b/drivers/pci/controller/pcie-brcmstb.c
> @@ -309,8 +309,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
> if (log2_in >= 12 && log2_in <= 15)
> /* Covers 4KB to 32KB (inclusive) */
> return (log2_in - 12) + 0x1c;
> - else if (log2_in >= 16 && log2_in <= 35)
> - /* Covers 64KB to 32GB, (inclusive) */
> + else if (log2_in >= 16 && log2_in <= 36)
> + /* Covers 64KB to 64GB, (inclusive) */
> return log2_in - 15;
> /* Something is awry so disable */
> return 0;
> --
> 2.43.0
>