All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version
@ 2017-09-15 12:18 Sascha El-Sharkawy
  2017-09-19 17:10 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha El-Sharkawy @ 2017-09-15 12:18 UTC (permalink / raw)
  To: linux-pci

I just recognized that my last mail misses some line breaks corrupting the patch. This fixes the broken patch.

Best regards,
Sascha

Signed-off-by:  Sascha El-Sharkawy <elscha@sse.uni-hildesheim.de>
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c32a77fc8b03..675d79c52709 100644
--- 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.




> On Fri, 15 Sep 2017 at 01:34PM +0200, Sascha El-Sharkawy wrote
> 
> 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 <elscha@sse.uni-hildesheim.de> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c32a77fc8b03..675d79c52709 100644
> --- 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
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version
  2017-09-15 12:18 [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version Sascha El-Sharkawy
@ 2017-09-19 17:10 ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-09-19 17:10 UTC (permalink / raw)
  To: Sascha El-Sharkawy; +Cc: linux-pci

Hi Sascha,

This needs a changelog.  Can you take a look through the linux-pci
archives and follow the style there (format of subject line, contents
of changelog, etc)?  I *can* fix all that up myself, but it goes a lot
faster if you can save me the trouble.

Bjorn

On Fri, Sep 15, 2017 at 02:18:56PM +0200, Sascha El-Sharkawy wrote:
> I just recognized that my last mail misses some line breaks corrupting the patch. This fixes the broken patch.
> 
> Best regards,
> Sascha
> 
> Signed-off-by:  Sascha El-Sharkawy <elscha@sse.uni-hildesheim.de>
> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c32a77fc8b03..675d79c52709 100644
> --- 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.
> 
> 
> 
> 
> > On Fri, 15 Sep 2017 at 01:34PM +0200, Sascha El-Sharkawy wrote
> > 
> > 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 <elscha@sse.uni-hildesheim.de> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index c32a77fc8b03..675d79c52709 100644
> > --- 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
> > 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version
  2017-08-23  6:22 Sascha El-Sharkawy
@ 2017-09-14  8:01 ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-09-14  8:01 UTC (permalink / raw)
  To: Sascha El-Sharkawy; +Cc: bhelgaas, linux-pci, Klaus Schmid

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/tree/Documentation/process/submitting-patches.rst

Bjorn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version
@ 2017-08-23  6:22 Sascha El-Sharkawy
  2017-09-14  8:01 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Sascha El-Sharkawy @ 2017-08-23  6:22 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, Klaus Schmid

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

Hi,


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.

Best regards,
Sascha

-- -----------------------------------------------------------------------
Sascha El-Sharkawy, MSc 
University of Hildesheim                    Tel.: +49 (0) 5121 / 883-40336  
Institute of Computer Science               Fax:  +49 (0) 5121 / 883-40337
Universitaetsplatz 1                           elscha@sse.uni-hildesheim.de
D-31141 Hildesheim, Germany               http://www.sse.uni-hildesheim.de



[-- Attachment #2: PCI_REALLOC_ENABLE_AUTO.patch.gz --]
[-- Type: application/x-gzip, Size: 519 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-19 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 12:18 [PATCH] PCI SUBSYSTEM allows inconsistent configuration, current Kernel version Sascha El-Sharkawy
2017-09-19 17:10 ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2017-08-23  6:22 Sascha El-Sharkawy
2017-09-14  8:01 ` Bjorn Helgaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.