lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ia64 misc fixes [2/5]

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.041 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site