From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next 1/2] PCI: hv: support reporting serial number as slot information Date: Sat, 01 Sep 2018 17:39:25 -0700 (PDT) Message-ID: <20180901.173925.56106529065602504.davem@davemloft.net> References: <20180829162452.25805-1-sthemmin@microsoft.com> <20180829162452.25805-2-sthemmin@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: sthemmin@microsoft.com, linux-pci@vger.kernel.org, haiyangz@microsoft.com, netdev@vger.kernel.org, devel@linuxdriverproject.org To: stephen@networkplumber.org Return-path: In-Reply-To: <20180829162452.25805-2-sthemmin@microsoft.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org From: Stephen Hemminger Date: Wed, 29 Aug 2018 09:24:51 -0700 > + spin_lock_irqsave(&hbus->device_list_lock, flags); > + list_for_each_entry(hpdev, &hbus->children, list_entry) { > + if (hpdev->pci_slot) > + continue; > + > + slot_nr = PCI_SLOT(wslot_to_devfn(hpdev->desc.win_slot.slot)); > + snprintf(name, SLOT_NAME_SIZE, "%u", hpdev->desc.ser); > + hpdev->pci_slot = pci_create_slot(hbus->pci_bus, slot_nr, > + name, NULL); pci_create_slot() takes a mutex, therefore you can't hold a spinlock or disable interrupts here.