• /proc/interrupts + dpdk +pci


    tr -s 删除所有重复出现字符序列,只保留第一个;即将重复出现字符串压缩为一个字符串。

    cat /proc/interrupts | tr -s " " | more

    [root@localhost ixgbe]# cat /proc/interrupts |less -S
               CPU0       CPU1       CPU2       CPU3       CPU4 
      1:          0          0          0          0          0 
      3:          0          0          0          0          0 
      4:   35908519   35873132    6849634   14474714    2443894 
      9:          0          0          0          0          0 
     10:          0          0          0          0          0 
     15:        680          0          0          0          0 
     16:          0          0          0          0          0 
     17:          0          0          0          0          0 
     19:          0          0          0          0          0 
     20:          0          0          0          0          0 
     21:          0          0          0          0          0 
     22:          0          0          0          0          0 
     23:          0          0          0          0          0 
     24:          0          0          0          0          0 
     25:          0          0          0          0          0 
     26:          0          0          0          0          0 
     27:          0          0          0          0          0 
     28:          0          0          0          0          0 
     29:          0          0          0          0          0 
     30:          0          0          0          0          0 
     31:          0          0          0          0          0 
     32:          0          0          0          0          0 
     33:          0          0          0          0          0 
     34:          0          0          0          0          0 
     35:          0          0          0          0          0 
     36:          0          0          0          0          0 
     37:          0          0          0          0          0 
     38:          0          0          0          0          0 
     39:          0          0          0          0          0 
     40:          0          0          0          0          0 
     41:          0          0          0          0          0 
     42:          0          0          0          0          0 
     43:         96          0          0          0          0 
     44:          0          0          0          0          0 
     45:          0          0          0          0          0 
     46:          0          0          0          0          0 
     47:          0          0          0          0          0 
     48:         82          0          0          0          0 
     49:          0          0          0          0          0 
     50:          0          0          0          0          0 
     51:          0          0          0          0          0 
     52:          0          0          0          0          0 
     53:          0          0          0          0          0 
     54:          0          0          0          0          0 
     55:          0          0          0          0          0 
     56:          0          0          0          0          0 
     57:          0          0          0          0          0 
     58:          0          0          0          0          0 
     59:          0          0          0          0          0 
    [root@localhost ixgbe]# cat /proc/interrupts |less -S
     
    #!/bin/sh
    
    sed -r -e 's/^ *//' -e 's/ {2,}/|/g' < /proc/interrupts | 
      awk -F'|' '
        BEGIN { cpu_n = 0; }
        NR == 1 {
          for(i = 1; i <= NF; i++)
            if($i ~ CPU)
              cpu_n++;
        }
        NR > 1 {
          sum = 0;
          for(i = 2; i <= cpu_n + 1; i++)
            sum += $i;
          printf("%4s %12d %-20s ", $1, sum, $6);
          for(i = 1; i < 7; i++)
            $i = "";
          print;
        }' | 
      sort -nrk2
    sed -r -e 's/^ *//' -e 's/ {2,}/|/g' < /proc/interrupts  | grep -i tx
    282:|17|0|442319|0|123266|0|0|0|0|0|0|0|0|26092|0|0|0|0|0|0|0|0|0|0|0|4298521|0|208369|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 65536001 Edge|enp125s0f0-TxRx-0
    413:|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 65538049 Edge|enp125s0f1-TxRx-0
    541:|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 65540097 Edge|enp125s0f2-TxRx-0
    735:|0|0|0|0|0|0|0|0|2241|0|0|0|0|0|0|0|0|0|0|0|537920|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 65542145 Edge|enp125s0f3-TxRx-0
    [root@localhost ixgbe]# 
    [root@localhost ixgbe]# lspci -vv  | grep -i ether
    05:00.0 Ethernet controller: Huawei Technologies Co., Ltd. Hi1822 Family (2*25GE) (rev 45)
    06:00.0 Ethernet controller: Huawei Technologies Co., Ltd. Hi1822 Family (2*25GE) (rev 45)
    7d:00.0 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller (rev 21)
    7d:00.1 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE Network Controller (rev 21)
    7d:00.2 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE RDMA Network Controller (rev 21)
    7d:00.3 Ethernet controller: Huawei Technologies Co., Ltd. HNS GE/10GE/25GE Network Controller (rev 21)
    [root@localhost ixgbe]# ls /sys/bus/pci/drivers/vfio-pci/ -al
    总用量 0
    drwxr-xr-x.  2 root root     0 8月  26 23:05 .
    drwxr-xr-x. 21 root root     0 8月  25 06:44 ..
    lrwxrwxrwx.  1 root root     0 9月   2 21:12 0000:05:00.0 -> ../../../../devices/pci0000:00/0000:00:0c.0/0000:03:00.0/0000:04:00.0/0000:05:00.0
    lrwxrwxrwx.  1 root root     0 9月   2 22:28 0000:06:00.0 -> ../../../../devices/pci0000:00/0000:00:0c.0/0000:03:00.0/0000:04:01.0/0000:06:00.0
    --w-------.  1 root root 65536 9月   2 22:16 bind
    lrwxrwxrwx.  1 root root     0 9月   2 21:12 module -> ../../../../module/vfio_pci
    --w-------.  1 root root 65536 9月   2 22:27 new_id
    --w-------.  1 root root 65536 9月   2 21:12 remove_id
    --w-------.  1 root root 65536 9月   2 21:12 uevent
    --w-------.  1 root root 65536 9月   2 22:26 unbind
    [root@localhost ixgbe]# 

    运行dpdk中断

    [root@localhost dpdk-19.11]#  ./examples/kni/build/app/kni -c 0xFFFFF -n 4 -- -P -p 0x01 --config="(0,0,1)"
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: Selected IOVA mode 'PA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: VFIO support initialized
    EAL: PCI device 0000:05:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL:   using IOMMU type 1 (Type 1)
    net_hinic: Initializing pf hinic-0000:05:00.0 in primary process
    net_hinic: Device 0000:05:00.0 hwif attribute:
    net_hinic: func_idx:0, p2p_idx:0, pciintf_idx:0, vf_in_pf:0, ppf_idx:0, global_vf_id:15, func_type:2
    net_hinic: num_aeqs:4, num_ceqs:4, num_irqs:32, dma_attr:2
    net_hinic: Get public resource capability:
    net_hinic: host_id: 0x0, ep_id: 0x0, intr_type: 0x0, max_cos_id: 0x7, er_id: 0x0, port_id: 0x0
    net_hinic: host_total_function: 0xf2, host_oq_id_mask_val: 0x8, max_vf: 0x78
    [root@localhost ixgbe]# ls /sys/devices/pci0000:00/0000:00:0c.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/msi_irqs/120
    /sys/devices/pci0000:00/0000:00:0c.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/msi_irqs/120
    [root@localhost ixgbe]# cat  /sys/devices/pci0000:00/0000:00:0c.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/msi_irqs/120
    msix
    [root@localhost ixgbe]# 
    [root@localhost ixgbe]# sed -r -e 's/^ *//' -e 's/ {2,}/|/g' < /proc/interrupts | grep 120:
    120:|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 2621440 Edge|vfio-msix[0](0000:05:00.0)
    [root@localhost ixgbe]# lspci -xxx -vv -s 05:00.0
    05:00.0 Ethernet controller: Huawei Technologies Co., Ltd. Hi1822 Family (2*25GE) (rev 45)
            Subsystem: Huawei Technologies Co., Ltd. Device d139
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0, Cache Line Size: 32 bytes
            NUMA node: 0
            Region 0: Memory at 80007b00000 (64-bit, prefetchable) [size=128K]
            Region 2: Memory at 80008a20000 (64-bit, prefetchable) [size=32K]
            Region 4: Memory at 80000200000 (64-bit, prefetchable) [size=1M]
            Expansion ROM at e9200000 [disabled] [size=1M]
            Capabilities: [40] Express (v2) Endpoint, MSI 00
                    DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                            ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 0.000W
                    DevCtl: Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported-
                            RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                            MaxPayload 256 bytes, MaxReadReq 512 bytes
                    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
                    LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM not supported, Exit Latency L0s unlimited, L1 unlimited
                            ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
                    LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk-
                            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                    LnkSta: Speed 8GT/s, Width x16, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
                    DevCap2: Completion Timeout: Range B, TimeoutDis+, LTR-, OBFF Not Supported
                    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
                    LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                             Compliance De-emphasis: -6dB
                    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+
                             EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
            Capabilities: [80] MSI: Enable- Count=1/32 Maskable+ 64bit+
                    Address: 0000000000000000  Data: 0000
                    Masking: 00000000  Pending: 00000000
            Capabilities: [a0] MSI-X: Enable+ Count=32 Masked-
                    Vector table: BAR=2 offset=00000000
                    PBA: BAR=2 offset=00004000
            Capabilities: [b0] Power Management version 3
                    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
            Capabilities: [c0] Vital Product Data
                    Product Name: Huawei IN200 2*100GE Adapter
                    Read-only fields:
                            [PN] Part number: SP572
                    End
            Capabilities: [100 v1] Advanced Error Reporting
                    UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                    UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                    CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                    CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
                    AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
            Capabilities: [150 v1] Alternative Routing-ID Interpretation (ARI)
                    ARICap: MFVC- ACS-, Next Function: 0
                    ARICtl: MFVC- ACS-, Function Group: 0
            Capabilities: [200 v1] Single Root I/O Virtualization (SR-IOV)
                    IOVCap: Migration-, Interrupt Message Number: 000
                    IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+
                    IOVSta: Migration-
                    Initial VFs: 120, Total VFs: 120, Number of VFs: 0, Function Dependency Link: 00
                    VF offset: 1, stride: 1, Device ID: 375e
                    Supported Page Size: 00000553, System Page Size: 00000010
                    Region 0: Memory at 0000080007b20000 (64-bit, prefetchable)
                    Region 2: Memory at 00000800082a0000 (64-bit, prefetchable)
                    Region 4: Memory at 0000080000300000 (64-bit, prefetchable)
                    VF Migration: offset: 00000000, BIR: 0
            Capabilities: [310 v1] #19
            Capabilities: [4e0 v1] Device Serial Number 44-a1-91-ff-ff-a4-9b-eb
            Capabilities: [4f0 v1] Transaction Processing Hints
                    Device specific mode supported
                    No steering table available
            Capabilities: [600 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
            Capabilities: [630 v1] Access Control Services
                    ACSCap: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
                    ACSCtl: SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
            Kernel driver in use: vfio-pci
            Kernel modules: hinic
    00: e5 19 00 02 06 04 10 00 45 00 00 02 08 00 00 00
    10: 0c 00 b0 07 00 08 00 00 0c 00 a2 08 00 08 00 00
    20: 0c 00 20 00 00 08 00 00 00 00 00 00 e5 19 39 d1
    30: 00 00 40 e6 40 00 00 00 00 00 00 00 ff 00 00 00
    40: 10 80 02 00 e2 8f 00 10 37 29 10 00 03 f1 43 00
    50: 08 00 03 01 00 00 00 00 00 00 00 00 00 00 00 00
    60: 00 00 00 00 92 03 00 00 00 00 00 00 0e 00 00 00
    70: 03 00 1f 00 00 00 00 00 00 00 00 00 00 00 00 00
    80: 05 a0 8a 01 00 00 00 00 00 00 00 00 00 00 00 00
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    a0: 11 b0 1f 80 02 00 00 00 02 40 00 00 00 00 00 00
    b0: 01 c0 03 f8 00 00 00 00 00 00 00 00 00 00 00 00
    c0: 03 00 28 80 37 32 78 ff 00 00 00 00 00 00 00 00
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    
    [root@localhost ixgbe]# 
    [root@localhost 0000:7d:00.0]# ls msi_irqs/ 
    281  292  303  314  325  336  347  358  369  380  391  402
    282  293  304  315  326  337  348  359  370  381  392  403
    283  294  305  316  327  338  349  360  371  382  393  404
    284  295  306  317  328  339  350  361  372  383  394  405
    285  296  307  318  329  340  351  362  373  384  395  406
    286  297  308  319  330  341  352  363  374  385  396  407
    287  298  309  320  331  342  353  364  375  386  397  408
    288  299  310  321  332  343  354  365  376  387  398  409
    289  300  311  322  333  344  355  366  377  388  399  410
    290  301  312  323  334  345  356  367  378  389  400  411
    291  302  313  324  335  346  357  368  379  390  401
    [root@localhost 0000:7d:00.0]# cat  msi_irqs/281 
    msix
    [root@localhost 0000:7d:00.0]# ethtool -i enp125s0f0
    driver: hns3
    version: 4.14.0-115.el7a.0.1.aarch64 SMP
    firmware-version: 0x01080c03
    expansion-rom-version: 
    bus-info: 0000:7d:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: no
    supports-register-dump: yes
    supports-priv-flags: no
    [root@localhost 0000:7d:00.0]# pwd
    /sys/devices/pci0000:7c/0000:7c:00.0/0000:7d:00.0
    [root@localhost 0000:7d:00.0]# sed -r -e 's/^ *//' -e 's/ {2,}/|/g' < /proc/interrupts | grep enp125s0f0
    282:|17|0|442319|0|123266|0|0|0|0|0|0|0|0|26092|0|0|0|0|0|0|0|0|0|0|0|4325780|0|208369|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|ITS-MSI 65536001 Edge|enp125s0f0-TxRx-0
    [root@localhost 0000:7d:00.0]# cat  msi_irqs/282
    msix
    [root@localhost 0000:7d:00.0]#
    [root@localhost 0000:7d:00.0]# ls $(readlink -e /sys/class/net/enp125s0f0/../../msi_irqs)
    281  292  303  314  325  336  347  358  369  380  391  402
    282  293  304  315  326  337  348  359  370  381  392  403
    283  294  305  316  327  338  349  360  371  382  393  404
    284  295  306  317  328  339  350  361  372  383  394  405
    285  296  307  318  329  340  351  362  373  384  395  406
    286  297  308  319  330  341  352  363  374  385  396  407
    287  298  309  320  331  342  353  364  375  386  397  408
    288  299  310  321  332  343  354  365  376  387  398  409
    289  300  311  322  333  344  355  366  377  388  399  410
    290  301  312  323  334  345  356  367  378  389  400  411
    291  302  313  324  335  346  357  368  379  390  401
    [root@localhost 0000:7d:00.0]# 
    APCI PRT Table Dump
    [    0.076942] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
    [    0.077030] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
    [    0.077111] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *10 11 12 14 15)
    [    0.077191] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 *10 11 12 14 15)
    [    0.077270] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 10 11 12 14 15)
    [    0.077352] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 11 12 14 15) *0, disabled.
    [    0.077432] ACPI: PCI Interrupt Link [LNKG] (IRQs *3 4 5 6 10 11 12 14 15)
    [    0.077511] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
    This is how the PIRQ[D:A] and PIRQ[H:E] are mapped by firmware (I assume this is PIC mode).
    PCI Interrupt Requests: In non-APIC mode the PIRQx# signals can
    be routed to interrupts 3, 4, 5, 6, 7, 9, 10, 11, 12, 14 or 15 as
    described in Section 5.8.6. Each PIRQx# line has a separate Route
    Control register.
    
    In APIC mode, these signals are connected to the internal I/O APIC in
    the following fashion: PIRQA# is connected to IRQ16, PIRQB# to
    IRQ17, PIRQC# to IRQ18, and PIRQD# to IRQ19. This frees the
    legacy interrupts
    Dumping the actual PIN mapping once the OS has booted up
    lspci -b -vvv | grep "Interrupt: pin"
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin A routed to IRQ 5
            Interrupt: pin A routed to IRQ 3
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin B routed to IRQ 10
            Interrupt: pin C routed to IRQ 10
    Note: From the PRT
    
           LNKA - 11
           LNKD - 10
           LNKE - 5
           LNKG - 3
    Actual interrupts used
    lspci -vvv | grep "Interrupt: pin"
            Interrupt: pin A routed to IRQ 43
            Interrupt: pin A routed to IRQ 48
            Interrupt: pin A routed to IRQ 44
            Interrupt: pin A routed to IRQ 47
            Interrupt: pin A routed to IRQ 46
            Interrupt: pin A routed to IRQ 45
            Interrupt: pin A routed to IRQ 23
            Interrupt: pin B routed to IRQ 42
            Interrupt: pin C routed to IRQ 18
    This matches: PIRQC# to IRQ18 which is the mapping for pin C in APIC mode
    
    Factoring in MSI
    cat /proc/interrupts
        This shows all MSI capable devices have been mapped away.
        The only one still on pin based interrupts is IRQ18.
               CPU0       CPU1       CPU2       CPU3
      0:        120          0          0          0  IR-IO-APIC   2-edge      timer
      4:          0          9          0          0  IR-IO-APIC   4-edge      ttyS0
      8:          0          0          0          1  IR-IO-APIC   8-edge      rtc0
      9:          0        164          0          0  IR-IO-APIC   9-fasteoi   acpi
     18:          0          0          0          0  IR-IO-APIC  18-fasteoi   i801_smbus
     23:          0         33          0          0  IR-IO-APIC  23-fasteoi   ehci_hcd:usb1
     40:          0          0          0          0  DMAR-MSI   0-edge      dmar0
     41:          0          0          0          0  DMAR-MSI   1-edge      dmar1
     42:          0          0       5880          0  IR-PCI-MSI 512000-edge      ahci[0000:00:1f.2]
     43:          0          0          0       1305  IR-PCI-MSI 32768-edge      i915
     44:          0          0          0          0  IR-PCI-MSI 327680-edge      xhci_hcd
     45:          0          0        389          0  IR-PCI-MSI 442368-edge      snd_hda_intel:card1
     46:          0          0          0       8498  IR-PCI-MSI 409600-edge      eno1
     47:         13          0          0          0  IR-PCI-MSI 360448-edge      mei_me
     48:          0          0         90          0  IR-PCI-MSI 49152-edge      snd_hda_intel:card0
    And 18 is not remapped as the device is not MSI capable
    
    00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
            Subsystem: Intel Corporation Device 2054
            Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
            Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Interrupt: pin C routed to IRQ 18
            Region 0: Memory at f7c39000 (64-bit, non-prefetchable) [size=256]
            Region 4: I/O ports at f040 [size=32]
            Kernel driver in use: i801_smbus
            Kernel modules: i2c_i801
    Debug outputs on Virtual Q35 (QEMU)
    PRT Table
    [    0.060061] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
    [    0.060118] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
    [    0.060172] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
    [    0.060225] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
    [    0.060279] ACPI: PCI Interrupt Link [LNKE] (IRQs 5 *10 11)
    [    0.060333] ACPI: PCI Interrupt Link [LNKF] (IRQs 5 *10 11)
    [    0.060386] ACPI: PCI Interrupt Link [LNKG] (IRQs 5 10 *11)
    [    0.060439] ACPI: PCI Interrupt Link [LNKH] (IRQs 5 10 *11)
    [    0.060462] ACPI: PCI Interrupt Link [GSIA] (IRQs *16)
    [    0.060468] ACPI: PCI Interrupt Link [GSIB] (IRQs *17)
    [    0.060473] ACPI: PCI Interrupt Link [GSIC] (IRQs *18)
    [    0.060479] ACPI: PCI Interrupt Link [GSID] (IRQs *19)
    [    0.060485] ACPI: PCI Interrupt Link [GSIE] (IRQs *20)
    [    0.060490] ACPI: PCI Interrupt Link [GSIF] (IRQs *21)
    [    0.060496] ACPI: PCI Interrupt Link [GSIG] (IRQs *22)
    [    0.060502] ACPI: PCI Interrupt Link [GSIH] (IRQs *23)
    lspci -b -vvv | grep IRQ
    
            Interrupt: pin ? routed to IRQ 255
            Interrupt: pin A routed to IRQ 10
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin A routed to IRQ 11
            Interrupt: pin ? routed to IRQ 255
            Interrupt: pin A routed to IRQ 10
            Interrupt: pin A routed to IRQ 10
    Note: The 255s are the PCIe Host Bridge and the ISA Bridge
    
    lspci -vvv | grep IRQ
    
            Interrupt: pin A routed to IRQ 21
            Interrupt: pin A routed to IRQ 22
            Interrupt: pin A routed to IRQ 23
            Interrupt: pin A routed to IRQ 26
            Interrupt: pin A routed to IRQ 10
    Note: The non MSI device is at IRQ 10
    
    00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
           Subsystem: Red Hat, Inc. QEMU Virtual Machine
           Flags: bus master, fast devsel, latency 0, IRQ 10
           I/O ports at 6000 [size=64]
    cat /proc/interrupts
    
     24:          0          0          0          0   PCI-MSI 49152-edge      virtio2-config
     25:       1639          0          0          0   PCI-MSI 49153-edge      virtio2-req.0
     26:          0          0          0          7   PCI-MSI 512000-edge      ahci[0000:00:1f.2]
     27:          0          0          0          0   PCI-MSI 16384-edge      virtio0-config
     28:          0         77          0          0   PCI-MSI 16385-edge      virtio0-input.0
     29:          0          0          1          0   PCI-MSI 16386-edge      virtio0-output.0
  • 相关阅读:
    经验谈 论前端架构的重要性
    论 Angular的混乱
    DTW 算法(转)
    软件提高发射功率原理
    (转)LSI SAS 1068E Raid CentOS 5.5 安装实例浪潮NF5220系列 分类: linux
    聚类算法总结
    信号相似性的描述
    python科学计算整理
    一个无线通信类投稿的期刊list
    2012年Elsevier旗下Computer Science期刊最新SCI影响因子排名
  • 原文地址:https://www.cnblogs.com/dream397/p/13622716.html
Copyright © 2020-2023  润新知