Skip to content

x86: ioremap() problem in X86_32 PAE

Kenji Kaneshige lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86: ioremap: fix wrong physical address handlingarch/x86/mm/ioremap.c include/linux/io.h include/linux/vmalloc.h +2 more+14 -1616 replies
2/2x86: ioremap: fix normal ram range checkarch/x86/mm/ioremap.c+1 -11 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [BUG][PATCH 0/2 (v.2)] x86: ioremap() problem in X86_32 PAE

Hi,

Here is a updated version (v.2) of patchset to fix ioremap() problem found in x86_32 PAE mode. The problem is that ioremap() maps wrong address for the devices to which phisical addresses higer than 32-bit are assigned (ioat device in my case).

Changelog
----
v.1 => v.2:
Thanks to the feedbacks, I found that some of my v.1 patches are totally wrong because they were based on my mis-understanding about architectural limit and linux memory management limit of physical address. In addition, it turned out that there are bugs that handles physical address improperly (higher 32-bits are cleared unexpectedly) also in the other places in the ioremap() code path. Major changes are
- Removed wrong changes against phys_addr_valid() ([PATCH 2/4] in v.1).
- Removed wrong changes against wraning message in ioremap() ([PATCH 3/4] in v.1)
- Changed not to use PHYSICAL_PAGE_MASK because the PHYSICAL_PAGE_MASK would not work for physical address higher than 44-bit.
- Added fixes for remaining bugs of physical address handling in ioremap() code path according to the feedbacks.
- Added a fix for s_show() in vmalloc.c to show high physical address properly.
----

I also found the bug in PCI MSI-X code that handles physical address improperly, which causes the problem MSI-X doesn't work on my devices. I'll send a patch for this to PCI mail list separately.

The v.2 patches are:

- [PATCH 1/2] x86: ioremap: fix wrong physical address handling
- [PATCH 2/2] x86: ioremap: fix normal ram range check

Thanks,
Kenji Kaneshige