public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@codemonkey.org.uk>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: Li Shaohua <shaohua.li@intel.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Thomas Renninger <trenn@suse.de>, Len Brown <len.brown@intel.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: PNP: increase the maximum number of resources
Date: Wed, 12 Mar 2008 11:14:52 -0400	[thread overview]
Message-ID: <20080312151452.GA4523@codemonkey.org.uk> (raw)

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

             reply	other threads:[~2008-03-12 15:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 15:14 Dave Jones [this message]
2008-03-12 17:08 ` PNP: increase the maximum number of resources Olivier Galibert
2008-03-12 17:45 ` Len Brown
2008-03-13  0:16   ` Rene Herman
2008-03-13 12:04   ` PNP: dynamic pnp resources Thomas Renninger
2008-03-13 15:17     ` Bjorn Helgaas
2008-03-17 22:31     ` Rene Herman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080312151452.GA4523@codemonkey.org.uk \
    --to=davej@codemonkey.org.uk \
    --cc=bjorn.helgaas@hp.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=trenn@suse.de \
    --cc=yakui.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox