Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp862579imm; Wed, 26 Sep 2018 07:57:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV61o9Y5MPHAGjsjeO6iBG8/yO60DuBr5veO17nYejiLgVopzKLarN3A/YICWvUgNjkQKczsb X-Received: by 2002:a62:6643:: with SMTP id a64-v6mr6672349pfc.202.1537973834961; Wed, 26 Sep 2018 07:57:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537973834; cv=none; d=google.com; s=arc-20160816; b=N1t4mK6F/MlQznn0ka3Fh6JLsX/Yrl6OFmrPaNbhzkK6rZAx8uvlWEzs3KKkoQDFy4 Zq+nJdV0rqV6RbSYG99AaN2OCGBWADCSIuiSmd+NU6fSL9sOvfrTM4He34WQHRJXKVbQ MrpANOT4SNiZfolOblDVrSicGJqw51vqA3Jn8tcuWuw5ex3tB4yxLxsh1jfw/uW/tqXj ryRNH3j1GTrPBEgWAvCHgVjT0UDRp49Xw7QcCjroKcdz6XfgDb68BKAgV56AsplFkQwm 3s9oxclvvfROaoTatx6zMdbUxYd1bCqdiB6MPjWy3K163Ims81tnkgtukF3iQS43aFoT 8ceg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wJ/d8+j8gNSSAmPOpoJgMP0alP7cuWKOH7cG6Zk18V8=; b=hsdRAGLymDaYGXoJmXfXONdWXcMaUpeUJVsTN8IHRxUNH1838lOZepxwUe5J5m10Ua CilBr9h6ggc9qDnkJH8Z6f3BG6bejNuHvS309IRfun/vSKe0QpMntOLctN4IH7kRYQhS r1W0FL1iiUK62l5WDnuGV/+U0hDUnr98eIoVn/RU3w4TCG6EspYoPPYE7p/FXJXIKoTq yqg9cO8sMh5TWFVVDC8cGauJobvBZBhL1oaJVZOkY7GknRBfNbyjwMeTkj71t3JU8qFF ut1MjG1eMGtZrIT71IrjisYup+vLua+RYnzDJ34SWq0bVUj2KNSg2cTrCN9chW2yoaEu Goiw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si5109892plk.300.2018.09.26.07.56.59; Wed, 26 Sep 2018 07:57:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728131AbeIZVJm (ORCPT + 99 others); Wed, 26 Sep 2018 17:09:42 -0400 Received: from mga18.intel.com ([134.134.136.126]:15080 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbeIZVJl (ORCPT ); Wed, 26 Sep 2018 17:09:41 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 07:56:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208";a="265904850" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by fmsmga005.fm.intel.com with ESMTP; 26 Sep 2018 07:56:13 -0700 Date: Wed, 26 Sep 2018 08:58:21 -0600 From: Keith Busch To: Stephen Rothwell Cc: Bjorn Helgaas , Linux-Next Mailing List , Linux Kernel Mailing List Subject: Re: linux-next: build failure after merge of the pci tree Message-ID: <20180926145820.GA14688@localhost.localdomain> References: <20180926150051.6ee97aae@canb.auug.org.au> <20180926142540.GB14407@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180926142540.GB14407@localhost.localdomain> User-Agent: Mutt/1.9.1 (2017-09-22) 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 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.