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.129.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 74CB23BED4A for ; Wed, 20 May 2026 22:21:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779315711; cv=none; b=KAQ8zzHSpC1V8OQIaiYsXudpBMwUTdPy+cgyfQnPYb2lrzfQHlQSlKiCVTW3CMmTwt8pXJywsqggJ1/xnN2qEnNFBfsFC0tquvmwzvLqHbnx2bV2F9rErWLuPgyngqOEZI0nfqki9f/GLUMLmgEgZ4t39KiLzQ9YxEq1VG2z6s4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779315711; 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=hm8iYlrkFFzChp4vFPlmEVg8H2W7DlTTkwkvuFrahs6jIt9rj/aXYvoXG/X9J8pt4AeL6ey6I9LrfYgWiWjdFG+FZ/BaDUXH1+pmhH8eegwXaGWPcZQHELc2esUiwQRM2rvz9ZuEr/K3aYH+Lj/9eysQFtQZvzMQrdvs9jC7fBo= 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=Bap42vw2; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=GIiPUiFe; arc=none smtp.client-ip=170.10.129.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="Bap42vw2"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="GIiPUiFe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779315709; 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=Bap42vw2MtpEJ4+5RwJUJZTWCTx3n9+bIhYdNYh/9G+wNwQNAiGwG216inxcBXm1U5ZTUZ +m08fc+j9KiOeJDhY5NMZksg+gYp75gma8ljBP181i09CYNVBbbbkkW3GnA4ab47KK7M03 WT1eOnA5UUAbrYOhIBAy7peZkgYDHeQ= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-213-fb4tmiewO9SuQJjSYxo4CQ-1; Wed, 20 May 2026 18:21:48 -0400 X-MC-Unique: fb4tmiewO9SuQJjSYxo4CQ-1 X-Mimecast-MFC-AGG-ID: fb4tmiewO9SuQJjSYxo4CQ_1779315707 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-48ff0eb77b5so51027585e9.0 for ; Wed, 20 May 2026 15:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779315706; x=1779920506; 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=GIiPUiFeyXoYfQcSzCQ8UDLKNF8eIxCGoGWYZUAP2105svD2H6KOUyYeVB/Xr6sMva 3BowiY+z5O5SrdheNyzuqgpyYM/zshTqAAXW7g04eN0C8eL1Au+kUrpa9Xiuobj1UpoT 2awR7+9l/TNjwnv5QdShBeZjYM794QlHyumKE21++S52oDAQ9cjQy7617xplq8PJxteE 7s2fgPlDrVBD7v/BxhdCdTcuExdsWcu6iOogWguLL1dwSU3xPudt+5MlOGxt9Y/qUdO3 32BAWJ+t7w/zg5DBl7xa11mSmhIG7hfAXnJGG1z8Z2kxetk015oSEB71v4lLLG/SnqC/ mPPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779315706; x=1779920506; 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=qQm/t2rzAzXGZihxrw4dZQtzFnk+V/ZvAm265nHNlbh1cL3qIRXa5pFSOzDrNKve3d 57BeyTohTpwgYiuQ2ILnvwnwQAjdpBKvw+7tSc741cvl7gclvIlDLthZMCf5QW1rKLSW VlZIRJmLSGF6vxR9tdWyYz8QiSPUKr9vakLi/a0CalvMef+68fdGj4AeHFpippNUeqla jgKMioe1DUHhv44SLf3KaskJuHxf5KQAG2vTBVqy4ujoa2ezG61+IQurMwFGtNBs6Cjp 6NtcuV6IERArd9RR2ebF+cJNL5HFLtNVM7Frft2Y12wn7XArDnCiKMvXk5L2GlCCRKlB g3gA== X-Gm-Message-State: AOJu0YwDeZuzgX6sk3reeSxmgjOntmCZefyR/0XEVoFjMCr32XGmit+Z hDCh9R/aweMRaavNtsE19yU9G5psW9x8OmhHRlOZvGxTSrR1BllzPNQYLtUv+3zMuRQFLgzkGXF FEVC3OaMQ8S0Lm8ifOZbD8qPNZSQbiyYgOLOetXxgj0la/08BOo0s33AEtaHndu/xBpp5Bya04L dKULhdZ3bx9P/5E3UPknl57/oGR7voHWAuKEjibMoGsw8= X-Gm-Gg: Acq92OHjaJp4Gp8X6sOYOVaKndn3L5qbTe2T+f6qbhu5/gEfWgZ1iO/eLQfhLPQre8l Hv3QtVwHV9zZevVChn0bVFxqASbjHJmrIpol1c+olPbqL1gM6bOPTteVHKI3TbV433k8nNcENnA SNkftCPfxZS1YhEIga7qVdaaqJprbrwF3DAWILE1UI85GWnkV6gGOJf8IhEzoyknv8YRyKWVrnR nseIEjdMAcaDeMTQ03BZk8eY1UUjL378d2yO7mYTx/xgD86+sFNCWzkSd75nT8ACbhghr4BZXex WtXwnRm5/TqgvPXKfQSA4cnJIbbrWHVdUWkHctP7Tf/+WP43MMqkDNdrUhLmKSBLjyvaTVAM0oi PfJQi4kHxDj9AVa8bW+lkLSilD7uc6z4Okof6yzasW0cX/sulyhoNQA== X-Received: by 2002:a05:600c:492f:b0:48f:dfe3:dae3 with SMTP id 5b1f17b1804b1-490360af200mr1567485e9.17.1779315706281; Wed, 20 May 2026 15:21:46 -0700 (PDT) X-Received: by 2002:a05:600c:492f:b0:48f:dfe3:dae3 with SMTP id 5b1f17b1804b1-490360af200mr1566725e9.17.1779315705516; Wed, 20 May 2026 15:21:45 -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-49033d8e24bsm20846035e9.10.2026.05.20.15.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 15:21:44 -0700 (PDT) Date: Wed, 20 May 2026 18:21:38 -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 v8 14/37] mm: remove arch vma_alloc_zeroed_movable_folio overrides Message-ID: <9c2ac9d2fc159822b9fd6cb1304bf222324d70a3.1779315441.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