Skip to content

Conversation

@linux-riscv-bot
Copy link

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

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>
@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1515.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 2072.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.96 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.03 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.63 seconds
Result: WARNING
Output:

WARNING: Block comments use * on subsequent lines
#161: FILE: include/linux/pci.h:381:
+	u64		msi_addr_mask;	/* Mask of the bits of bus address for
+					   MSI that this device implements.

WARNING: Block comments use a trailing */ on a separate line
#166: FILE: include/linux/pci.h:386:
+					   fewer than 64 address bits. */

total: 0 errors, 2 warnings, 0 checks, 97 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 517bea64594f ("PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 2 warnings, 0 checks, 97 lines checked
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line


@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
kdoc
Desc: Detects for kdoc errors
Duration: 1.01 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
module-param
Desc: Detect module_param changes
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "[v2,1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1229.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1695.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.79 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 80.33 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 2: "[v2,2/4] PCI/MSI: Check msi_addr_mask in msi_verify_entries()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 113.67 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1149.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1464.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 26.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.09 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 80.42 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
kdoc
Desc: Detects for kdoc errors
Duration: 0.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 3: "[v2,3/4] drm/radeon: Raise msi_addr_mask to dma_bits"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 113.13 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1151.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1463.34 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 25.73 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 80.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.21 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 4: "[v2,4/4] ALSA: hda/intel: Raise msi_addr_mask to dma_bits"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants