aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorYan Zhao <[email protected]>2024-02-02 14:05:50 +0000
committerArnd Bergmann <[email protected]>2024-03-05 17:04:20 +0000
commit3391538f08511dae86382003ff9216026762b3a9 (patch)
treef209aae0b3f330a62e4a463fcc0d16e36420c2bb /fs/btrfs/dev-replace.c
parentLinux 6.8-rc5 (diff)
downloadkernel-3391538f08511dae86382003ff9216026762b3a9.tar.gz
kernel-3391538f08511dae86382003ff9216026762b3a9.zip
mm: Remove broken pfn_to_virt() on arch csky/hexagon/openrisc
Remove the broken pfn_to_virt() on architectures csky/hexagon/openrisc. The pfn_to_virt() on those architectures takes PFN instead of PA as the input to macro __va(), with PAGE_SHIFT applying to the converted VA, which is not right, especially when there's a non-zero offset in __va(). [1] The broken pfn_to_virt() was noticed when checking how page_to_virt() is unfolded on x86. It turns out that the one in linux/mm.h instead of in asm-generic/page.h is compiled for x86. However, page_to_virt() in asm-generic/page.h is found out expanding to pfn_to_virt() with a bug described above. The pfn_to_virt() is found out not right as well on architectures csky/hexagon/openrisc. Since there's no single caller on csky/hexagon/openrisc to pfn_to_virt() and there are functions doing similar things as pfn_to_virt() -- - pfn_to_kaddr() in asm/page.h for csky, - page_to_virt() in asm/page.h for hexagon, and - page_to_virt() in linux/mm.h for openrisc, just delete the pfn_to_virt() on those architectures. The pfn_to_virt() in asm-generic/page.h is not touched in this patch as it's referenced by page_to_virt() in that header while the whole header is going to be removed as a whole due to no one including it. Link:https://lore.kernel.org/all/[email protected] [1] Cc: Linus Walleij <[email protected]> Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Yan Zhao <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions