[EXT] Re: [RESEND PATCH v8 net-next 03/15] net: mvpp2: add CM3 SRAM memory map

Stefan Chulski stefanc at marvell.com
Sun Feb 7 11:51:53 EST 2021


> > +		priv->sram_pool = of_gen_pool_get(dn, "cm3-mem", 0);
> > +		if (!priv->sram_pool) {
> > +			if (!defer_once) {
> > +				defer_once = true;
> > +				/* Try defer once */
> > +				return -EPROBE_DEFER;
> > +			}
> > +			dev_warn(&pdev->dev, "DT is too old, Flow control
> not supported\n");
> > +			return -ENOMEM;
> > +		}
> > +		/* cm3_base allocated with offset zero into the SRAM since
> mapping size
> > +		 * is equal to requested size.
> > +		 */
> > +		priv->cm3_base = (void __iomem *)gen_pool_alloc(priv-
> >sram_pool,
> > +
> 	MSS_SRAM_SIZE);
> > +		if (!priv->cm3_base)
> > +			return -ENOMEM;
> > +	}
> 
> For v2 i asked:
> 
> > I'm wondering if using a pool even makes sense. The ACPI case just
> > ioremap() the memory region. Either this memory is dedicated, and then
> > there is no need to use a pool, or the memory is shared, and at some
> > point the ACPI code is going to run into problems when some other
> > driver also wants access.
> 
> There was never an answer to this.

Sorry probably missed this. Currently this memory not shared and I can just ioremap same way as in ACPI case.
In this case I can remove EPROBE_DEFER.

Thanks,
Stefan.



More information about the linux-arm-kernel mailing list