All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux: pci/iomulti: adjustments for CONFIG_HOTPLUG_PCI=m
@ 2010-07-09  9:06 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2010-07-09  9:06 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]

The code supposed to deal with hot added/removed devices is also needed
when the core PCI hotplug code lives in a module.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- a/drivers/pci/iomulti.c
+++ b/drivers/pci/iomulti.c
@@ -246,7 +246,7 @@ static void pci_iomul_switch_add_locked(
 	list_add(&sw->list, &switch_list);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_switch_del_locked(struct pci_iomul_switch *sw)
 {
 	BUG_ON(!mutex_is_locked(&switch_list_lock));
@@ -339,7 +339,7 @@ static void pci_iomul_slot_add_locked(st
 	list_add(&slot->sibling, &sw->slots);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_slot_del_locked(struct pci_iomul_switch *sw,
 				       struct pci_iomul_slot *slot)
 {
@@ -897,7 +899,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_
 			quirk_iomul_reassign_ioresource);
 
 /*****************************************************************************/
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static int __devinit __pci_iomul_notifier_del_device(struct pci_dev *pdev)
 {
 	struct pci_iomul_switch *sw;
@@ -992,7 +994,7 @@ static int __devinit pci_iomul_notifier(
 	return 0;
 }
 
-static struct notifier_block pci_iomul_nb = {
+static struct notifier_block __devinitdata pci_iomul_nb = {
         .notifier_call = pci_iomul_notifier,
 };
 
@@ -1381,7 +1383,7 @@ static const struct file_operations pci_
 	.fops = &pci_iomul_fops,
 };
 
-static int pci_iomul_init(void)
+static int __init pci_iomul_init(void)
 {
 	int error;
 	error = misc_register(&pci_iomul_miscdev);




[-- Attachment #2: xenlinux-pci-iomulti-hotplug.patch --]
[-- Type: text/plain, Size: 1838 bytes --]

Subject: pci/iomulti: adjustments for CONFIG_HOTPLUG_PCI=m

The code supposed to deal with hot added/removed devices is also needed
when the core PCI hotplug code lives in a module.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- a/drivers/pci/iomulti.c
+++ b/drivers/pci/iomulti.c
@@ -246,7 +246,7 @@ static void pci_iomul_switch_add_locked(
 	list_add(&sw->list, &switch_list);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_switch_del_locked(struct pci_iomul_switch *sw)
 {
 	BUG_ON(!mutex_is_locked(&switch_list_lock));
@@ -339,7 +339,7 @@ static void pci_iomul_slot_add_locked(st
 	list_add(&slot->sibling, &sw->slots);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_slot_del_locked(struct pci_iomul_switch *sw,
 				       struct pci_iomul_slot *slot)
 {
@@ -897,7 +899,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_
 			quirk_iomul_reassign_ioresource);
 
 /*****************************************************************************/
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static int __devinit __pci_iomul_notifier_del_device(struct pci_dev *pdev)
 {
 	struct pci_iomul_switch *sw;
@@ -992,7 +994,7 @@ static int __devinit pci_iomul_notifier(
 	return 0;
 }
 
-static struct notifier_block pci_iomul_nb = {
+static struct notifier_block __devinitdata pci_iomul_nb = {
         .notifier_call = pci_iomul_notifier,
 };
 
@@ -1381,7 +1383,7 @@ static const struct file_operations pci_
 	.fops = &pci_iomul_fops,
 };
 
-static int pci_iomul_init(void)
+static int __init pci_iomul_init(void)
 {
 	int error;
 	error = misc_register(&pci_iomul_miscdev);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-09  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09  9:06 [PATCH] linux: pci/iomulti: adjustments for CONFIG_HOTPLUG_PCI=m Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.