Re: [PATCH 1/1] x86/ioremap: Use is_vmalloc_addr in iounmap

Christoph Hellwig
2024-08-12T06:15:02Z

(Somehow I can't find the original in my inbox, so replying here).

The correct helper to use is is_ioremap_addr, as in the generic
iounmap implementation. This won't matter for x86 currently, but
it clearly documents what the code is doing.

More long term, but I really hate how x86 is not using more of the
generic ioremap code. kmsan_iounmap_page_range should really move
to generic_iounmap, as should memtype_free after adding a properly
stubbed out API for it.

With that x86 iounmap would just contain a hook for the magic
ISA region, the mmio trace call and then call into generic_ioremap
and we'd get rid of these open coded checks.