固定する

固定する

2.6.32カーネルを使用して正常に起動できるIBM x3850タイプ8864システムがありますが、3.10カーネル以上を使用しようとすると、カーネルはすべてのPCIスロットの初期化に失敗します。 (手動でこの問題を解決できます。以下を参照してください。):

pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1a00000)
pci 0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci 0000:19:00.0: BAR 14: can't assign mem (size 0x1600000)
pci 0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci 0000:1a:00.0: BAR 14: can't assign mem (size 0x1600000)
pci 0000:1a:00.0: BAR 13: assigned [io  0x7000-0x8fff]
pci 0000:1b:02.0: BAR 14: can't assign mem (size 0xa00000)
pci 0000:1b:04.0: BAR 14: can't assign mem (size 0xa00000)
pci 0000:1b:02.0: BAR 13: assigned [io  0x7000-0x7fff]
pci 0000:1b:04.0: BAR 13: assigned [io  0x8000-0x8fff]
...

これにより、PCIバスが正しくインスタンス化されなかったため、ネットワークカードが正常にロードされませんでした。

lspci次の結果が生成されます。

00:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV100 [Radeon 7000 / Radeon VE]
00:03.0 USB controller: NEC Corporation OHCI USB Controller (rev 43)
00:03.1 USB controller: NEC Corporation OHCI USB Controller (rev 43)
00:03.2 USB controller: NEC Corporation uPD72010x USB 2.0 Controller (rev 04)
00:0f.0 Host bridge: Broadcom CSB6 South Bridge (rev a0)
00:0f.1 IDE interface: Broadcom CSB6 RAID/IDE Controller (rev a0)
00:0f.3 ISA bridge: Broadcom GCLE-2 Host Bridge
01:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
01:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
01:01.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
01:02.0 RAID bus controller: Adaptec AAC-RAID (rev 02)
02:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
06:00.0 Host bridge: IBM Calgary PCI-X Host Bridge (rev 04)
0a:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
0f:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
14:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
19:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)
1a:00.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1b:02.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1b:04.0 PCI bridge: Integrated Device Technology, Inc. [IDT] PES12N3A PCI Express Switch (rev 0c)
1c:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1c:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1d:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
1d:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)

固定する

19:00.0 PCI bridge: IBM CalIOC2 PCI-E Root Port (rev 01)echo 1 > /sys/bus/pci/devices/0000\:19\:00.0/remove実際には、ルートPCIバスを削除して再スキャンして問題を解決することができました。echo 1 > /sys/bus/pci/rescan 結果は次のとおりです。

pci _bus 0000:1c: busn_res: [bus 1c] is released
pci _bus 0000:1d: busn_res: [bus 1d] is released
pci _bus 0000:1b: busn_res: [bus 1b-1d] is released
pci _bus 0000:1a: busn_res: [bus 1a-1d] is released
pci  0000:19:00.0: [1014:0308] type 01 class 0x060401
pci  0000:19:00.0: supports D1 D2
pci  0000:19:00.0: PME# supported from D0 D1 D2 D3hot D3cold
pci  0000:1a:00.0: [111d:8018] type 01 class 0x060400
pci  0000:1a:00.0: PME# supported from D0 D3hot D3cold
pci  0000:19:00.0:     pci  bridge to [bus 1a-1d] (subtractive decode)
pci  0000:19:00.0:   bridge window [mem 0xea800000-0xea9fffff 64bit pref]
pci  0000:19:00.0:   bridge window [mem 0xea800000-0xebcfffff] (subtractive decode)
pci  0000:19:00.0:   bridge window [io  0x7000-0x8fff] (subtractive decode)
pci  0000:1b:02.0: [111d:8018] type 01 class 0x060400
pci  0000:1b:02.0: PME# supported from D0 D3hot D3cold
pci  0000:1b:04.0: [111d:8018] type 01 class 0x060400
pci  0000:1b:04.0: PME# supported from D0 D3hot D3cold
pci  0000:1a:00.0:     pci  bridge to [bus 1b-1d]
pci  0000:1a:00.0:   bridge window [io  0x7000-0x8fff]
pci  0000:1a:00.0:   bridge window [mem 0xea800000-0xea9fffff 64bit pref]

....

pci  0000:1b:04.0:   bridge window [mem 0xea900000-0xea9fffff 64bit pref]
pci  0000:1b:02.0: bridge window [mem 0x00100000-0x001fffff 64bit pref] to [bus 1c] add_size 100000
pci  0000:1b:04.0: bridge window [mem 0x00100000-0x001fffff 64bit pref] to [bus 1d] add_size 100000
pci  0000:1b:02.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci  0000:1b:04.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci  0000:1a:00.0: bridge window [mem 0x00100000-0x002fffff 64bit pref] to [bus 1b-1d] add_size 200000
pci  0000:19:00.0: bridge window [io  0x1000-0x2fff] to [bus 1a-1d] add_size 1000
pci  0000:1a:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci  0000:19:00.0: bridge window [mem 0x00100000-0x002fffff 64bit pref] to [bus 1a-1d] add_size 200000
pci  0000:19:00.0: bridge window [mem 0x00200000-0x015fffff] to [bus 1a-1d] add_size 200000
pci  0000:19:00.0: res[14]=[mem 0x00200000-0x015fffff] get_res_add_size add_size 200000
pci  0000:19:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci  0000:19:00.0: res[13]=[io  0x1000-0x2fff] get_res_add_size add_size 1000
pci  0000:19:00.0: BAR 14: can't assign mem (size 0x1600000)
pci  0000:19:00.0: BAR 15: assigned [mem 0xea800000-0xeabfffff 64bit pref]
pci  0000:19:00.0: BAR 13: can't assign io (size 0x3000)
pci  0000:19:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci  0000:19:00.0: BAR 15: can't assign mem pref (size 0x200000)
pci  0000:19:00.0: BAR 13: assigned [io  0x7000-0x8fff]
pci  0000:19:00.0: BAR 14: can't assign mem (size 0x1400000)
pci  0000:19:00.0: failed to add 200000 res[14]=[mem 0xea800000-0xebbfffff]
pci  0000:19:00.0: BAR 13: can't assign io (size 0x2000)
pci  0000:19:00.0: failed to add 1000 res[13]=[io  0x7000-0x8fff]
pci  0000:1a:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] get_res_add_size add_size 200000
pci  0000:1a:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci  0000:1a:00.0: BAR 15: can't assign mem pref (size 0x400000)
pci  0000:1a:00.0: BAR 13: assigned [io  0x7000-0x8fff]
pci  0000:1a:00.0: BAR 14: assigned [mem 0xea800000-0xebbfffff]
pci  0000:1a:00.0: BAR 15: can't assign mem pref (size 0x200000)
pci  0000:1b:02.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci  0000:1b:04.0: res[15]=[mem 0x00100000-0x001fffff 64bit pref] get_res_add_size add_size 100000
pci  0000:1b:02.0: BAR 14: assigned [mem 0xea800000-0xeb1fffff]
pci  0000:1b:04.0: BAR 14: assigned [mem 0xeb200000-0xebbfffff]
pci  0000:1b:02.0: BAR 15: can't assign mem pref (size 0x200000)
pci  0000:1b:04.0: BAR 15: can't assign mem pref (size 0x200000)
pci  0000:1b:02.0: BAR 13: assigned [io  0x7000-0x7fff]
pci  0000:1b:04.0: BAR 13: assigned [io  0x8000-0x8fff]
pci  0000:1b:02.0: BAR 14: assigned [mem 0xea800000-0xeb1fffff]
pci  0000:1b:04.0: BAR 14: assigned [mem 0xeb200000-0xebbfffff]
pci  0000:1b:02.0: BAR 15: can't assign mem pref (size 0x100000)
pci  0000:1b:04.0: BAR 15: can't assign mem pref (size 0x100000)
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.1: reg 190: [mem 0xea860000-0xea863fff 64bit pref]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci  0000:1c:00.0: res[7]=[mem 0xea800000-0xea7fffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1c:00.0: res[10]=[mem 0xea820000-0xea81ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1c:00.1: res[7]=[mem 0xea840000-0xea83ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1c:00.1: res[10]=[mem 0xea860000-0xea85ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1c:00.0: BAR 1: assigned [mem 0xea800000-0xeabfffff]
pci  0000:1c:00.1: BAR 1: assigned [mem 0xeac00000-0xeaffffff]
pci  0000:1c:00.0: BAR 0: assigned [mem 0xeb000000-0xeb01ffff]
pci  0000:1c:00.1: BAR 0: assigned [mem 0xeb020000-0xeb03ffff]
pci  0000:1c:00.0: BAR 3: assigned [mem 0xeb040000-0xeb043fff]
pci  0000:1c:00.0: reg 184: [mem 0xea800000-0xea803fff 64bit pref]
pci  0000:1c:00.0: BAR 7: assigned [mem 0xeb044000-0xeb063fff 64bit pref]
pci  0000:1c:00.0: reg 190: [mem 0xea820000-0xea823fff 64bit pref]
pci  0000:1c:00.0: BAR 10: assigned [mem 0xeb064000-0xeb083fff 64bit pref]
pci  0000:1c:00.1: BAR 3: assigned [mem 0xeb084000-0xeb087fff]
pci  0000:1c:00.1: reg 184: [mem 0xea840000-0xea843fff 64bit pref]
pci  0000:1c:00.1: BAR 7: assigned [mem 0xeb088000-0xeb0a7fff 64bit pref]
pci  0000:1c:00.1: reg 190: [mem 0xea860000-0xea863fff 64bit pref]
pci  0000:1c:00.1: BAR 10: assigned [mem 0xeb0a8000-0xeb0c7fff 64bit pref]
pci  0000:1c:00.0: BAR 2: assigned [io  0x7000-0x701f]
pci  0000:1c:00.1: BAR 2: assigned [io  0x7020-0x703f]
pci  0000:1b:02.0:     pci  bridge to [bus 1c]
pci  0000:1b:02.0:   bridge window [io  0x7000-0x7fff]
pci  0000:1b:02.0:   bridge window [mem 0xea800000-0xeb1fffff]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.1: reg 190: [mem 0xea960000-0xea963fff 64bit pref]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci  0000:1d:00.0: res[7]=[mem 0xea900000-0xea8fffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1d:00.0: res[10]=[mem 0xea920000-0xea91ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1d:00.1: res[7]=[mem 0xea940000-0xea93ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1d:00.1: res[10]=[mem 0xea960000-0xea95ffff 64bit pref] get_res_add_size add_size 20000
pci  0000:1d:00.0: BAR 1: assigned [mem 0xeb400000-0xeb7fffff]
pci  0000:1d:00.1: BAR 1: assigned [mem 0xeb800000-0xebbfffff]
pci  0000:1d:00.0: BAR 0: assigned [mem 0xeb200000-0xeb21ffff]
pci  0000:1d:00.1: BAR 0: assigned [mem 0xeb220000-0xeb23ffff]
pci  0000:1d:00.0: BAR 3: assigned [mem 0xeb240000-0xeb243fff]
pci  0000:1d:00.0: reg 184: [mem 0xea900000-0xea903fff 64bit pref]
pci  0000:1d:00.0: BAR 7: assigned [mem 0xeb244000-0xeb263fff 64bit pref]
pci  0000:1d:00.0: reg 190: [mem 0xea920000-0xea923fff 64bit pref]
pci  0000:1d:00.0: BAR 10: assigned [mem 0xeb264000-0xeb283fff 64bit pref]
pci  0000:1d:00.1: BAR 3: assigned [mem 0xeb284000-0xeb287fff]
pci  0000:1d:00.1: reg 184: [mem 0xea940000-0xea943fff 64bit pref]
pci  0000:1d:00.1: BAR 7: assigned [mem 0xeb288000-0xeb2a7fff 64bit pref]
pci  0000:1d:00.1: reg 190: [mem 0xea960000-0xea963fff 64bit pref]
pci  0000:1d:00.1: BAR 10: assigned [mem 0xeb2a8000-0xeb2c7fff 64bit pref]
pci  0000:1d:00.0: BAR 2: assigned [io  0x8000-0x801f]
pci  0000:1d:00.1: BAR 2: assigned [io  0x8020-0x803f]
pci  0000:1b:04.0:     pci  bridge to [bus 1d]
pci  0000:1b:04.0:   bridge window [io  0x8000-0x8fff]
pci  0000:1b:04.0:   bridge window [mem 0xeb200000-0xebbfffff]
pci  0000:1a:00.0:     pci  bridge to [bus 1b-1d]
pci  0000:1a:00.0:   bridge window [io  0x7000-0x8fff]
pci  0000:1a:00.0:   bridge window [mem 0xea800000-0xebbfffff]
pci  0000:19:00.0:     pci  bridge to [bus 1a-1d]
pci  0000:19:00.0:   bridge window [io  0x7000-0x8fff]
pci  0000:19:00.0:   bridge window [mem 0xea800000-0xebbfffff]

質問

このタスクを自動的に実行するようにカーネルに(たとえば、パラメータを介して)何とか指示することは可能ですか?当初、この問題の原因は何ですか?

よろしくお願いします!

修正する

説明された修正が4.xシステム(実際には3.12から始まると思います)で失敗したため、カーネルを調べた結果、PCI ASPM(ACPIによって無効になっている)が無効になっている場合(pcie_aspm = offで強制的に実行される可能性があります)あることがわかりました)カーネルの起動パラメータで))次の小さな修正(4.4.0の場合)はカーネルNULLポインタの逆参照を解決します。

--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -552,11 +552,12 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev)
 void pcie_aspm_init_link_state(struct pci_dev *pdev)
 {
        struct pcie_link_state *link;
-       int blacklist = !!pcie_aspm_sanity_check(pdev);
-
+       int blacklist;
        if (!aspm_support_enabled)
                return;

+       blacklist = !!pcie_aspm_sanity_check(pdev);
+
        if (pdev->link_state)
                return;

少し奇妙なことは、機能自体が無効になっている場合に完全性チェックが実行されると、実際のヌルポインタの逆参照がpcie_aspm_sanity_checkこの行で発生することですlist_for_each_entry(child, &pdev->subordinate->devices, bus_list) {。これはカーネルのバグですか?

ベストアンサー1

このタスクを自動的に実行するようにカーネルに(たとえば、パラメータを介して)何とか指示することは可能ですか?

起動しようとしたpci=reallocときにこのパラメータを渡すまで、古代のマザーボードでNVMeドライブをホットプラグするのと同様の問題がありました。

おすすめ記事