-
Notifications
You must be signed in to change notification settings - Fork 2
[PW_SID:1044953] PCI/MSI: Generalize no_64bit_msi into msi_addr_mask #1356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: workflow__riscv__fixes
Are you sure you want to change the base?
Conversation
Some PCI devices have PCI_MSI_FLAGS_64BIT in the MSI capability, but implement less than 64 address bits. This breaks on platforms where such a device is assigned an MSI address higher than what's reachable. Currently, we deal with this with a single no_64bit_msi flag, and (notably on powerpc) forces 32-bit MSI address for these devices. However, on some platforms the MSI doorbell address is above 32-bit but within device ability. As a first step to enabling MSI on those combinations of devices and platforms, conservatively generalize the single-bit flag no_64bit_msi into msi_addr_mask. (The name msi_addr_mask is chosen to avoid confusion with msi_mask.) The translation is essentially: - no_64bit_msi = 1 -> msi_addr_mask = DMA_BIT_MASK(32) - no_64bit_msi = 0 -> msi_addr_mask = DMA_BIT_MASK(64) - if (no_64bit_msi) -> if (msi_addr_mask < DMA_BIT_MASK(64)) Since no values other than DMA_BIT_MASK(32) and DMA_BIT_MASK(64) is used, no functional change is intended. Future patches that make use of intermediate values of msi_addr_mask will follow, allowing devices that cannot use full 64-bit addresses for MSI to work on platforms with MSI doorbell above 32-bit address space. Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Instead of a 32-bit/64-bit dichotomy, check the MSI address against msi_addr_mask. This allows platforms with MSI doorbell above 32-bit address space to work with devices without full 64-bit MSI address support, as long as the doorbell is within addressable range of MSI of the device. Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The code was originally written using no_64bit_msi, which restricts the device to 32-bit MSI addresses. Since msi_addr_mask is introduced, use DMA_BIT_MASK(dma_bits) instead of DMA_BIT_MASK(32) here for msi_addr_mask, describing the restriction more precisely and allowing these devices to work on platforms with MSI doorbell address above 32-bit space, as long as it is within the hardware's addressable space. Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The code was originally written using no_64bit_msi, which restricts the device to 32-bit MSI addresses. Since msi_addr_mask is introduced, use DMA_BIT_MASK(dma_bits) instead of DMA_BIT_MASK(32) here for msi_addr_mask, describing the restriction more precisely and allowing these devices to work on platforms with MSI doorbell address above 32-bit space, as long as it is within the hardware's addressable space. Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
|
Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits" |
PR for series 1044953 applied to workflow__riscv__fixes
Name: PCI/MSI: Generalize no_64bit_msi into msi_addr_mask
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1044953
Version: 2