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 1EB14405C33 for ; Fri, 29 May 2026 15:23:25 +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=1780068206; cv=none; b=FddooqwYOj1UcSjF/CihuF+ltvjWw5gzsGjeJnqjgotRyUhnLNzZi6m6H5jmFjjU7x6QJNN3XdEunj264TLJXPntQQxpHH37bSKV96HVTO80UXCyadeUJxKfN2i60R3nLFL3WaS/OJd02M6L+DLS2irsZENHefFn7qhjZj3iZv8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780068206; c=relaxed/simple; bh=+lLqKB25GJ8Nk/N/QA5/TP30kbyhPVpqAySiqciCa4w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hn6qXO4XyLJIRA6c3ccMI80ti2Cxb/apViDbdArmJ1c1KYOsor5N7npuC16MA8y4zCnq0fwqLYLomlWaHoj6dj7i59gMK7r0FWm5AnntFXTTdjtZqxpnANHzt2SFQMCyoq/wzWXaxnqO+Dhaky1pAtF0irVQvo6ki+aHCG80krE= 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=dK1aQaXX; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=OlpWIUV4; 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="dK1aQaXX"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="OlpWIUV4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780068204; 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=yTMC7Vi3qz2eQrpu1XXxCoOuK0TKvwPfinMf53HH2Ps=; b=dK1aQaXXY0JHN4RWNfdQ7XY4BkKGITOeYoyRCWADUc9ezTd7k69HCpRBziJ2yQutO8zFKb tnYq9L+hrAU3tbOEl6KlaHlku4L7uP41oAkZ/7lQdM0mDoiQdHO7a1nGc+50+KQaO3/lGe 9JTjgVfOS6zLKKaB7htJRbukbu9eJiA= 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-630-tP0DxZgcO1yPNWfKyMliyg-1; Fri, 29 May 2026 11:23:22 -0400 X-MC-Unique: tP0DxZgcO1yPNWfKyMliyg-1 X-Mimecast-MFC-AGG-ID: tP0DxZgcO1yPNWfKyMliyg_1780068201 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-48eb0da933fso93822945e9.0 for ; Fri, 29 May 2026 08:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1780068201; x=1780673001; 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=yTMC7Vi3qz2eQrpu1XXxCoOuK0TKvwPfinMf53HH2Ps=; b=OlpWIUV4FBBPwNsZ8qu2qqvQdMJThXFnzKBbUjl2YYo2oIEEYHnOsaLdXgAAlPqVR4 GKS75CfNj+cenXZL+x15szsXRcDIkwX3LercyhdytT+R62VEEqutvamNuhemslzo5Lh2 h/u0ahzxw2bZD32vXs+uXuHm5bM3aVXHZskesPM4ztyaMTnYa7Llx4EE/9dj5GVfd+w6 ovL166BG6fZThuKkTxi8SUZ4vF+CitxBveclW779oNWgKt3SU90rwfd1f7ujkVSypGyX BfC3XDvcViZlt8IuXtrSIICY6LMTf1wQxDIpp5B3i9FKutEZc4JmF2dp/qEYv5tCq03X g5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780068201; x=1780673001; 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=yTMC7Vi3qz2eQrpu1XXxCoOuK0TKvwPfinMf53HH2Ps=; b=s7NGJDGRLtPw5Ax1PzEp8JcJaZq/SfIJ4udUBhLlu3IUsQ/mYZgORlsO2Y9lRFMQRv IjsCyKkNqhQTPhr7sqoydJUgy6Beayzd+ev7eLVV6HkpRHIA+6dPn0tPJTwVoPe7vqH2 /4NoHyGeXXQau0QBgUipkp3hnXBfdQ8tBaIjnRuzM0CoSHjZT1raccg9T7bEQrCbLj72 bqUmfdwogtRLMpcpTcWKPzqNGO+Kai8FJshAnt+gyUuFW/wqp0j8b27NkBhSVx2Rr9jK ld2JhDuFdRGp6Hel1rXlvylgHjsfkDbYsHvs539IHl+m/vK6m9P+qLj0ykwTuIxUAhHF C+4w== X-Gm-Message-State: AOJu0YwkbLGZ62oqGhicex/IBkdWeAGVy1YHhiGbJ1KQueRoYkjuSz45 GSoihkGJq1GP1zWWIPmeFFMYocbFEs1ohqM1bUl1ZUM9LpZjopmkOnnNRMEcXACnJCgorz1Tc+z 7m9PcxGCTPgqctK/wwTlV7VK1FtMZ4L0UxZTwpZTOmhVbYcJKUdR6GBz/o388khXZVuUsIPsWD7 NYqTjZYMoncVPQQuCiQDm5rwMdZoWTIHNEVlZFxTc1LR4= X-Gm-Gg: Acq92OF5xwMlD2GENsCuY0vSmFn5j+IluJmxX35P4hrEucqteKvXJE7DGlBREuBjhz5 DvVQmqZJbOGNbkUD2AO0me0E2NJzN3uKtK8Y6vESYPsOMGSNB9TknutyxeLe70zlNXkuO6sJ8oV WxWz2vmbLEnE+RtC7gBVEBLP9z8o0XczTrCyDD9Oer8jvWpdAE1LPrNfjxsXJEHHLwYvjPNW8UZ +7RuCGQrBx9MXDxxabZHzsuv1ohz0oxx7+U9C+IWxCqAZ4y8N7nzm4VzyjYefjHNL54DURi1GF+ Jk3hKeMFOHzVVpOBzUkVuFMTTs9DdkfwYftLHYr7hVzW88jvN/6mX+2nj55eIFf4+q6pjKuj/e5 7Hg8rYHaiDpuUooVY75ewxL3yOlyUoh2iLsIQAsvwM6TMyY1QeNNqCQ== X-Received: by 2002:a05:600c:4fc4:b0:490:6889:202 with SMTP id 5b1f17b1804b1-490a29639e6mr548255e9.29.1780068200978; Fri, 29 May 2026 08:23:20 -0700 (PDT) X-Received: by 2002:a05:600c:4fc4:b0:490:6889:202 with SMTP id 5b1f17b1804b1-490a29639e6mr546645e9.29.1780068200009; Fri, 29 May 2026 08:23:20 -0700 (PDT) Received: from redhat.com (IGLD-80-230-25-45.inter.net.il. [80.230.25.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d6f35f8sm40956085e9.13.2026.05.29.08.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 08:23:19 -0700 (PDT) Date: Fri, 29 May 2026 11:23:13 -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 , Richard Henderson , Matt Turner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-s390@vger.kernel.org Subject: [PATCH v9 14/37] mm: remove arch vma_alloc_zeroed_movable_folio overrides Message-ID: <17905f527ee63479bd406efc228acf481a54b2d0.1780067977.git.mst@redhat.com> 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.27.0.106.g8ac3dc51b1 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 ffa683f64f1d..7b5955bf9336 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