LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Len Brown <lenb@kernel.org>
Cc: Dave Jones <davej@codemonkey.org.uk>,
	linux-acpi@vger.kernel.org, Adam M Belay <abelay@mit.edu>,
	Zhao Yakui <yakui.zhao@intel.com>,
	Li Shaohua <shaohua.li@intel.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Rene Herman <rene.herman@keyaccess.nl>
Subject: Re: PNP: dynamic pnp resources
Date: Thu, 13 Mar 2008 13:04:08 +0100	[thread overview]
Message-ID: <1205409848.29877.358.camel@queen.suse.de> (raw)
In-Reply-To: <200803121345.21297.lenb@kernel.org>

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




  parent reply	other threads:[~2008-03-13 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 15:14 PNP: increase the maximum number of resources Dave Jones
2008-03-12 17:08 ` Olivier Galibert
2008-03-12 17:45 ` Len Brown
2008-03-13  0:16   ` Rene Herman
2008-03-13 12:04   ` Thomas Renninger [this message]
2008-03-13 15:17     ` PNP: dynamic pnp resources 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=1205409848.29877.358.camel@queen.suse.de \
    --to=trenn@suse.de \
    --cc=abelay@mit.edu \
    --cc=bjorn.helgaas@hp.com \
    --cc=davej@codemonkey.org.uk \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    --cc=shaohua.li@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).