Bug 73551

Summary: WARNING: CPU: 1 PID: 1 at drivers/pci/search.c:46 pci_find_upstream_pcie_bridge+0x6f/0x80()
Product: Drivers Reporter: Ronald (rwarsow)
Component: PCIAssignee: drivers_pci (drivers_pci)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, alex.williamson, bjorn, rwarsow, szg00000
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 3.14 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
defconfig
lspci
build.log
defconfig
dmesg

Description Ronald 2014-04-04 21:12:38 UTC
Created attachment 131461 [details]
dmesg

I see this bug since Aug. 2013, when CONFIG_INTEL_IOMMU=y is set


Mainboard: Intel DH77KC
CPU:       Intel i5-3475S
Comment 1 Ronald 2014-04-04 21:13:48 UTC
Created attachment 131471 [details]
defconfig

defconfig
Comment 2 Ronald 2014-04-04 21:15:04 UTC
Created attachment 131481 [details]
lspci

lspci -knnv
Comment 3 Ronald 2014-04-04 21:16:57 UTC
more info ?
anything I can do ?
Comment 4 Ronald 2014-04-04 21:30:08 UTC
Arrrggghhh

this bug seems related to

https://bugzilla.kernel.org/show_bug.cgi?id=44881
Comment 5 Bjorn Helgaas 2014-06-03 23:54:04 UTC
Alex Williamson has a patch series that will (I think) resolve this problem.  Alex, can you add a link to the most recent version so Ronald can test it?
Comment 6 Alex Williamson 2014-06-04 00:29:01 UTC
git://github.com/awilliam/linux-vfio.git tag dma-alias-v4

You'll need to add your bridge IDs (0x1283, 0x8892) to drivers/pci/quirks.c the same as https://github.com/awilliam/linux-vfio/blob/dma-alias-v4/drivers/pci/quirks.c line 3409.  Copy that line and replace the IDs with the ones for your bridge at 02:00.0.
Comment 7 Ronald 2014-06-04 09:54:59 UTC
THX 4 services, but it does not compile !

not for kernel 3.14.5 nor 3.15-rc8


to be sure I didn't made a mistake:
- fetched the above quirks.c from github
- put my IDs in this quirks.c
- copied to linux-3.15-rc8/drivers/pci/

is this correct ?


attached the build.log generated with make all -j4 V=1  2>&1 |tee ../build.log
Comment 8 Ronald 2014-06-04 09:56:43 UTC
Created attachment 138071 [details]
build.log

make all -j4 V=1  2>&1 |tee ../build.log
Comment 9 Alex Williamson 2014-06-04 12:46:45 UTC
(In reply to Ronald from comment #7)
> THX 4 services, but it does not compile !
> 
> not for kernel 3.14.5 nor 3.15-rc8
> 
> 
> to be sure I didn't made a mistake:
> - fetched the above quirks.c from github
> - put my IDs in this quirks.c
> - copied to linux-3.15-rc8/drivers/pci/
> 
> is this correct ?

No, there are dependencies far beyond quirks.c.  You need to checkout the dma-alias-v4 tag, modify quirks.c in that tree, and build.
Comment 10 Ronald 2014-06-08 13:31:37 UTC
sure I can test this, but I'm *NOT* fit with git.

Please write down the steps I must do !
Comment 11 Alex Williamson 2014-06-09 15:45:40 UTC
(In reply to Ronald from comment #10)
> sure I can test this, but I'm *NOT* fit with git.
> 
> Please write down the steps I must do !

github allows downloading a zip file of the tag, which will save you about 800MB of downloading versus doing a git clone.  Get this file:

https://github.com/awilliam/linux-vfio/archive/dma-alias-v4.zip

Extract and edit drivers/pci/quirks.c as noted in comment 6.  Build, install, test, and report the results.  Thanks
Comment 12 Ronald 2014-06-09 17:17:41 UTC
Thanks for advices !

Kernel tested; looks good (to me)

attaching defconfig and dmesg
Comment 13 Ronald 2014-06-09 17:18:31 UTC
Created attachment 138601 [details]
defconfig

defconfig
Comment 14 Ronald 2014-06-09 17:19:12 UTC
Created attachment 138611 [details]
dmesg

dmesg
Comment 15 Ronald 2016-02-19 14:05:44 UTC
this bug should be closed.
Comment 16 Bjorn Helgaas 2016-02-19 14:51:54 UTC
Closing per Ronald's testing.