• Minghuan Lian's avatar
    irqchip/ls-scfg-msi: Add MSI affinity support · ae3efabf
    Minghuan Lian authored
    For LS1046a and LS1043a v1.1, the MSI controller has 4 MSIRs and 4 GIC
    SPI interrupts which can be associated with different Core.
    So we can support affinity to improve the performance.
    The MSI message data is a byte for Layerscape MSI.
      7    6   5  4  3  2   1   0
    | - |       IBS       |  SRS |
    SRS bit0-1 is to select a MSIR which is associated with a CPU.
    IBS bit2-6 of ls1046, bit2-4 of ls1043a v1.1 is to select bit of the
    MSIR. With affinity, only bits of MSIR0(srs=0 cpu0) are available.
    All other bits of the MSIR1-3(cpu1-3) are reserved. The MSI hwirq
    always equals bit index of the MSIR0. When changing affinity, MSI
    message data will be appended corresponding SRS then MSI will be
    moved to the corresponding core.
    But in affinity mode, there is only 8 MSI interrupts for a controller
    of LS1043a v1.1. It cannot meet the requirement of the some PCIe
    devices such as 4 ports Ethernet card. In contrast, without affinity,
    all MSIRs can be used for core 0, the MSI interrupts can up to 32.
    So the parameter is added to control affinity mode.
    "lsmsi=no-affinity" will disable affinity and increase MSI
    interrupt number.
    Signed-off-by: default avatarMinghuan Lian <Minghuan.Lian@nxp.com>
    Signed-off-by: default avatarHou Zhiqiang <Zhiqiang.Hou@nxp.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    ae3efabf
irq-ls-scfg-msi.c 10.6 KB