[PATCH 3/4] pci: improve debug output

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Apr 13 16:58:15 PDT 2018


Hello,

On Sat, Apr 14, 2018 at 01:30:52AM +0200, Uwe Kleine-König wrote:
>  		if (ALIGN(*last, size) + size > dev->bus->resource[restype]->end) {
> -			pr_debug("BAR does not fit within bus %s res\n", type);
> +			pr_debug(" pbar%d: !! type=%s allocbase=0x%08x + size=0x%08x > resource_end=%pa (barval=%08x)\n",
> +				 bar, type, ALIGN(*last, size), size, &dev->bus->resource[restype]->end, barval);

slightly related: I have a machine where this new line results in:

	pci:  pbar0: !! type=NP allocbase=0x01800000 + size=0x00800000 > resource_end=0x01efffff (barval=ff800000)

This makes me wonder if the LHS of the check needs to read

	ALIGN(*last, size) + size - 1

. I will think about this after sleeping, and then probably send a patch
for that.

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the barebox mailing list