[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080312151452.GA4523@codemonkey.org.uk>
Date: Wed, 12 Mar 2008 11:14:52 -0400
From: Dave Jones <davej@...emonkey.org.uk>
To: Zhao Yakui <yakui.zhao@...el.com>
Cc: Li Shaohua <shaohua.li@...el.com>,
Bjorn Helgaas <bjorn.helgaas@...com>,
Thomas Renninger <trenn@...e.de>,
Len Brown <len.brown@...el.com>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: PNP: increase the maximum number of resources
In commit a7839e960675b549f06209d18283d5cee2ce9261 the number of PNP resources
was increased. In testing, we've found that the 'exceeded' warnings still get
hit with quite high frequency. See https://bugzilla.redhat.com/show_bug.cgi?id=436589
for examples.
I added the debug patch below, which yielded an interesting output.
pnpacpi: exceeded the max number of mem resources. Max:12 Found:12
off by one somewhere ?
Dave
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 6aa231e..0c22e41 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -86,7 +86,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
i++;
if (i >= PNP_MAX_IRQ && !warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ "
- "resources: %d \n", PNP_MAX_IRQ);
+ "resources. Max:%d Found:%d\n", PNP_MAX_IRQ, i);
warned = 1;
return;
}
@@ -188,7 +188,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
res->dma_resource[i].end = dma;
} else if (!warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of DMA "
- "resources: %d \n", PNP_MAX_DMA);
+ "resources. Max:%d Found:%d\n", PNP_MAX_DMA, i);
warned = 1;
}
}
@@ -214,7 +214,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
res->port_resource[i].end = io + len - 1;
} else if (!warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
- "resources: %d \n", PNP_MAX_PORT);
+ "resources. Max:%d Found:%d\n", PNP_MAX_PORT, i);
warned = 1;
}
}
@@ -242,7 +242,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
res->mem_resource[i].end = mem + len - 1;
} else if (!warned) {
printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
- "resources: %d\n", PNP_MAX_MEM);
+ "resources. Max:%d Found:%d\n", PNP_MAX_MEM, i);
warned = 1;
}
}
--
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists