[PATCH v2 7/8] arm64: mte: pass the swap entry to mte_save_tags()

David Hildenbrand (Arm) david at kernel.org
Wed Sep 9 07:06:39 PDT 2026


On 9/8/26 17:16, Tal Zussman wrote:
> arch_prepare_to_swap() derives a page from the folio only for
> mte_save_tags() to recompute the folio's swap entry from that page.
> Pass the entry in directly with folio_swap_entry(), matching
> mte_restore_tags(), and move the page_mte_tagged() check into the
> caller so we only compute the entry for tagged pages.
> 
> __mte_invalidate_tags() loses its only user, so remove it and call
> mte_invalidate_tags() directly in the error path. This removes two
> calls to compound_head().
> 
> No functional change.
> 
> Signed-off-by: Tal Zussman <tz2294 at columbia.edu>
> ---

Acked-by: David Hildenbrand (Arm) <david at kernel.org>

-- 
Cheers,

David



More information about the linux-arm-kernel mailing list