From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B99333B3C0E for ; Mon, 8 Jun 2026 08:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780907856; cv=none; b=rt7imrS4WgbPinoYZCUYQibIkeRJ31rQaqe4/M8NsVvx2bW61ZjCaCAfUsAjyzukLwAMYEtAqlOJadYtviK2DDj+wYEVbM5ORiwYUFcnvvIGAFis4rdpeymvNuUmY/jgDSN8cQCjEOkykyNcxoeTKX1Xnb3Bix8scNs899hu/jk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780907856; c=relaxed/simple; bh=OHWxGJkJbozNCm8KAs+71lxyLWxsCrak///2e95AF4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fdbC87GO/DObYxcBxdABFz8Fu7fnOX9jzqoKK4V4U+efzGOOVFsxx82IKJc7c3klWA5ja6GaolT3ozbQGGMXP/ca4xk/3+ukdnaeEMN4E5wvTCPk7OUeYgfIdTVZXsEYHRe2STAXFReQzTDekmnKwUeOp3lbjWFKTq+Bk2vVoVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=C4mYpJ4h; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=DqZeLELI; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C4mYpJ4h"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="DqZeLELI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780907848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tltobG27QNK6CnGoNCrb5i/6pgzOGIIyEcQIJDK7QRA=; b=C4mYpJ4heQzCYvdeu/nEgxW+X1RzKSmckIqC2soB/fOjfu/8+oRTRNBtZ0IpwdetPkq6DM LfUNk7hy7WxU/I0I3V3ctAE0oqIuiGj2GnMH6KyDMyjmARoAbX6nhc57fJJBNyzFQy0yFN Kaj76xu8M4bYornHny05vuDyOXX82Lc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660-7mMXZoMVPqWT9eWq3POQMQ-1; Mon, 08 Jun 2026 04:37:27 -0400 X-MC-Unique: 7mMXZoMVPqWT9eWq3POQMQ-1 X-Mimecast-MFC-AGG-ID: 7mMXZoMVPqWT9eWq3POQMQ_1780907846 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-490ae461f8dso29989475e9.1 for ; Mon, 08 Jun 2026 01:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1780907846; x=1781512646; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tltobG27QNK6CnGoNCrb5i/6pgzOGIIyEcQIJDK7QRA=; b=DqZeLELIbNoC/sWKq7PP1z3ZvRRIfg4C8VX+UxGGOOXLqUxolObQ6TrDCe2m9MDkrj Y3Iz3kxZjXFT8+eeUoVyJXCPIb4fYlgyHf4njl5HvMaECBm1g9z03SwooUdmbdGM8yA+ 1ynEOltDmUcfEnyaEnssg9+kLfpAmk9N6Wsba4/pW2JMUwYlPy/cAVYXa5K0yHBzaxv4 MbOlKp0R9M7KvBrCSUp3tDNFM4m3yz3cMISvoW4bgFMsuFJzd+kW+rtoplJdVSHQ4LtO 123rysbIpvkINK27S/UI3PdcrEJCYg/b/O/43cgT9iJb6Ipy1l8q8f0Qc3LjGkCMAG2O 75mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780907846; x=1781512646; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tltobG27QNK6CnGoNCrb5i/6pgzOGIIyEcQIJDK7QRA=; b=p0Ny2A9f+PEKjJYEBNpTwrWX/4jqdIxvd/oOUHjfLpG8W8M2TIVmu6XHYbDg4nTlX9 kmdVYBV3k13g9Ujjk07jBaU/JT1oMlhCdTExnWNZ5tO66QD65biXw4Du8MdF5HPyOjv8 1EH/XIRa1bd2Oyy6fL8E/qXwRfHqCWusX7yllZfwmjCHgDnSCdfIjfbGNmvjVYa3P0+G HMXZpOz28FWyzX0qZzXGLrwqyTEFtCNyli4bZwX907M+RT02Jft0AprdbH5ABDdINUvg ly6RVlKt4V4qEsrlpFBFP4+73ouQs3jNTk5saOIVGyROlrFLiKVrZ9ISQb8SDNF6S3uO uKTg== X-Gm-Message-State: AOJu0YwwDYVuT4AedvTw77v1WhTtY1+lEAyM0ibrmh5dN8fIQDAXJN10 +y2ZV2E4WuPYQ+msvwZuixYDSGq/cwbhNTRlxYDzoAlnICMD2JA9Kumnvmf4Y1yodJjy3aZmiml hIknjifBlXcs3CFvF7qZnN+/0vh+DTG5Ah3WqYc9cTXEF0+m4JgxDeCVyK0OSiiuh8AX0peW6wu SHOnmExsiyMR8KTTr24YYMQODOYnH18+gibawyqdtogSg= X-Gm-Gg: Acq92OFBgJ7EjeqStzXmgY3GI8l88isMOg/Aq416B6+N5aQFP4VVUAfruTw86QnjhoC pymbLxEMucufz3WC3UkK6noBZp0Zwgua5nLpXri6FxLSus4RciZrREIAacGpgNRP+icsJhYuVft MVc7J5p54cpwHvHfxPfQBzW7zDMLgHBJzD6en6pjJriFx6UN+82zuS+IdZLgnXI00IzyZAN2EMb ik1QbZI1vpukf3jbBPR2t+JvNQ1XIBqaYY0Pl1qA3NX4uLzDh/aREDKoz+XNsABjC9FUEMT1RKQ 9gnLseqymC5znUwxIY/Bmh2wsyZE0rdZJPlp4NKGt74bibuw+V0VVUo2kYqF5aiq26nsUnn4LWe VZK2VXePS1taQeqhDYkt9Sq4= X-Received: by 2002:a05:600c:4fc6:b0:48f:f7cc:f6f5 with SMTP id 5b1f17b1804b1-490c2614167mr244773485e9.31.1780907845823; Mon, 08 Jun 2026 01:37:25 -0700 (PDT) X-Received: by 2002:a05:600c:4fc6:b0:48f:f7cc:f6f5 with SMTP id 5b1f17b1804b1-490c2614167mr244772255e9.31.1780907845077; Mon, 08 Jun 2026 01:37:25 -0700 (PDT) Received: from redhat.com ([31.152.37.159]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3e5a00sm375786835e9.15.2026.06.08.01.37.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2026 01:37:24 -0700 (PDT) Date: Mon, 8 Jun 2026 04:37:08 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: "David Hildenbrand (Arm)" , Jason Wang , Xuan Zhuo , Eugenio =?utf-8?B?UMOpcmV6?= , Muchun Song , Oscar Salvador , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Hugh Dickins , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Axel Rasmussen , Yuanchu Xie , Wei Xu , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , virtualization@lists.linux.dev, linux-mm@kvack.org, Andrea Arcangeli , Magnus Lindholm , Greg Ungerer , Geert Uytterhoeven Subject: [PATCH v10 14/37] mm: remove arch vma_alloc_zeroed_movable_folio overrides Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.51.2.2891.g4157995a80.dirty X-Mutt-Fcc: =sent Now that the generic vma_alloc_zeroed_movable_folio() uses __GFP_ZERO, the arch-specific macros on alpha, m68k, s390, and x86 that did the same thing are redundant. Remove them. arm64 is not affected: it has a real function override that handles MTE tag zeroing, not just __GFP_ZERO. Suggested-by: David Hildenbrand Acked-by: Magnus Lindholm Acked-by: Greg Ungerer Acked-by: Geert Uytterhoeven # m68k Signed-off-by: Michael S. Tsirkin Assisted-by: Claude:claude-opus-4-6 Reviewed-by: Gregory Price --- arch/alpha/include/asm/page.h | 3 --- arch/m68k/include/asm/page_no.h | 3 --- arch/s390/include/asm/page.h | 3 --- arch/x86/include/asm/page.h | 3 --- include/linux/highmem.h | 8 +++++--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/alpha/include/asm/page.h b/arch/alpha/include/asm/page.h index 59d01f9b77f6..4327029cd660 100644 --- a/arch/alpha/include/asm/page.h +++ b/arch/alpha/include/asm/page.h @@ -12,9 +12,6 @@ extern void clear_page(void *page); -#define vma_alloc_zeroed_movable_folio(vma, vaddr) \ - vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, 0, vma, vaddr) - extern void copy_page(void * _to, void * _from); #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) diff --git a/arch/m68k/include/asm/page_no.h b/arch/m68k/include/asm/page_no.h index d2532bc407ef..f511b763a235 100644 --- a/arch/m68k/include/asm/page_no.h +++ b/arch/m68k/include/asm/page_no.h @@ -12,9 +12,6 @@ extern unsigned long memory_end; #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) -#define vma_alloc_zeroed_movable_folio(vma, vaddr) \ - vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, 0, vma, vaddr) - #define __pa(vaddr) ((unsigned long)(vaddr)) #define __va(paddr) ((void *)((unsigned long)(paddr))) diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 56da819a79e6..e995d2a413f9 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -67,9 +67,6 @@ static inline void copy_page(void *to, void *from) #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) -#define vma_alloc_zeroed_movable_folio(vma, vaddr) \ - vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, 0, vma, vaddr) - #ifdef CONFIG_STRICT_MM_TYPECHECKS #define STRICT_MM_TYPECHECKS #endif diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h index 416dc88e35c1..92fa975b46f3 100644 --- a/arch/x86/include/asm/page.h +++ b/arch/x86/include/asm/page.h @@ -28,9 +28,6 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr, copy_page(to, from); } -#define vma_alloc_zeroed_movable_folio(vma, vaddr) \ - vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, 0, vma, vaddr) - #ifndef __pa #define __pa(x) __phys_addr((unsigned long)(x)) #endif diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 8b0afaabbc6e..642718a50c27 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -303,7 +303,6 @@ static inline void clear_user_highpages(struct page *page, unsigned long vaddr, #endif } -#ifndef vma_alloc_zeroed_movable_folio /** * vma_alloc_zeroed_movable_folio - Allocate a zeroed page for a VMA. * @vma: The VMA the page is to be allocated for. @@ -317,12 +316,15 @@ static inline void clear_user_highpages(struct page *page, unsigned long vaddr, * we are out of memory. */ static inline -struct folio *vma_alloc_zeroed_movable_folio(struct vm_area_struct *vma, +struct folio *vma_alloc_zeroed_movable_folio_noprof(struct vm_area_struct *vma, unsigned long vaddr) { - return vma_alloc_folio(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, + return vma_alloc_folio_noprof(GFP_HIGHUSER_MOVABLE | __GFP_ZERO, 0, vma, vaddr); } +#ifndef vma_alloc_zeroed_movable_folio +#define vma_alloc_zeroed_movable_folio(...) \ + alloc_hooks(vma_alloc_zeroed_movable_folio_noprof(__VA_ARGS__)) #endif static inline void clear_highpage(struct page *page) -- MST