summaryrefslogtreecommitdiff
path: root/arch/s390/pci/pci.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-08-29 21:40:01 +0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-08-30 10:57:20 +0400
commit57b5918c33a0797930c3791fb602a8a9d46ef80c (patch)
tree47e3a5b503e8551f130fb722fbf1ae281e6ed292 /arch/s390/pci/pci.c
parentd03abe5882cc4815bf98c0e01a1deafa4a5d6730 (diff)
downloadlinux-57b5918c33a0797930c3791fb602a8a9d46ef80c.tar.xz
s390/pci: update function handle after resume from hibernate
Function handles may change while the system was in hibernation use list pci functions and update the function handles. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r--arch/s390/pci/pci.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index a7ed6685e7fb..f17a8343e360 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -46,7 +46,7 @@
/* list of all detected zpci devices */
static LIST_HEAD(zpci_list);
-static DEFINE_MUTEX(zpci_list_lock);
+static DEFINE_SPINLOCK(zpci_list_lock);
static void zpci_enable_irq(struct irq_data *data);
static void zpci_disable_irq(struct irq_data *data);
@@ -88,14 +88,14 @@ struct zpci_dev *get_zdev_by_fid(u32 fid)
{
struct zpci_dev *tmp, *zdev = NULL;
- mutex_lock(&zpci_list_lock);
+ spin_lock(&zpci_list_lock);
list_for_each_entry(tmp, &zpci_list, entry) {
if (tmp->fid == fid) {
zdev = tmp;
break;
}
}
- mutex_unlock(&zpci_list_lock);
+ spin_unlock(&zpci_list_lock);
return zdev;
}
@@ -821,9 +821,9 @@ int zpci_create_device(struct zpci_dev *zdev)
if (rc)
goto out_disable;
- mutex_lock(&zpci_list_lock);
+ spin_lock(&zpci_list_lock);
list_add_tail(&zdev->entry, &zpci_list);
- mutex_unlock(&zpci_list_lock);
+ spin_unlock(&zpci_list_lock);
zpci_init_slot(zdev);
@@ -939,3 +939,8 @@ out:
return rc;
}
subsys_initcall_sync(pci_base_init);
+
+void zpci_rescan(void)
+{
+ clp_rescan_pci_devices_simple();
+}