From: Matthew Wilcox <willy@debian.org>
To: Matthew Wilcox <willy@debian.org>
Cc: Greg KH <greg@kroah.com>,
pcihpd-discuss@lists.sourceforge.net,
linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org
Subject: [PATCH] ia64 misc fixes [2/5]
Date: Fri, 03 Sep 2004 19:32:03 +0000 [thread overview]
Message-ID: <20040903193203.GQ642@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040903193027.GO642@parcelfarce.linux.theplanet.co.uk>
Some miscellaneous fixes:
- flags can be a simple assignment since the resource is newly created
- Zero the allocated memory for the PCI windows
- pcibios_fixup_device_resources is called from pcibios_fixup_bus which
is __devinit, so it cannot be __init.
- pci_claim_resource is called from pcibios_fixup_device_resources so must
also be __devinit.
diff -urpNX build-tools/dontdiff linux-2.6/arch/ia64/pci/pci.c hotplug-2.6/arch/ia64/pci/pci.c
--- linux-2.6/arch/ia64/pci/pci.c 2004-07-20 16:05:26.000000000 -0600
+++ hotplug-2.6/arch/ia64/pci/pci.c 2004-09-02 13:10:03.000000000 -0600
@@ -272,7 +272,7 @@ add_window (struct acpi_resource *res, v
return AE_OK;
window = &info->controller->window[info->controller->windows++];
- window->resource.flags |= flags;
+ window->resource.flags = flags;
window->resource.start = addr.min_address_range;
window->resource.end = addr.max_address_range;
window->offset = offset;
@@ -305,6 +305,7 @@ pci_acpi_scan_root (struct acpi_device *
controller->window = kmalloc(sizeof(*controller->window) * windows, GFP_KERNEL);
if (!controller->window)
goto out2;
+ memset(controller->window, 0, sizeof(*controller->window) * windows);
name = kmalloc(16, GFP_KERNEL);
if (!name)
@@ -325,7 +326,7 @@ out1:
return NULL;
}
-void __init
+void __devinit
pcibios_fixup_device_resources (struct pci_dev *dev, struct pci_bus *bus)
{
struct pci_controller *controller = PCI_CONTROLLER(dev);
diff -urpNX build-tools/dontdiff linux-2.6/drivers/pci/setup-res.c hotplug-2.6/drivers/pci/setup-res.c
--- linux-2.6/drivers/pci/setup-res.c 2004-03-20 13:29:41.000000000 -0700
+++ hotplug-2.6/drivers/pci/setup-res.c 2004-09-02 08:07:37.000000000 -0600
@@ -90,7 +90,7 @@ pci_update_resource(struct pci_dev *dev,
new & ~PCI_REGION_FLAG_MASK));
}
-int __init
+int __devinit
pci_claim_resource(struct pci_dev *dev, int resource)
{
struct resource *res = &dev->resource[resource];
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2004-09-03 19:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-03 19:30 ACPI pci hotplug patch series Matthew Wilcox
2004-09-03 19:31 ` [PATCH] pci_bus_address [1/5] Matthew Wilcox
2004-09-03 19:32 ` Matthew Wilcox [this message]
2004-09-03 19:32 ` [PATCH] acpiphp domain support [3/5] Matthew Wilcox
2004-09-03 19:33 ` [PATCH] acpiphp resource usage [4/5] Matthew Wilcox
2004-09-03 19:33 ` [PATCH] acpiphp misc fixes [5/5] Matthew Wilcox
2004-09-15 18:01 ` [PATCH] build acpiphp modular and on i386/x86_64 [6/5] Matthew Wilcox
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=20040903193203.GQ642@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=greg@kroah.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=pcihpd-discuss@lists.sourceforge.net \
/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