Re: [PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-16 Thread Bjorn Helgaas
On Wed, May 11, 2016 at 12:27:14PM -0400, Prarit Bhargava wrote:
> commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
> non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
> BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
> non-compliant BARs") introduces a check for non_compliant_bars to avoid
> assigning resources to the individual BARs for a device.
> 
> Before these commits,
> 
> pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
> pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
> pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
> pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
> pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
> pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
> pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
> pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
> pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
> pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
> pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
> 
> After the commits, there are still "failed to assign" messages,
> as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
> 7f:12.0, and 7f:1e.3.
> 
>  pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
>  pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
>  pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
>  pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
>  pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
>  pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
>  pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
>  pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
>  pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
>  pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
>  pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> 
> There are two issues that need to be fixed.  The first is that there is 
> another
> device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
> in the same way. After applying the first patch in this patchset the log still
> contains these messages:
> 
> pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> 
> This second patch fixes these issues by moving the non_compliant_bars_check to
> pci_read_bases() where it applies to all of a device's BARs.
> 
> v2: Separate into two patches.  Applied non_compliant_bars check to
> pci_read_bases().  Added additional explanation to the commit log from
> the BDW errata for the Home Agent devices.
> 
> Cc: Bjorn Helgaas 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: "H. Peter Anvin" 
> Cc: x...@kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Andi Kleen 
> Signed-off-by: Prarit Bhargava 
> 
> Prarit Bhargava (2):
>   x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
> 1
>   x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
> non-compliant BARs
> 
>  arch/x86/pci/fixup.c |9 +
>  drivers/pci/probe.c  |6 +++---
>  2 files changed, 12 insertions(+), 3 deletions(-)

I applied these to pci/resource and intend to merge them for v4.7.


Re: [PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-16 Thread Bjorn Helgaas
On Wed, May 11, 2016 at 12:27:14PM -0400, Prarit Bhargava wrote:
> commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
> non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
> BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
> non-compliant BARs") introduces a check for non_compliant_bars to avoid
> assigning resources to the individual BARs for a device.
> 
> Before these commits,
> 
> pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
> pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
> pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
> pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
> pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
> pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
> pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
> pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
> pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
> pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
> pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
> pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
> pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
> pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
> 
> After the commits, there are still "failed to assign" messages,
> as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
> 7f:12.0, and 7f:1e.3.
> 
>  pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
>  pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
>  pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
>  pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
>  pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
>  pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
>  pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
>  pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
>  pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
>  pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
>  pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
>  pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> 
> There are two issues that need to be fixed.  The first is that there is 
> another
> device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
> in the same way. After applying the first patch in this patchset the log still
> contains these messages:
> 
> pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
> pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
> 
> This second patch fixes these issues by moving the non_compliant_bars_check to
> pci_read_bases() where it applies to all of a device's BARs.
> 
> v2: Separate into two patches.  Applied non_compliant_bars check to
> pci_read_bases().  Added additional explanation to the commit log from
> the BDW errata for the Home Agent devices.
> 
> Cc: Bjorn Helgaas 
> Cc: Thomas Gleixner 
> Cc: Ingo Molnar 
> Cc: "H. Peter Anvin" 
> Cc: x...@kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Andi Kleen 
> Signed-off-by: Prarit Bhargava 
> 
> Prarit Bhargava (2):
>   x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
> 1
>   x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
> non-compliant BARs
> 
>  arch/x86/pci/fixup.c |9 +
>  drivers/pci/probe.c  |6 +++---
>  2 files changed, 12 insertions(+), 3 deletions(-)

I applied these to pci/resource and intend to merge them for v4.7.


[PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-11 Thread Prarit Bhargava
commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
non-compliant BARs") introduces a check for non_compliant_bars to avoid
assigning resources to the individual BARs for a device.

Before these commits,

pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]

After the commits, there are still "failed to assign" messages,
as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
7f:12.0, and 7f:1e.3.

 pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

There are two issues that need to be fixed.  The first is that there is another
device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
in the same way. After applying the first patch in this patchset the log still
contains these messages:

pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

This second patch fixes these issues by moving the non_compliant_bars_check to
pci_read_bases() where it applies to all of a device's BARs.

v2: Separate into two patches.  Applied non_compliant_bars check to
pci_read_bases().  Added additional explanation to the commit log from
the BDW errata for the Home Agent devices.

Cc: Bjorn Helgaas 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: "H. Peter Anvin" 
Cc: x...@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Andi Kleen 
Signed-off-by: Prarit Bhargava 

Prarit Bhargava (2):
  x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
1
  x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
non-compliant BARs

 arch/x86/pci/fixup.c |9 +
 drivers/pci/probe.c  |6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
1.7.9.3



[PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-11 Thread Prarit Bhargava
commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
non-compliant BARs") introduces a check for non_compliant_bars to avoid
assigning resources to the individual BARs for a device.

Before these commits,

pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]

After the commits, there are still "failed to assign" messages,
as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
7f:12.0, and 7f:1e.3.

 pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

There are two issues that need to be fixed.  The first is that there is another
device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
in the same way. After applying the first patch in this patchset the log still
contains these messages:

pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

This second patch fixes these issues by moving the non_compliant_bars_check to
pci_read_bases() where it applies to all of a device's BARs.

v2: Separate into two patches.  Applied non_compliant_bars check to
pci_read_bases().  Added additional explanation to the commit log from
the BDW errata for the Home Agent devices.

Cc: Bjorn Helgaas 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: "H. Peter Anvin" 
Cc: x...@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Andi Kleen 
Signed-off-by: Prarit Bhargava 

Prarit Bhargava (2):
  x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
1
  x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
non-compliant BARs

 arch/x86/pci/fixup.c |9 +
 drivers/pci/probe.c  |6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
1.7.9.3



[PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-11 Thread Prarit Bhargava
commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
non-compliant BARs") introduces a check for non_compliant_bars to avoid
assigning resources to the individual BARs for a device.

Before these commits,

pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]

After the commits, there are still "failed to assign" messages,
as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
7f:12.0, and 7f:1e.3.

 pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

There are two issues that need to be fixed.  The first is that there is another
device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
in the same way. After applying the first patch in this patchset the log still
contains these messages:

pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

This second patch fixes these issues by moving the non_compliant_bars_check to
pci_read_bases() where it applies to all of a device's BARs.

v2: Separate into two patches.  Applied non_compliant_bars check to
pci_read_bases().  Added additional explanation to the commit log from
the BDW errata for the Home Agent devices.

Cc: Bjorn Helgaas 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: "H. Peter Anvin" 
Cc: x...@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Andi Kleen 
Signed-off-by: Prarit Bhargava 

Prarit Bhargava (2):
  x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
1
  x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
non-compliant BARs

 arch/x86/pci/fixup.c |9 +
 drivers/pci/probe.c  |6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
1.7.9.3



[PATCH 0/2 v2] Fix Broadwell-EP Home Agent & PCU non-compliant BARs

2016-05-11 Thread Prarit Bhargava
commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
non-compliant BARs") marks Home Agent 0 & PCU has having non-compliant
BARs.  commit b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with
non-compliant BARs") introduces a check for non_compliant_bars to avoid
assigning resources to the individual BARs for a device.

Before these commits,

pci :ff:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :ff:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
pci :7f:12.0: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.0: BAR 5: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]

After the commits, there are still "failed to assign" messages,
as well as new "failed to assign" messages for ff:12.0, ff:1e.3,
7f:12.0, and 7f:1e.3.

 pci :ff:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :ff:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :ff:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:12.4: BAR 2: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 4: failed to assign [mem size 0x0040]
 pci :7f:12.4: BAR 1: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 3: failed to assign [mem size 0x0010]
 pci :7f:12.4: BAR 5: failed to assign [mem size 0x0010]
 pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
 pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

There are two issues that need to be fixed.  The first is that there is another
device, Home Agent 1 & PCU (device ID 0x6f60) that must also be "blacklisted"
in the same way. After applying the first patch in this patchset the log still
contains these messages:

pci :ff:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :ff:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.0: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:12.4: BAR 6: failed to assign [mem size 0x0001 pref]
pci :7f:1e.3: BAR 6: failed to assign [mem size 0x0001 pref]

This second patch fixes these issues by moving the non_compliant_bars_check to
pci_read_bases() where it applies to all of a device's BARs.

v2: Separate into two patches.  Applied non_compliant_bars check to
pci_read_bases().  Added additional explanation to the commit log from
the BDW errata for the Home Agent devices.

Cc: Bjorn Helgaas 
Cc: Thomas Gleixner 
Cc: Ingo Molnar 
Cc: "H. Peter Anvin" 
Cc: x...@kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Andi Kleen 
Signed-off-by: Prarit Bhargava 

Prarit Bhargava (2):
  x86/PCI: Add pci_bdwep_bar() quirk entry for Broadwell-EP Home Agent
1
  x86/PCI: Disable IO/MEM decoding for ROM BARs for devices with
non-compliant BARs

 arch/x86/pci/fixup.c |9 +
 drivers/pci/probe.c  |6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

-- 
1.7.9.3