vm_area at addr ffffffffc0800000 is not marked as VM_IOREMAP

Alexei Starovoitov alexei.starovoitov at gmail.com
Fri Mar 8 08:33:18 PST 2024


On Fri, Mar 8, 2024 at 7:04 AM Christoph Hellwig <hch at infradead.org> wrote:
>
> On Thu, Mar 07, 2024 at 07:49:16PM -0800, Alexei Starovoitov wrote:
> > Ok. I think I figured it out.
> > Please try the attached patch.
>
> I don't think this is the right thing.  The probem is that
> the PCI code shouldn't really be using ioremap_page_range if it is
> not an ioremap area, but instead directly call into
> vmap_range_noflush (or an added back vmap_range to avoid all the
> duplication) similar to the vunmap case in vunmap_range.

vmap_range_noflush() is static in mm/vmalloc.c
There is vmap_pages_range_noflush() that is in mm/internal.h,
but it needs pages instead of phys_addr_t.
Newly introduced vm_area_map_pages() needs struct vm_struct *area
and struct page **pages.
In this PCI case there is no vm_struct and no pages.
ioremap_page_range() is the only api that fits. afaict.



More information about the linux-arm-kernel mailing list