linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci, add FW_BUG warning to pci= kernel option
@ 2014-11-01 18:11 Prarit Bhargava
  2014-11-11  3:59 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Prarit Bhargava @ 2014-11-01 18:11 UTC (permalink / raw)
  To: linux-pci; +Cc: Prarit Bhargava, Myron Stowe

The kernel should boot PCI without the use of kernel parameters.  Display
a FW_BUG warning when pci= is used.

Cc: Myron Stowe <mstowe@redhat.com>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
---
 drivers/pci/pci.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 625a4ac..5172060b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4515,6 +4515,8 @@ static int __init pci_setup(char *str)
 		}
 		str = k;
 	}
+	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
+	pr_crit(FW_BUG "The PCI configuration has been overridden thorugh the use of pci=.  Please report the issue you are attempting to resolve to your hardware vendor.\n");
 	return 0;
 }
 early_param("pci", pci_setup);
-- 
1.7.9.3


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

* Re: [PATCH] pci, add FW_BUG warning to pci= kernel option
  2014-11-01 18:11 [PATCH] pci, add FW_BUG warning to pci= kernel option Prarit Bhargava
@ 2014-11-11  3:59 ` Bjorn Helgaas
  2014-11-17 23:42   ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2014-11-11  3:59 UTC (permalink / raw)
  To: Prarit Bhargava
  Cc: linux-pci, Myron Stowe, linux-kernel, linux-arch, Linus Torvalds

[+cc lkml, linux-arch, Linus]

On Sat, Nov 01, 2014 at 02:11:19PM -0400, Prarit Bhargava wrote:
> The kernel should boot PCI without the use of kernel parameters.  Display
> a FW_BUG warning when pci= is used.
> 
> Cc: Myron Stowe <mstowe@redhat.com>
> Cc: linux-pci@vger.kernel.org
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> ---
>  drivers/pci/pci.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 625a4ac..5172060b 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4515,6 +4515,8 @@ static int __init pci_setup(char *str)
>  		}
>  		str = k;
>  	}
> +	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
> +	pr_crit(FW_BUG "The PCI configuration has been overridden thorugh the use of pci=.  Please report the issue you are attempting to resolve to your hardware vendor.\n");

My goal is to be able to boot without any "pci=" parameters, so from that
perspective, I like this.

When people have a problem booting Linux, they often try a variety of
things like "pci=assign-busses", "pci=nocrs", "pci=nomsi", "pci=nommconf",
"pci=noacpi", etc.  If they find something that works, there's a tendency
to treat that as a "solution."  I'd rather that they report it, so we can
try to fix the bug or add a quirk so the *next* person won't have to figure
out the right parameters to use.

My worry is that there are a few things where Linux isn't smart enough to
do the right thing automatically, and I don't think we'll have a good
solution in the near future.  For example:

    pci=norom
    pci=pcie_bus_perf,pcie_bus_safe,etc.
    pci=cbiosize=...
    pci=cbmemsize=...
    pci=resource_alignment=...
    pci=hpiosize=...
    pci=hpmemsize=...
    pci=realloc

I don't like the fact that these options exist, but I suspect there are
users that do depend on them and might find this warning too aggressive.

So I'm interested in opinions on whether this is a good idea at all and
whether we should exclude some options from the warning/tainting.

Bjorn

>  	return 0;
>  }
>  early_param("pci", pci_setup);
> -- 
> 1.7.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] pci, add FW_BUG warning to pci= kernel option
  2014-11-11  3:59 ` Bjorn Helgaas
@ 2014-11-17 23:42   ` Bjorn Helgaas
  2014-11-18 12:42     ` Prarit Bhargava
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2014-11-17 23:42 UTC (permalink / raw)
  To: Prarit Bhargava
  Cc: linux-pci, Myron Stowe, linux-kernel, Linux-Arch, Linus Torvalds

On Mon, Nov 10, 2014 at 8:59 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> [+cc lkml, linux-arch, Linus]
>
> On Sat, Nov 01, 2014 at 02:11:19PM -0400, Prarit Bhargava wrote:
>> The kernel should boot PCI without the use of kernel parameters.  Display
>> a FW_BUG warning when pci= is used.
>>
>> Cc: Myron Stowe <mstowe@redhat.com>
>> Cc: linux-pci@vger.kernel.org
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> ---
>>  drivers/pci/pci.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index 625a4ac..5172060b 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -4515,6 +4515,8 @@ static int __init pci_setup(char *str)
>>               }
>>               str = k;
>>       }
>> +     add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
>> +     pr_crit(FW_BUG "The PCI configuration has been overridden thorugh the use of pci=.  Please report the issue you are attempting to resolve to your hardware vendor.\n");
>
> My goal is to be able to boot without any "pci=" parameters, so from that
> perspective, I like this.
>
> When people have a problem booting Linux, they often try a variety of
> things like "pci=assign-busses", "pci=nocrs", "pci=nomsi", "pci=nommconf",
> "pci=noacpi", etc.  If they find something that works, there's a tendency
> to treat that as a "solution."  I'd rather that they report it, so we can
> try to fix the bug or add a quirk so the *next* person won't have to figure
> out the right parameters to use.
>
> My worry is that there are a few things where Linux isn't smart enough to
> do the right thing automatically, and I don't think we'll have a good
> solution in the near future.  For example:
>
>     pci=norom
>     pci=pcie_bus_perf,pcie_bus_safe,etc.
>     pci=cbiosize=...
>     pci=cbmemsize=...
>     pci=resource_alignment=...
>     pci=hpiosize=...
>     pci=hpmemsize=...
>     pci=realloc
>
> I don't like the fact that these options exist, but I suspect there are
> users that do depend on them and might find this warning too aggressive.
>
> So I'm interested in opinions on whether this is a good idea at all and
> whether we should exclude some options from the warning/tainting.

Hi Prarit,

We didn't get any nibbles :)

I don't think we can realistically taint the kernel for *all* "pci="
options.  So if you want to pursue this, maybe you could enhance this
so we can have a whitelist of options that we will support without
tainting.  Then we can argue about what should be on the list and go
from there.  Does that seem reasonable?

This is a somewhat more aggressive use of tainting than we've had in
the past, so we might have to iterate on this a bit.

Bjorn

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

* Re: [PATCH] pci, add FW_BUG warning to pci= kernel option
  2014-11-17 23:42   ` Bjorn Helgaas
@ 2014-11-18 12:42     ` Prarit Bhargava
  2014-11-18 14:00       ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Prarit Bhargava @ 2014-11-18 12:42 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-pci, Myron Stowe, linux-kernel, Linux-Arch, Linus Torvalds



On 11/17/2014 06:42 PM, Bjorn Helgaas wrote:
> On Mon, Nov 10, 2014 at 8:59 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> [+cc lkml, linux-arch, Linus]
>>
>> On Sat, Nov 01, 2014 at 02:11:19PM -0400, Prarit Bhargava wrote:
>>> The kernel should boot PCI without the use of kernel parameters.  Display
>>> a FW_BUG warning when pci= is used.
>>>
>>> Cc: Myron Stowe <mstowe@redhat.com>
>>> Cc: linux-pci@vger.kernel.org
>>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>>> ---
>>>  drivers/pci/pci.c |    2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>>> index 625a4ac..5172060b 100644
>>> --- a/drivers/pci/pci.c
>>> +++ b/drivers/pci/pci.c
>>> @@ -4515,6 +4515,8 @@ static int __init pci_setup(char *str)
>>>               }
>>>               str = k;
>>>       }
>>> +     add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
>>> +     pr_crit(FW_BUG "The PCI configuration has been overridden thorugh the use of pci=.  Please report the issue you are attempting to resolve to your hardware vendor.\n");
>>
>> My goal is to be able to boot without any "pci=" parameters, so from that
>> perspective, I like this.
>>
>> When people have a problem booting Linux, they often try a variety of
>> things like "pci=assign-busses", "pci=nocrs", "pci=nomsi", "pci=nommconf",
>> "pci=noacpi", etc.  If they find something that works, there's a tendency
>> to treat that as a "solution."  I'd rather that they report it, so we can
>> try to fix the bug or add a quirk so the *next* person won't have to figure
>> out the right parameters to use.
>>
>> My worry is that there are a few things where Linux isn't smart enough to
>> do the right thing automatically, and I don't think we'll have a good
>> solution in the near future.  For example:
>>
>>     pci=norom
>>     pci=pcie_bus_perf,pcie_bus_safe,etc.
>>     pci=cbiosize=...
>>     pci=cbmemsize=...
>>     pci=resource_alignment=...
>>     pci=hpiosize=...
>>     pci=hpmemsize=...
>>     pci=realloc
>>
>> I don't like the fact that these options exist, but I suspect there are
>> users that do depend on them and might find this warning too aggressive.
>>
>> So I'm interested in opinions on whether this is a good idea at all and
>> whether we should exclude some options from the warning/tainting.
> 
> Hi Prarit,
> 
> We didn't get any nibbles :)
> 
> I don't think we can realistically taint the kernel for *all* "pci="
> options.  So if you want to pursue this, maybe you could enhance this
> so we can have a whitelist of options that we will support without
> tainting.  Then we can argue about what should be on the list and go
> from there.  Does that seem reasonable?

Sorry for the lower-case typing.  I broke my elbow and am down to one hand.

bjorn, yep sounds reasonable.  i'll do this (slowly unfortunately because of my
arm) ...

P.

> 
> This is a somewhat more aggressive use of tainting than we've had in
> the past, so we might have to iterate on this a bit.
> 
> Bjorn
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] pci, add FW_BUG warning to pci= kernel option
  2014-11-18 12:42     ` Prarit Bhargava
@ 2014-11-18 14:00       ` Bjorn Helgaas
  0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2014-11-18 14:00 UTC (permalink / raw)
  To: Prarit Bhargava
  Cc: linux-pci, Myron Stowe, linux-kernel, Linux-Arch, Linus Torvalds

On Tue, Nov 18, 2014 at 5:42 AM, Prarit Bhargava <prarit@redhat.com> wrote:

> Sorry for the lower-case typing.  I broke my elbow and am down to one hand.
>
> bjorn, yep sounds reasonable.  i'll do this (slowly unfortunately because of my
> arm) ...

Ouch, sorry to hear that.  We need to get working on that direct
mind-computer interface :)  Hope your elbow heals well!

Bjorn

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

end of thread, other threads:[~2014-11-18 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-01 18:11 [PATCH] pci, add FW_BUG warning to pci= kernel option Prarit Bhargava
2014-11-11  3:59 ` Bjorn Helgaas
2014-11-17 23:42   ` Bjorn Helgaas
2014-11-18 12:42     ` Prarit Bhargava
2014-11-18 14:00       ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).