[U-Boot] [PATCH 031/126] pci: Add more debug detail when resources are exhausted

Bin Meng bmeng.cn at gmail.com
Mon Oct 7 01:40:38 UTC 2019


On Sun, Oct 6, 2019 at 7:19 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> On Sat, Oct 5, 2019 at 9:12 PM Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg at chromium.org> wrote:
> > >
> > > If PCI auto-config runs out of memory, show a few more details to help
> > > diagnose the problem.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > >  drivers/pci/pci_auto_common.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> >
> > Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
>
> applied to u-boot-x86/next, thanks!

It turns out we need do the following to eliminate build warnings on
some boards:

diff --git a/drivers/pci/pci_auto_common.c b/drivers/pci/pci_auto_common.c
index bb56a3d..8690316 100644
--- a/drivers/pci/pci_auto_common.c
+++ b/drivers/pci/pci_auto_common.c
@@ -45,8 +45,9 @@ int pciauto_region_allocate(struct pci_region *res,
pci_size_t size,
        addr = ((res->bus_lower - 1) | (size - 1)) + 1;

        if (addr - res->bus_start + size > res->size) {
-               debug("No room in resource, avail start=%x / size=%x,
need=%x\n",
-                     res->bus_lower, res->size, size);
+               debug("No room in resource, avail start=%llx / size=%llx, "
+                     "need=%llx\n", (unsigned long long)res->bus_lower,
+                     (unsigned long long)res->size, (unsigned long long)size);
                goto error;
        }

Applied the above fix in the same commit, and now in u-boot-x86/next.

Regards,
Bin


More information about the U-Boot mailing list