Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1166184imm; Wed, 26 Sep 2018 12:50:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ie7YeCPo+LFrWUasbXQ3ZdDZlsOEMYuHLyuw9vN3W3k9JH17eEaYpoUfBdqPri1OHz+y6 X-Received: by 2002:a65:41c6:: with SMTP id b6-v6mr7101070pgq.174.1537991400789; Wed, 26 Sep 2018 12:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537991400; cv=none; d=google.com; s=arc-20160816; b=YpXBhR9X2dYIQp0AQKuOzU8vGulpzL8JAcEfRlbfAVV2OdeXpKhvbWnLzKRFj/P5mE cOP2ic9uP2X+gwcK9w+7n8oQcVwwzNtQY31tC6JcB7OS+aIWC7C7DrVwqj20KwOZWLn9 B56huYfiyuO6lprw4py5AJIpNlol7C0K9m5TRoIbfyFjCnUFhaEhqxjswXMv644L0TbR sJfzHvSgPs4pvnYzGHvpQvc6Pl05lqipttYr9BcDGKnFTO+GgbRR98f7jlVVc8ucy7Gq Pl2JPjRg1XMceRGSS/01kJpicg7QbBN80v+RrPzjWaUNjKGtuA72pbXKcVFhHraMy4Lv NRlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=O/Ni5qmta3WyPruumK25iSu8XeGsUBcijA1J9mhHkHQ=; b=lbx3QzbxcNfMwJnzX+HPKgNKO2rMwou+nFKTsiDw+9Ab70KuXcmDy1gbU3ScTYXozC +JUa1OHYyyedaQSpsT//toJ8n9YeFz+UBrLg8QJxN8iWJE5m43xGZAS2APgt1MdQSASv tO/lJ86KIKiQulyzCV2kGw6JCboy/eMdzl/o4CrCp4K9R6BnHPWLZCzbk8fUYJwIHEV4 byXoTWkd1bFJNmWxh7agsQZb+DIkbzISXlz7exVDAcCvdFqNKM9JuRcfCVnnLg4q2Wye IJgNs5raSROT1viqb5HeeOEenaLRILvHzqAX5bs/xJBiPHhwf7Cp3h2wvYf1MF5Z1Tga HiNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k7PiHkdT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20-v6si5874913pgb.239.2018.09.26.12.49.46; Wed, 26 Sep 2018 12:50:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=k7PiHkdT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbeI0CCz (ORCPT + 99 others); Wed, 26 Sep 2018 22:02:55 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:44023 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbeI0CCy (ORCPT ); Wed, 26 Sep 2018 22:02:54 -0400 Received: by mail-yb1-f196.google.com with SMTP id w80-v6so69984ybe.10 for ; Wed, 26 Sep 2018 12:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O/Ni5qmta3WyPruumK25iSu8XeGsUBcijA1J9mhHkHQ=; b=k7PiHkdT8lBwpVCut+nwkRkpNLaEAfeMt8nV8gByniagQtlKDnnoaZkwlY7gU0QWpM MaKT65QHYdy8dckUFjBYn1QuljAieO4wMNBxD+q/dPhw1kBsP7ikM+HOkVH31N8ORW2h mfjZlI7RbYc6Mt7sIaEDM2OfOYtu1q5RXkZSMH6pvuvXskkI2kNMx9aeQBeFvoykbHmo RNj4imJpgtKIBTPTlcOC2GBbvcJTXDLGPWoe+voQTt/7MPbkt3X+ZnZgAIk6OOBxJGOd 7ZEzBwdO8qS3VEAskGiZ2IVteft9nChbTbN9p43CTJoQ/3djkfZ5/v5lSgotgP2YYuEe WiRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=O/Ni5qmta3WyPruumK25iSu8XeGsUBcijA1J9mhHkHQ=; b=Zqdck7ItAY8yXWaLs/nLud3480Gsdz85dlz1wj//2Nm9FzxNoJM0eSC5uZtC20FEg+ s2aExzy3o3Te2b2eZ8dOzFE8DDW5atQkNUletHOk1f2HzVlmN2XIzTDgJSd9eD7OBOQT O8nunwT29Z6+7kCdzZwWPg8jl0ErfehKWsvsfbsC4N6WaRSg8LrpCIo0KKkYMP8G8cFb HW3+nj0k52qtYqxa3T2Sd2BS/2D4MMMny7uKrvVTKRG8eYlSPG7pNO/QbJqVfh3A3oEd kpKt1gJUgli+Amiy4V5xsebpOwOb6aqpuVtK530PONceGzOc71qIri4Cg8gIol6rGzUt szEg== X-Gm-Message-State: ABuFfoge/VZwmPgdR2W120Mc8tTk+ez866pRVZotIvFN/Tc4ZRjTRJmy C0tRzPV9hgPyFFOGJZ2PlBz4+CsnDzLpHh4/cJQ4 X-Received: by 2002:a25:a207:: with SMTP id b7-v6mr3979620ybi.186.1537991301810; Wed, 26 Sep 2018 12:48:21 -0700 (PDT) MIME-Version: 1.0 References: <20180926150051.6ee97aae@canb.auug.org.au> <20180926142540.GB14407@localhost.localdomain> <20180926145820.GA14688@localhost.localdomain> In-Reply-To: <20180926145820.GA14688@localhost.localdomain> From: Bjorn Helgaas Date: Wed, 26 Sep 2018 14:48:10 -0500 Message-ID: Subject: Re: linux-next: build failure after merge of the pci tree To: Keith Busch Cc: Stephen Rothwell , linux-next list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 26, 2018 at 9:56 AM Keith Busch wrote: > > On Wed, Sep 26, 2018 at 08:25:40AM -0600, Keith Busch wrote: > > On Wed, Sep 26, 2018 at 03:00:51PM +1000, Stephen Rothwell wrote: > > > 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): > > > > Thanks for the notice. Does this mean you don't have CONFIG_SYSFS? I > > must admit I missed that connection for building slot.c. > > > > > > > From: Stephen Rothwell > > > Date: Wed, 26 Sep 2018 14:55:37 +1000 > > > Subject: [PATCH] pci: move pci_slot_mutex so it is available where needed > > > > > > Fixes: 131b0ca2c7b2 ("PCI/ERR: Use slot reset if available") > > > Signed-off-by: Stephen Rothwell > > > --- > > > drivers/pci/pci.c | 2 ++ > > > drivers/pci/slot.c | 1 - > > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > > > index 8c1e99a637d8..1fa67db6b21e 100644 > > > --- a/drivers/pci/pci.c > > > +++ b/drivers/pci/pci.c > > > @@ -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 > > > diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c > > > index 3da03fcc6fbf..c46d5e1ff536 100644 > > > --- a/drivers/pci/slot.c > > > +++ b/drivers/pci/slot.c > > > @@ -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) > > > -- > > > 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.