Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[patch 00/37] PNP resource_table cleanups

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bjorn.helgaas at hp

Mar 26, 2008, 10:10 AM

Post #1 of 11 (249 views)
Permalink
[patch 00/37] PNP resource_table cleanups

This series of patches does some PNP housecleaning and
consolidation.

PNP currently uses a fixed-size table (pnp_resource_table)
to track the IO, MMIO, IRQ, and DMA resources used by a
device. Some motherboard devices have many resources, so
we've been plagued by table overflows and we've had to
drastically increase the table size, which wastes a lot
of memory.

The end goal is to replace that fixed-size table with something
more dynamic. These patches don't go that far, but they do make
pnp_resource_table private to the PNP core and centralize all
references to it in a small set of shared functions.

In addition, this series contains a number of related
cleanups, like centralized allocation of struct pnp_dev,
conversion to dev_printk when possible, removing many
PNP core internal functions from the public interface,
and alignment of the ISAPNP, PNPBIOS, and PNPACPI backends.

Bjorn
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


lenb at kernel

Mar 26, 2008, 3:42 PM

Post #2 of 11 (244 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

i386:

#1 errs.ACPI.ACPI_DEBUG.ACPI_PROCFS.HIBERNATION.X86_LOCAL_APIC.X86_IO_APIC
Cleaning...Building...
ERROR: "pnp_get_resource" [sound/oss/sb.ko] undefined!
ERROR: "pnp_get_resource" [sound/oss/ad1848.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/wavefront/snd-wavefront.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-sscape.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-opl3sa2.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-es18xx.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-dt019x.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-cmi8330.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-azt2320.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/snd-als100.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/sb/snd-sbawe.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/sb/snd-sb16.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/sb/snd-es968.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/opti9xx/snd-opti93x.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/opti9xx/snd-opti92x-cs4231.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/opti9xx/snd-opti92x-ad1848.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/gus/snd-interwave.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/gus/snd-interwave-stb.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/cs423x/snd-cs4236.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/cs423x/snd-cs4232.ko] undefined!
ERROR: "pnp_get_resource" [sound/isa/ad1816a/snd-ad1816a.ko] undefined!
ERROR: "pnp_get_resource" [sound/drivers/mpu401/snd-mpu401.ko] undefined!
ERROR: "pnp_get_resource" [drivers/watchdog/sc1200wdt.ko] undefined!
ERROR: "pnp_get_resource" [drivers/telephony/ixj.ko] undefined!
ERROR: "pnp_get_resource" [drivers/scsi/sym53c416.ko] undefined!
ERROR: "pnp_get_resource" [drivers/scsi/g_NCR5380_mmio.ko] undefined!
ERROR: "pnp_get_resource" [drivers/scsi/g_NCR5380.ko] undefined!
ERROR: "pnp_get_resource" [drivers/scsi/aha1542.ko] undefined!
ERROR: "pnp_get_resource" [drivers/scsi/aha152x.ko] undefined!
ERROR: "pnp_get_resource" [drivers/pcmcia/i82365.ko] undefined!
ERROR: "pnp_get_resource" [drivers/parport/parport_pc.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/smc-ultra.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/sb1000.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/ne.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/irda/smsc-ircc2.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/irda/nsc-ircc.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/3c515.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/3c509.ko] undefined!
ERROR: "pnp_get_resource" [drivers/mmc/host/wbsd.ko] undefined!
ERROR: "pnp_get_resource" [drivers/media/radio/radio-sf16fmi.ko] undefined!
ERROR: "pnp_get_resource" [drivers/media/radio/radio-cadet.ko] undefined!
ERROR: "pnp_get_resource" [drivers/isdn/hisax/hisax_fcpcipnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/isdn/hisax/hisax.ko] undefined!
ERROR: "pnp_get_resource" [drivers/input/gameport/ns558.ko] undefined!
ERROR: "pnp_get_resource" [drivers/ide/ide-pnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_tis.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_infineon.ko] undefined!
Build FAILED

x86_64:

#33 errs.allmodconfig
Cleaning...Building...
ERROR: "pnp_get_resource" [sound/oss/sb.ko] undefined!
ERROR: "pnp_get_resource" [sound/drivers/mpu401/snd-mpu401.ko] undefined!
ERROR: "pnp_get_resource" [drivers/watchdog/sc1200wdt.ko] undefined!
ERROR: "pnp_get_resource" [drivers/serial/8250_pnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/rtc/rtc-cmos.ko] undefined!
ERROR: "pnp_get_resource" [drivers/parport/parport_pc.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/sb1000.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/irda/smsc-ircc2.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/irda/nsc-ircc.ko] undefined!
ERROR: "pnp_get_resource" [drivers/mmc/host/wbsd.ko] undefined!
ERROR: "pnp_get_resource" [drivers/input/serio/i8042.ko] undefined!
ERROR: "pnp_get_resource" [drivers/input/gameport/ns558.ko] undefined!
ERROR: "pnp_get_resource" [drivers/ide/ide-pnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_tis.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_infineon.ko] undefined!
Build FAILED


ia64:

#9 errs.allmodconfig
Cleaning...Building...
ERROR: "pnp_get_resource" [sound/drivers/mpu401/snd-mpu401.ko] undefined!
ERROR: "pnp_get_resource" [drivers/serial/8250_pnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/parport/parport_pc.ko] undefined!
ERROR: "pnp_get_resource" [drivers/net/sb1000.ko] undefined!
ERROR: "pnp_get_resource" [drivers/input/serio/i8042.ko] undefined!
ERROR: "pnp_get_resource" [drivers/input/gameport/ns558.ko] undefined!
ERROR: "pnp_get_resource" [drivers/ide/ide-pnp.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_tis.ko] undefined!
ERROR: "pnp_get_resource" [drivers/char/tpm/tpm_infineon.ko] undefined!
Build FAILED
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bjorn.helgaas at hp

Mar 26, 2008, 4:13 PM

Post #3 of 11 (246 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On Wednesday 26 March 2008 04:42:10 pm Len Brown wrote:
> i386:
>
> #1 errs.ACPI.ACPI_DEBUG.ACPI_PROCFS.HIBERNATION.X86_LOCAL_APIC.X86_IO_APIC
> Cleaning...Building...
> ERROR: "pnp_get_resource" [sound/oss/sb.ko] undefined!
> ERROR: "pnp_get_resource" [sound/oss/ad1848.ko] undefined!

Oops, sorry, I forgot to export pnp_get_resource(). I'll post an
updated patch as a response to the original. Is that easy for you
to handle, Len? If not, let me know what you'd prefer.

Bjorn

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rene.herman at keyaccess

Mar 26, 2008, 5:30 PM

Post #4 of 11 (240 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On 27-03-08 00:13, Bjorn Helgaas wrote:

> Oops, sorry, I forgot to export pnp_get_resource(). I'll post an updated
> patch as a response to the original. Is that easy for you to handle,
> Len? If not, let me know what you'd prefer.

Works for me at least. Only had time for a quick test. After applying these,
my snd-cs4236 driver ISAPnP soundcard is no longer found.

Rene.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bjorn.helgaas at hp

Mar 27, 2008, 10:50 AM

Post #5 of 11 (237 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On Wednesday 26 March 2008 06:30:16 pm Rene Herman wrote:
> On 27-03-08 00:13, Bjorn Helgaas wrote:
>
> > Oops, sorry, I forgot to export pnp_get_resource(). I'll post an updated
> > patch as a response to the original. Is that easy for you to handle,
> > Len? If not, let me know what you'd prefer.
>
> Works for me at least. Only had time for a quick test. After applying these,
> my snd-cs4236 driver ISAPnP soundcard is no longer found.

Are any ISAPNP devices at all found? It's possible I broke ISAPNP
completely, because I don't have anything to test it with. If you
have a chance, maybe you could turn on CONFIG_PNP_DEBUG and send me
a dmesg log.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rene.herman at keyaccess

Mar 31, 2008, 12:40 PM

Post #6 of 11 (232 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On 27-03-08 18:50, Bjorn Helgaas wrote:

> Are any ISAPNP devices at all found?

Yes, but at most 100 * 10^4 / 2^16 percent of them. Trouble is in 04/37:

http://lkml.org/lkml/2008/3/26/273

The numeric part of the ID is a 4-digit hexadecimal value, not just decimal,
so '0'+ don't work. Unfortunately, that one has a few dependents, so you'll
probably want to restructure things yourself. If I just place the attached
on top, the card's found again.

Not too much avail unfortunately, as I then get a resource assignment
problem with your patches:

pnp: the driver 'cs4236_isapnp' has been registered
cs4236_isapnp 01:01.00: driver attached
cs4236_isapnp 01:01.02: driver attached
cs4236_isapnp 01:01.03: driver attached
cs4236_isapnp 01:01.00: unable to assign resources
CS4236+ WSS PnP configure failed for WSS (out of resources?)
isapnp detection failed and probing for CS4236+ is not supported

(and exact same thing for snd-es18xx) which I'll try to look at next, but
this ID thing will certainly need a fix first.

Rene.
Attachments: isapnp_to_pnpid.diff (0.89 KB)


rene.herman at keyaccess

Mar 31, 2008, 12:48 PM

Post #7 of 11 (233 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On 31-03-08 21:40, Rene Herman wrote:

> On 27-03-08 18:50, Bjorn Helgaas wrote:
>
>> Are any ISAPNP devices at all found?
>
> Yes, but at most 100 * 10^4 / 2^16 percent of them. Trouble is in 04/37:

Well, that should read "Yes, no less than 100 * 10^4 / 2^16 percent of them
even" but you get the point...

Rene.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


bjorn.helgaas at hp

Mar 31, 2008, 1:51 PM

Post #8 of 11 (232 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On Monday 31 March 2008 01:40:03 pm Rene Herman wrote:
> On 27-03-08 18:50, Bjorn Helgaas wrote:
>
> > Are any ISAPNP devices at all found?
>
> Yes, but at most 100 * 10^4 / 2^16 percent of them. Trouble is in 04/37:
>
> http://lkml.org/lkml/2008/3/26/273
>
> The numeric part of the ID is a 4-digit hexadecimal value, not just decimal,
> so '0'+ don't work. Unfortunately, that one has a few dependents, so you'll
> probably want to restructure things yourself. If I just place the attached
> on top, the card's found again.

Ah, right. Thanks for tracking that down. I forgot to factor out
isapnp_to_pnpid() and pnpid32_to_pnpid() (and acpi_ex_eisa_id_to_string()
for that matter, though that's buried in the ACPI CA)-- they're really
doing the same thing and we should only need one copy (plus the CA
one).

> Not too much avail unfortunately, as I then get a resource assignment
> problem with your patches:
>
> pnp: the driver 'cs4236_isapnp' has been registered
> cs4236_isapnp 01:01.00: driver attached
> cs4236_isapnp 01:01.02: driver attached
> cs4236_isapnp 01:01.03: driver attached
> cs4236_isapnp 01:01.00: unable to assign resources
> CS4236+ WSS PnP configure failed for WSS (out of resources?)
> isapnp detection failed and probing for CS4236+ is not supported
>
> (and exact same thing for snd-es18xx) which I'll try to look at next, but
> this ID thing will certainly need a fix first.

Hmmm... that sounds harder. I'll read over it again and see if I
can figure anything out.

Bjorn

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rene.herman at keyaccess

Mar 31, 2008, 2:38 PM

Post #9 of 11 (232 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On 31-03-08 22:51, Bjorn Helgaas wrote:

> Ah, right. Thanks for tracking that down. I forgot to factor out
> isapnp_to_pnpid() and pnpid32_to_pnpid() (and acpi_ex_eisa_id_to_string()
> for that matter, though that's buried in the ACPI CA)-- they're really
> doing the same thing and we should only need one copy (plus the CA
> one).

I'll wait for another round then, before reviewing this further.

> Hmmm... that sounds harder. I'll read over it again and see if I
> can figure anything out.

Actually, other than looking right past it a few dozen times, it's fairly
evident. If I apply the attached, my soundcard's functional again.

Rene.
Attachments: pnp_check_resource.diff (1.43 KB)


rene.herman at keyaccess

Apr 1, 2008, 3:16 AM

Post #10 of 11 (231 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On 31-03-08 23:38, Rene Herman wrote:
> On 31-03-08 22:51, Bjorn Helgaas wrote:
>
>> Ah, right. Thanks for tracking that down. I forgot to factor out
>> isapnp_to_pnpid() and pnpid32_to_pnpid() (and acpi_ex_eisa_id_to_string()
>> for that matter, though that's buried in the ACPI CA)-- they're really
>> doing the same thing and we should only need one copy (plus the CA
>> one).
>
> I'll wait for another round then, before reviewing this further.

There's actually a hex_asc() helper in kernel.h, so before you overlook it
as well, this is a somewhat nicer ID fix.

Rene.
Attachments: isapnp_to_pnpid2.diff (0.90 KB)


bjorn.helgaas at hp

Apr 1, 2008, 7:52 AM

Post #11 of 11 (220 views)
Permalink
Re: [patch 00/37] PNP resource_table cleanups [In reply to]

On Tuesday 01 April 2008 04:16:10 am Rene Herman wrote:
> On 31-03-08 23:38, Rene Herman wrote:
> > On 31-03-08 22:51, Bjorn Helgaas wrote:
> >
> >> Ah, right. Thanks for tracking that down. I forgot to factor out
> >> isapnp_to_pnpid() and pnpid32_to_pnpid() (and acpi_ex_eisa_id_to_string()
> >> for that matter, though that's buried in the ACPI CA)-- they're really
> >> doing the same thing and we should only need one copy (plus the CA
> >> one).
> >
> > I'll wait for another round then, before reviewing this further.
>
> There's actually a hex_asc() helper in kernel.h, so before you overlook it
> as well, this is a somewhat nicer ID fix.

Thanks, I didn't know about hex_asc()! I'll post v2 of the series today.
And thanks a lot for finding those typos in resource.c. I never would
have found those...

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.