From patchwork Fri Sep 15 11:33:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sascha El-Sharkawy X-Patchwork-Id: 814235 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xttbb4qFBz9s82 for ; Fri, 15 Sep 2017 21:34:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751226AbdIOLed convert rfc822-to-8bit (ORCPT ); Fri, 15 Sep 2017 07:34:33 -0400 Received: from messagesink.samelson.uni-hildesheim.de ([147.172.172.66]:3658 "EHLO messagesink.samelson.uni-hildesheim.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbdIOLed (ORCPT ); Fri, 15 Sep 2017 07:34:33 -0400 Received: from messagesink.samelson.uni-hildesheim.de ([147.172.172.66]) by messagesink.samelson.uni-hildesheim.de ([147.172.172.66]) with mapi; Fri, 15 Sep 2017 13:34:14 +0200 From: Sascha El-Sharkawy To: "linux-pci@vger.kernel.org" CC: Klaus Schmid , "bhelgaas@google.com" Date: Fri, 15 Sep 2017 13:33:51 +0200 Subject: AW: [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version Thread-Topic: [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version Thread-Index: AdMuFnoGGKJ+jCE3RtiPgy/zfwEmHQ== Message-ID: Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Dear Bjorn, Thank you for your help. Blow you'll find the inline patch to ensure the correct Kconfig configuration when PCI_REALLOC_ENABLE_AUTO is selected. Best regards, Sascha El-Sharkawy Signed-off-by: Sascha El-Sharkawy diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c32a77fc8b03..675d79c52709 100644 University of Hildesheim                    Tel.: +49 (0) 5121 / 883-40336 Institute of Computer Science               Fax: +49 (0) 5121 / 883-40337 Universitätsplatz 1                         elscha@sse.uni-hildesheim.de D-31141 Hildesheim, Germany               http://www.sse.uni-hildesheim.de > On Thu, 14 Sep 2017 10:01:17 +0200, Bjorn Helgaas wrote: > > Hi Sascha, > > On Wed, Aug 23, 2017 at 08:22:38AM +0200, Sascha El-Sharkawy wrote: > > We detected that the selection of "PCI resource re-allocation detection" > > (CONFIG_PCI_REALLOC_ENABLE_AUTO) is ignored in some situations. This > > can happen as the related functionality (drivers/pci/setup-bus.c, > > lines 1702 > > - 1738) depends on CONFIG_PCI_REALLOC_ENABLE_AUTO and > CONFIG_PCI_IOV, > > while in Kconfig (drivers/pci/Kconfig, lines 42 - 53) this > > functionality is only controlled by CONFIG_PCI_REALLOC_ENABLE_AUTO. > > > > The dependency on CONFIG_PCI_IOV is only mentioned in the comment > of > > CONFIG_PCI_REALLOC_ENABLE_AUTO, but not checked by Kconfig. As > > CONFIG_PCI_IOV is selected by many other configuration options, we > > expect the failure to happen in very few configurations only, which > > makes it even harder to detect and fix. However, there exist > > configurations that will still be faulty. The suggested fix ensures > > that the re-allocation is always working as specified through an > > automated selection of CONFIG_PCI_IOV if > CONFIG_PCI_REALLOC_ENABLE_AUTO is selected. > > I'm sorry that I missed this patch. I normally work from patchwork > (https://patchwork.ozlabs.org/project/linux-pci/list/), and it > apparently doesn't pick up patches that are attached (or maybe it just > misses gzipped ones). > > Can you please repost this as plain-text email with the patch included > inline, with a changelog and Signed-off-by? Then patchwork should > pick it up and I won't forget about it. > > For details about Signed-off-by, etc, see > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tre > e/Docu mentation/process/submitting-patches.rst > > Bjorn --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -42,13 +42,12 @@ config PCI_DEBUG config PCI_REALLOC_ENABLE_AUTO bool "Enable PCI resource re-allocation detection" depends on PCI + select PCI_IOV help Say Y here if you want the PCI core to detect if PCI resource re-allocation needs to be enabled. You can always use pci=realloc=on - or pci=realloc=off to override it. Note this feature is a no-op - unless PCI_IOV support is also enabled; in that case it will - automatically re-allocate PCI resources if SR-IOV BARs have not - been allocated by the BIOS. + or pci=realloc=off to override it. It will automatically re-allocate + PCI resources if SR-IOV BARs have not been allocated by the BIOS. When in doubt, say N. -- ----------------------------------------------------------------------- Sascha El-Sharkawy, MSc