mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
Sashiko noticed a mismatch of units in this math: num_leaves is
actually the number of leaf *entries* (so a 16-item contiguous leaf
is one num_leaves), while index is in items. The mismatch in maths
causes __map_range_leaf() to exit early instead of efficiently
filling a larger range of contiguous PTEs.
The early exit is caught by the functions above and then
__map_range_leaf() is re-invoked, so there is no functional issue.
Correct the misuse of units by adjusting num_leaves with the leaf
size and avoid the performance cost of looping externally.
There are also some mismatched types for num_leaves; simplify
things to remove the duplicated calculations.
Fixes:
|
||
|---|---|---|
| .. | ||
| fmt | ||
| .kunitconfig | ||
| iommu_pt.h | ||
| Kconfig | ||
| kunit_generic_pt.h | ||
| kunit_iommu_pt.h | ||
| kunit_iommu.h | ||
| pt_common.h | ||
| pt_defs.h | ||
| pt_fmt_defaults.h | ||
| pt_iter.h | ||
| pt_log2.h | ||