From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 00FE02E92C5 for ; Wed, 3 Sep 2025 20:51:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756932694; cv=none; b=AntxlN0OfY5NW5NTdhJx5oa655tBQQmcv7r+EikePlTzyaW1gGwv3zFoUL/MW0IU516JsD/X6PJecl8huKHbbNDBTcf4aAu7+FfTyCwsgfGD2ZaswUaFmi8DBfk4Hu5mBBcTc8io6QsPrf8+PG00dxqUNkkOi04pnHmERX4xub0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756932694; c=relaxed/simple; bh=XogN0C1AR9VJxGsHYuW+0UILfDUhP1G0sSjAuevq2xQ=; h=Date:To:From:Subject:Message-Id; b=GBoSp+4P+85L92hUbaPCcWw1BaxqsfBtb9UcikiInCWVnJd/ZHpSi6ftmwbf/ZtjdZI814ShI7nns6NW9nHdE+VjNRqd83RRymTnaFaikLvSA/qjo49FLRDObVUnQKkVlQEXcu/f07qKkkGpYthtgAzaCsqtQ266SpxBfBvAxk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=A5al6H8i; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="A5al6H8i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4DC3C4CEF7; Wed, 3 Sep 2025 20:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1756932693; bh=XogN0C1AR9VJxGsHYuW+0UILfDUhP1G0sSjAuevq2xQ=; h=Date:To:From:Subject:From; b=A5al6H8in4wfmVrVdvkfmdXrFCtmb0jsMtscqYfVa1BeM7HXz48AQh96UHdHox832 sCm3eDKiqX0ABoPULKkXRoBy0GE8RTdNysOMNpVxHq6ixGyCzeeWP7Gg/se8Zn6Np6 b2Fc6cM7e8pRdEaKvSoa+3mG5Nz+ECc+LOwfvxzg= Date: Wed, 03 Sep 2025 13:51:33 -0700 To: mm-commits@vger.kernel.org,willy@infradead.org,will@kernel.org,sj@kernel.org,ritesh.list@gmail.com,peterz@infradead.org,paul.walmsley@sifive.com,palmer@dabbelt.com,mst@redhat.com,mpe@ellerman.id.au,maddy@linux.ibm.com,luto@kernel.org,justin@coraid.com,david@redhat.com,dave.hansen@linux.intel.com,catalin.marinas@arm.com,axboe@kernel.dk,aou@eecs.berkeley.edu,vishal.moola@gmail.com,akpm@linux-foundation.org From: Andrew Morton Subject: + riscv-stop-calling-page_address-in-free_pages.patch added to mm-new branch Message-Id: <20250903205133.A4DC3C4CEF7@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: riscv: stop calling page_address() in free_pages() has been added to the -mm mm-new branch. Its filename is riscv-stop-calling-page_address-in-free_pages.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/riscv-stop-calling-page_address-in-free_pages.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: "Vishal Moola (Oracle)" Subject: riscv: stop calling page_address() in free_pages() Date: Wed, 3 Sep 2025 11:59:18 -0700 free_pages() should be used when we only have a virtual address. We should call __free_pages() directly on our page instead. Link: https://lkml.kernel.org/r/20250903185921.1785167-5-vishal.moola@gmail.com Signed-off-by: Vishal Moola (Oracle) Acked-by: David Hildenbrand Cc: Albert Ou Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Dave Hansen Cc: Jens Axboe Cc: Justin Sanders Cc: Madhavan Srinivasan Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ritesh Harjani (IBM) Cc: SeongJae Park Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/riscv/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/riscv/mm/init.c~riscv-stop-calling-page_address-in-free_pages +++ a/arch/riscv/mm/init.c @@ -1624,7 +1624,7 @@ static void __meminit free_pud_table(pud if (PageReserved(page)) free_reserved_page(page); else - free_pages((unsigned long)page_address(page), 0); + __free_pages(page, 0); p4d_clear(p4d); } @@ -1646,7 +1646,7 @@ static void __meminit free_vmemmap_stora return; } - free_pages((unsigned long)page_address(page), order); + __free_pages(page, order); } static void __meminit remove_pte_mapping(pte_t *pte_base, unsigned long addr, unsigned long end, _ Patches currently in -mm which might be from vishal.moola@gmail.com are mm-tag-kernel-stack-pages.patch mm-page_alloc-add-kernel-docs-for-free_pages.patch aoe-stop-calling-page_address-in-free_page.patch x86-stop-calling-page_address-in-free_pages.patch riscv-stop-calling-page_address-in-free_pages.patch powerpc-stop-calling-page_address-in-free_pages.patch arm64-stop-calling-page_address-in-free_pages.patch virtio_balloon-stop-calling-page_address-in-free_pages.patch