Skip to content

fix dma_addressing_limited() if dma_range_map

Jia He linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesIn review
  2. v32 patches 3 repliesSuperseded

Changes in v4 from the cover letter

- refine the commit msg in patch01
- address patch02 coding style issues
- add the dma ops check in dma_addressing_limited() (Christoph)
- move dma_direct_all_ram_mapped() to direct.c (Christoph)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dma-mapping: move dma_addressing_limited() out of lineinclude/linux/dma-mapping.h kernel/dma/mapping.c+20 -141 reply
2/2dma-mapping: fix dma_addressing_limited() if dma_range_map can't cover all system RAMkernel/dma/direct.c kernel/dma/direct.h kernel/dma/mapping.c+52 -21 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] fix dma_addressing_limited() if dma_range_map

This is to fix the hangs at boot. The root cause is the nvme device dma mapping is failed in the checking path of phys_to_dma() since dma_max_mapping_size() gave the wrong answer to start with.

---
Changelog:
v1: https://lore.kernel.org/all/[email protected]/
v2:
https://lore.kernel.org/lkml/[email protected]/
- refine the subject and commit msg (By Robin Murphy)
- refactor the checking loop in check_ram_in_range_map() in the pages unit to avoid wrap to 0 on 32bits platforms (Robin)
v3:
https://lore.kernel.org/lkml/[email protected]/
- move and export dma_addressing_limited() to avoid adding a new exported helper (by Christoph Hellwig)
v4:
- refine the commit msg in patch01
- address patch02 coding style issues
- add the dma ops check in dma_addressing_limited() (Christoph)
- move dma_direct_all_ram_mapped() to direct.c (Christoph)

Jia He (2):
dma-mapping: move dma_addressing_limited() out of line
dma-mapping: fix dma_addressing_limited() if dma_range_map can't cover
all system RAM

 include/linux/dma-mapping.h | 19 +++++------------
 kernel/dma/direct.c         | 41 +++++++++++++++++++++++++++++++++++++
 kernel/dma/direct.h         |  1 +
 kernel/dma/mapping.c        | 23 +++++++++++++++++++++
 4 files changed, 70 insertions(+), 14 deletions(-)
Signature · 1 line
2.25.1