* Re: PNP: increase the maximum number of resources [not found] <20080312151452.GA4523@codemonkey.org.uk> @ 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 0 siblings, 2 replies; 5+ messages in thread From: Len Brown @ 2008-03-12 17:45 UTC (permalink / raw) To: Dave Jones, linux-acpi, Adam M Belay Cc: Zhao Yakui, Li Shaohua, Bjorn Helgaas, Thomas Renninger, Linux Kernel On Wednesday 12 March 2008, Dave Jones wrote: > 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 In 2.6.23 we had: #define PNP_MAX_PORT 8 #define PNP_MAX_MEM 4 And the kernel silently ignored a BIOS exceeding these limits In 2.6.24 we have: #define PNP_MAX_PORT 40 #define PNP_MAX_MEM 12 And the kernel complains with KERN_ERR when a BIOS has more resources than the kernel can describe within these limits. We know that there are cases where these static limits will be exceeded but refrained from making these numbers larger due to concern about data structure size and expectation that the majory of systems will fit within these limits. (eg. there was one box with about 96 IO resources) I agree that having a KERN_ERR that you know is going to fire is not a good situation. We can either delete or KERN_DEBUG the message if it causes support issues -- for we know that <= 2.6.23 did worse by being silent. Thomas worked on a patch to make resource allocation dynamic and do away with these limits. Unfortunately it was rather large and it wasn't in time for the 2.6.25-rc1 window. So right now we are on a trajectory for 2.6.25 to behave exactly like 2.6.24. Indeed, I don't think that patch made it into the test tree, so unless we revive that patch, it will miss 2.6.26 as well. thanks, -Len ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PNP: increase the maximum number of resources 2008-03-12 17:45 ` PNP: increase the maximum number of resources Len Brown @ 2008-03-13 0:16 ` Rene Herman 2008-03-13 12:04 ` PNP: dynamic pnp resources Thomas Renninger 1 sibling, 0 replies; 5+ messages in thread From: Rene Herman @ 2008-03-13 0:16 UTC (permalink / raw) To: Len Brown Cc: Dave Jones, linux-acpi, Adam M Belay, Zhao Yakui, Li Shaohua, Bjorn Helgaas, Thomas Renninger, Linux Kernel On 12-03-08 18:45, Len Brown wrote: > Thomas worked on a patch to make resource allocation dynamic and do away > with these limits. Unfortunately it was rather large and it wasn't in > time for the 2.6.25-rc1 window. So right now we are on a trajectory > for 2.6.25 to behave exactly like 2.6.24. > Indeed, I don't think that patch made it into the test tree, > so unless we revive that patch, it will miss 2.6.26 as well. It rather violently broke ISAPnP. Rene. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PNP: dynamic pnp resources 2008-03-12 17:45 ` PNP: increase the maximum number of resources Len Brown 2008-03-13 0:16 ` Rene Herman @ 2008-03-13 12:04 ` Thomas Renninger 2008-03-13 15:17 ` Bjorn Helgaas 2008-03-17 22:31 ` Rene Herman 1 sibling, 2 replies; 5+ messages in thread From: Thomas Renninger @ 2008-03-13 12:04 UTC (permalink / raw) To: Len Brown Cc: Dave Jones, linux-acpi, Adam M Belay, Zhao Yakui, Li Shaohua, Bjorn Helgaas, Linux Kernel, Rene Herman On Wed, 2008-03-12 at 13:45 -0400, Len Brown wrote: > On Wednesday 12 March 2008, Dave Jones wrote: ... > Thomas worked on a patch to make resource allocation dynamic and do away > with these limits. Unfortunately it was rather large and it wasn't in > time for the 2.6.25-rc1 window. I had the problem that I could not test on isa systems. Rene Herman helped here a lot. There are still open issues, last state was (comment from Rene): ------------------------ No. Please note we're talking about ISAPnP, not PnPBIOS. No BIOS involved at all. Driver (sound/isa/cs423x/cs4236.c) furthermore does not use anything but the PnP layer itself. Start at snd_cs423x_pnpc_detect, which is the pnp .probe() method. I'll look into providing a more extensive answer and/or test whatever comes in later. ------------------------- I can also look at this, any hints until then are appreciated. I also expect Bjorn was bound to other bugs and pushing things in a rush is not good thing anyway. At the end I asked for a macro problem I only had a rather ugly solution, didn't get an answer (IIRC I also added a compile bug in my suggestions) and things got stuck... Do you want me to rework the patches, lay out where I see problems and give it another try to get this into -mm? I am bound to work the next days, but it shouldn't be that much work after all anymore to summarize things and send something (not sure about the ISA things). Hmm, maybe someone still can give a comment on my last one, it's still valid. I want to check every pnp_{port,mem,irq,dma}_{start,end..} whether they are valid. This macro does not work: +#define pnp_port_start(dev,bar) (pnp_port_valid((dev),(bar)) ? (dev)->res.port_resource[(bar)].start \ + : pnp_dbg("WARN: Port start %d - [%s] invalid - %s:%d", (bar), (dev->name), __FUNCTION__, __LINE__)) The only solution I see is to use small inline functions, but that would blow up include/linux/pnp.h significantly. The idea of the inline functions is stated here: http://kerneltrap.org/mailarchive/linux-kernel/2008/2/6/743614 The warning can also be omitted (the drivers should have checked for valid already - in theory...), but it should at least stay there at the beginning to find drivers who do not check for valid before accessing pnp_resource_table entries. Thomas ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PNP: dynamic pnp resources 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 1 sibling, 0 replies; 5+ messages in thread From: Bjorn Helgaas @ 2008-03-13 15:17 UTC (permalink / raw) To: trenn Cc: Len Brown, Dave Jones, linux-acpi, Adam M Belay, Zhao Yakui, Li Shaohua, Linux Kernel, Rene Herman On Thursday 13 March 2008 06:04:08 am Thomas Renninger wrote: > On Wed, 2008-03-12 at 13:45 -0400, Len Brown wrote: > > On Wednesday 12 March 2008, Dave Jones wrote: > ... > > Thomas worked on a patch to make resource allocation dynamic and do away > > with these limits. Unfortunately it was rather large and it wasn't in > > time for the 2.6.25-rc1 window. > > I had the problem that I could not test on isa systems. > Rene Herman helped here a lot. > There are still open issues, last state was (comment from Rene): > ------------------------ > No. Please note we're talking about ISAPnP, not PnPBIOS. No BIOS > involved at all. > > Driver (sound/isa/cs423x/cs4236.c) furthermore does not use anything but > the PnP layer itself. Start at snd_cs423x_pnpc_detect, which is the > pnp .probe() method. > > I'll look into providing a more extensive answer and/or test whatever > comes in later. > ------------------------- > I can also look at this, any hints until then are appreciated. > > I also expect Bjorn was bound to other bugs and pushing things in a rush > is not good thing anyway. > At the end I asked for a macro problem I only had a rather ugly > solution, didn't get an answer (IIRC I also added a compile bug in my > suggestions) and things got stuck... > > Do you want me to rework the patches, lay out where I see problems and > give it another try to get this into -mm? I'm sorry that I haven't responded to this. I have some reservations, but I wanted to try out some alternate ideas before just being a nay- sayer because usually my grand ideas turn out to have fatal flaws. My current grand but untested idea is that struct pnp_resource_table is too exposed and should be better abstracted, even inside the PNP subsystem. Since PNP is supposed to be a way to discover platform devices, I'm looking at the platform device interfaces for ideas. Whatever we do, I think it has to be done incrementally to make it reviewable and bisectable. Bjorn ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PNP: dynamic pnp resources 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 1 sibling, 0 replies; 5+ messages in thread From: Rene Herman @ 2008-03-17 22:31 UTC (permalink / raw) To: trenn Cc: Len Brown, Dave Jones, linux-acpi, Adam M Belay, Zhao Yakui, Li Shaohua, Bjorn Helgaas, Linux Kernel On 13-03-08 13:04, Thomas Renninger wrote: > I had the problem that I could not test on isa systems. Perhaps we can go organize a fundraiser for SuSE so they can go out and buy an ISAPnP soundcard. I have a few I can sell. I promise I won't overcharge them (much). > Rene Herman helped here a lot. > There are still open issues, last state was (comment from Rene): > ------------------------ > No. Please note we're talking about ISAPnP, not PnPBIOS. No BIOS > involved at all. > > Driver (sound/isa/cs423x/cs4236.c) furthermore does not use anything but > the PnP layer itself. Start at snd_cs423x_pnpc_detect, which is the > pnp .probe() method. > > I'll look into providing a more extensive answer and/or test whatever > comes in later. > ------------------------- Did look, but decided there wasn't much more specifically to add. It's something more fundamental about the flow of things and while the comment above is obviously cynical I did grow a bit tired of a series of patches that just transported the OOPS two lines down again each time, so I held out for Bjorn as well. Still availabe for tests. Rene. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-17 22:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080312151452.GA4523@codemonkey.org.uk>
2008-03-12 17:45 ` PNP: increase the maximum number of resources 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox