linux-next: build failure after merge of the pci tree
Subsystems (2)
Hi Bjorn,
After merging the pci tree, today's linux-next build (powerpc allnoconfig) failed like this:
ld: drivers/pci/pci.o: in function `pci_bus_error_reset':
pci.c:(.text+0x5fba): undefined reference to `pci_slot_mutex'
ld: pci.c:(.text+0x5fc2): undefined reference to `pci_slot_mutex'
Caused by commit
131b0ca2c7b2 ("PCI/ERR: Use slot reset if available")
I have applied the following hack for today (there is probably a better way):
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Sep 2018 14:55:37 +1000
Subject: [PATCH] pci: move pci_slot_mutex so it is available where needed
--- drivers/pci/pci.c | 2 ++ drivers/pci/slot.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/pci/pci.c +2 -0
@@ -5190,6 +5190,8 @@ static int pci_bus_reset(struct pci_bus *bus, int probe)return ret; } +DEFINE_MUTEX (pci_slot_mutex); +/** * pci_bus_error_reset - reset the bridge's subordinate bus * @bridge: The parent device that connects to the bus to reset
drivers/pci/slot.c +0 -1
@@ -14,7 +14,6 @@struct kset *pci_slots_kset;EXPORT_SYMBOL_GPL (pci_slots_kset); -DEFINE_MUTEX (pci_slot_mutex);static ssize_t pci_slot_attr_show (struct kobject *kobj,struct attribute *attr,char *buf)
Signature · 5 lines
2.18.0 -- Cheers, Stephen Rothwell
Quoted 9 lines · Stephen Rothwell
Hi Bjorn,
After merging the pci tree, today's linux-next build (powerpc allnoconfig) failed like this:
ld:
drivers/pci/pci.o: in function `pci_bus_error_reset':
pci.c:(.text+0x5fba): undefined reference to `pci_slot_mutex'
ld: pci.c:(.text+0x5fc2): undefined reference to `pci_slot_mutex'
Quoted 6 lines
Caused by commit
131b0ca2c7b2("PCI/ERR: Use slot reset if available")I have applied the following hack for today (there is probably a better way):
Thanks for the notice. Does this mean you don't have CONFIG_SYSFS? I must admit I missed that connection for building slot.c.
Quoted 38 lines
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Sep 2018 14:55:37 +1000
Subject: [PATCH] pci: movepci_slot_mutexso it is available where neededFixes 131b0ca2c7b2 ("PCI/ERR: Use slot reset if available")Signed-off-by Stephen Rothwell <[email protected]>--- drivers/pci/pci.c | 2 ++ drivers/pci/slot.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)drivers/pci/pci.c +2
-0@@ -5190,6 +5190,8 @@ static int pci_bus_reset(struct pci_bus *bus, int probe)return ret; } +DEFINE_MUTEX (pci_slot_mutex); +/** * pci_bus_error_reset - reset the bridge's subordinate bus * @bridge: The parent device that connects to the bus to reset drivers/pci/slot.c +0
-1@@ -14,7 +14,6 @@struct kset *pci_slots_kset;EXPORT_SYMBOL_GPL (pci_slots_kset); -DEFINE_MUTEX (pci_slot_mutex);static ssize_t pci_slot_attr_show (struct kobject *kobj,struct attribute *attr,char *buf)Signature · 1 line
2.18.0
Quoted 51 lines · Keith Busch
Quoted 9 lines · Stephen Rothwell
Hi Bjorn,
After merging the pci tree, today's linux-next build (powerpc allnoconfig) failed like this:
ld:
drivers/pci/pci.o: in function `pci_bus_error_reset':
pci.c:(.text+0x5fba): undefined reference to `pci_slot_mutex'
ld: pci.c:(.text+0x5fc2): undefined reference to `pci_slot_mutex'Quoted 6 lines
Caused by commit
131b0ca2c7b2("PCI/ERR: Use slot reset if available")I have applied the following hack for today (there is probably a better way):
Thanks for the notice. Does this mean you don't have
CONFIG_SYSFS? I must admit I missed that connection for buildingslot.c.Quoted 30 lines
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Sep 2018 14:55:37 +1000
Subject: [PATCH] pci: movepci_slot_mutexso it is available where neededFixes 131b0ca2c7b2 ("PCI/ERR: Use slot reset if available")Signed-off-by Stephen Rothwell <[email protected]>--- drivers/pci/pci.c | 2 ++ drivers/pci/slot.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)drivers/pci/pci.c +2
-0@@ -5190,6 +5190,8 @@ static int pci_bus_reset(struct pci_bus *bus, int probe)return ret; } +DEFINE_MUTEX (pci_slot_mutex); +/** * pci_bus_error_reset - reset the bridge's subordinate bus * @bridge: The parent device that connects to the bus to reset drivers/pci/slot.c +0
-0@@ -14,7 +14,6 @@
Quoted 8 lines
Quoted 8 lines
drivers/pci/slot.c +0
-1struct kset *pci_slots_kset;EXPORT_SYMBOL_GPL (pci_slots_kset); -DEFINE_MUTEX (pci_slot_mutex);static ssize_t pci_slot_attr_show (struct kobject *kobj,struct attribute *attr,char *buf)Signature · 1 line
2.18.0
There's unfortunately second bug here when there are no slots, which would be the case without CONFIG_SYSFS: the slot list is empty, and the function just returned success, but it should have gone to the default secondary bus reset behavior in that case. I'll send a patch shortly.
Bjorn Helgaas
maintainerQuoted 57 lines · Keith Busch
Quoted 55 lines · Keith Busch
Quoted 9 lines · Stephen Rothwell
Hi Bjorn,
After merging the pci tree, today's linux-next build (powerpc allnoconfig) failed like this:
ld:
drivers/pci/pci.o: in function `pci_bus_error_reset':
pci.c:(.text+0x5fba): undefined reference to `pci_slot_mutex'
ld: pci.c:(.text+0x5fc2): undefined reference to `pci_slot_mutex'Quoted 6 lines
Caused by commit
131b0ca2c7b2("PCI/ERR: Use slot reset if available")I have applied the following hack for today (there is probably a better way):
Thanks for the notice. Does this mean you don't have
CONFIG_SYSFS? I must admit I missed that connection for buildingslot.c.Quoted 34 lines
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Sep 2018 14:55:37 +1000
Subject: [PATCH] pci: movepci_slot_mutexso it is available where neededFixes 131b0ca2c7b2 ("PCI/ERR: Use slot reset if available")Signed-off-by Stephen Rothwell <[email protected]>--- drivers/pci/pci.c | 2 ++ drivers/pci/slot.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)drivers/pci/pci.c +2
-0@@ -5190,6 +5190,8 @@ static int pci_bus_reset(struct pci_bus *bus, int probe)return ret; } +DEFINE_MUTEX (pci_slot_mutex); +/** * pci_bus_error_reset - reset the bridge's subordinate bus * @bridge: The parent device that connects to the bus to reset drivers/pci/slot.c +0
-1@@ -14,7 +14,6 @@struct kset *pci_slots_kset;EXPORT_SYMBOL_GPL (pci_slots_kset); -DEFINE_MUTEX (pci_slot_mutex);
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
drivers/pci/slot.c +0
-1static ssize_t pci_slot_attr_show (struct kobject *kobj,struct attribute *attr,char *buf) --2.18.0
There's unfortunately second bug here when there are no slots, which would be the case without
CONFIG_SYSFS: the slot list is empty, and the function just returned success, but it should have gone to the default secondary bus reset behavior in that case. I'll send a patch shortly.
I folded in Keith's patch for this, so you should be able to drop your workaround, Stephen.
Hi Bjorn,
Quoted 7 lines · On Wed, 26 Sep 2018 14:48:10 -0500 Bjorn Helgaas <[email protected]> wrote:
Quoted 5 lines · Keith Busch
Quoted 3 lines · Keith Busch
Thanks for the notice. Does this mean you don't have
CONFIG_SYSFS? I must admit I missed that connection for buildingslot.c.
Yes, it was an "allnoconfig" powerpc build.
Quoted 7 lines
Quoted 4 lines
There's unfortunately second bug here when there are no slots, which would be the case without
CONFIG_SYSFS: the slot list is empty, and the function just returned success, but it should have gone to the default secondary bus reset behavior in that case. I'll send a patch shortly.I folded in Keith's patch for this, so you should be able to drop your workaround, Stephen.
OK, thanks.
Signature · 2 lines
Cheers, Stephen Rothwell