From: Rajesh Shah <rajesh.shah@intel.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Re: Latest bk kernel does not properly free PCI IO & MEM allocations
Date: Tue, 15 Mar 2005 06:11:14 +0000 [thread overview]
Message-ID: <20050314221113.A22357@unix-os.sc.intel.com> (raw)
In-Reply-To: <422F42A9.7050009@sgi.com>
On Sun, Mar 13, 2005 at 12:49:42AM +0000, prarit wrote:
>
> I'll go back to work and pull out the oops' etc.
>
> > Anyway, I'll add the basic, NULL out the pointer and check for it patch
> > to the tree soon, so that your oops should not happen anymore.
>
> Thanks Greg :) I've tested with that patch and it
> seems better. IMO though, we still have a glitch
> in PCI. I'm not convinced that it should be calling
> pci_free_resources at all.
>
Note that ia64 arch code calls pci_claim_resources() at bus
scan time (in pcibios_fixup_bus()). This adds the resources
in pci_dev structure to the resource list, even before the
corresponding driver is loaded. It is fairly common for a
device driver to then call pci_request_regions() when it is
loaded. This causes a new resource descriptor to be allocated
and added to the resource list. For example, on my tiger4
ia64 system, /proc/iomem shows:
<snip>
f9000000-fbffffff : PCI Bus 0000:00
f9ff0000-f9ff03ff : 0000:00:1d.7
f9ff0000-f9ff03ff : ehci_hcd
fa000000-faffffff : 0000:01:01.0
fbfa0000-fbfbffff : 0000:01:01.0
fbfd0000-fbfd0fff : 0000:01:01.0
fbfe0000-fbffffff : 0000:01:00.0
fbfe0000-fbffffff : e1000
<snip>
Since we have 2 resource descriptors for the same resource in
some cases, they both do need to be removed at device remove
time. However, I saw only 1 resource in your /proc/iomem (which
was presumably after the driver had loaded). I wonder if this is
the problem in this case.
In any case, claiming and freeing pci resources needs wider
cleanup. See
http://marc.theaimsgroup.com/?l=linux-kernel&m\x110841094228134&w=2
http://marc.theaimsgroup.com/?l=linux-kernel&m\x110842019012889&w=2
for related discussions.
Rajesh
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2005-03-15 6:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 18:38 Latest bk kernel does not properly free PCI IO & MEM allocations Prarit Bhargava
2005-03-10 15:07 ` Prarit Bhargava
2005-03-10 17:17 ` Greg KH
2005-03-10 18:16 ` Prarit Bhargava
2005-03-10 18:50 ` Prarit Bhargava
2005-03-10 23:23 ` Greg KH
2005-03-11 21:30 ` Prarit Bhargava
2005-03-12 7:38 ` Greg KH
2005-03-12 17:04 ` prarit
2005-03-13 0:49 ` Re: Latest bk kernel does not properly free PCI IO & MEM prarit
2005-03-15 6:11 ` Rajesh Shah [this message]
2005-03-15 12:55 ` Latest bk kernel does not properly free PCI IO & MEM allocations Prarit Bhargava
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=20050314221113.A22357@unix-os.sc.intel.com \
--to=rajesh.shah@intel.com \
--cc=linux-hotplug@vger.kernel.org \
/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).