From nobody Fri Apr 10 00:56:56 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 2E3623E0C55; Wed, 4 Mar 2026 19:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772654349; cv=none; b=E81NHpKjACjPs398F041u0vQdbPhcwdLNJfY9Ub/yovSfayzSTHXn7/40z/3zFM6INc0416y/HPoY9oq7sGkkAiemeAr9QqzeB3LWs0I1F2fiOZGVZD1cm3XIPZB/pvcYnQro39mk43uQjsEimH6ouY9ue55UDTslcNz+5y7tzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772654349; c=relaxed/simple; bh=ZD4WhLeWj9/UhNXpLGTwk7FIJhb6PaWPksxbyJpD0oQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=J0+tGDpjoRxCyHw92JM/Cx7ZA21Nxzuy/U8AO+IrvRxHorcrNuLl9Gcfq26yJzqnJaX7zwCLAGybwGn205DYVuLsCrWoJnMzGxDKoZX/Cj4Lnc0xfjHV/jif3C1I/UxAQySWGR7jyq09oTQEWWN2rBOze2OCtd0Z8AkyTLax7pE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nb+d6Imj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OlrR8FHn; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nb+d6Imj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OlrR8FHn" Date: Wed, 04 Mar 2026 19:59:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1772654346; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q3vuh0eC3AwwCTrahJzri/RvjA4yCinww2FxKCg1XO8=; b=nb+d6ImjilYaRGyS/LD7N/K4UOe9YK6/ZFC086Ok5tkDhseOaoSBXPi/qFJLygKUP8TkaO BAvYQQajERUibKA5sRLocMiRxop27Mzdtvd+Ljfr4MiJUVYfLOWHJFVwMmmspqfjxt0znu 0zMu6r10WwW+f4ZiM/25jBMzzr413irJf+GxtkICmcpUVbRTMr5bF/4LLtdRFlAnbMzoku 7iQ9m8aVtZUBGsepkSav0Rq6pSCQH/hI+pW2pNwrcd2m2V1fVKIDVWQ7uL3YvTSf0xKiJM yxq62lBBJZvRvcq4u7/XVL8XCQM6RLS3D6W3LyUluVVz5U95TdPAK1dsZD3UxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1772654346; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q3vuh0eC3AwwCTrahJzri/RvjA4yCinww2FxKCg1XO8=; b=OlrR8FHnuRn7talynteU8A9+SrVU8SpxNWEYzLlj34e4QWAdARyBaLvDT94C2V2/DDLRjq 8xyZ5gfx9YQ2/tCw== From: "tip-bot2 for Vishal Moola (Oracle)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm/pat: Convert pte code to use page table apis Cc: "Vishal Moola (Oracle)" , Dave Hansen , "Mike Rapoport (Microsoft)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260303194828.1406905-2-vishal.moola@gmail.com> References: <20260303194828.1406905-2-vishal.moola@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177265434552.1647592.7116984595616180374.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/mm branch of tip: Commit-ID: c22ca4a96300c8ed01fe2282d2dd9e9a75032379 Gitweb: https://git.kernel.org/tip/c22ca4a96300c8ed01fe2282d2dd9e9a7= 5032379 Author: Vishal Moola (Oracle) AuthorDate: Tue, 03 Mar 2026 11:48:24 -08:00 Committer: Dave Hansen CommitterDate: Wed, 04 Mar 2026 10:08:54 -08:00 x86/mm/pat: Convert pte code to use page table apis Use the ptdesc APIs for all page table allocation and free sites to allow their separate allocation from struct page in the future. Convert the PTE allocation and free sites to use the generic page table APIs, as they already use ptdescs. Pass through init_mm since these are kernel page tables; otherwise, pte_alloc_one_kernel() becomes a no-op. Signed-off-by: Vishal Moola (Oracle) Signed-off-by: Dave Hansen Acked-by: Mike Rapoport (Microsoft) Link: https://patch.msgid.link/20260303194828.1406905-2-vishal.moola@gmail.= com --- arch/x86/mm/pat/set_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c index 40581a7..a4b1b32 100644 --- a/arch/x86/mm/pat/set_memory.c +++ b/arch/x86/mm/pat/set_memory.c @@ -1408,7 +1408,7 @@ static bool try_to_free_pte_page(pte_t *pte) if (!pte_none(pte[i])) return false; =20 - free_page((unsigned long)pte); + pte_free_kernel(&init_mm, pte); return true; } =20 @@ -1539,7 +1539,7 @@ static void unmap_pud_range(p4d_t *p4d, unsigned long= start, unsigned long end) =20 static int alloc_pte_page(pmd_t *pmd) { - pte_t *pte =3D (pte_t *)get_zeroed_page(GFP_KERNEL); + pte_t *pte =3D pte_alloc_one_kernel(&init_mm); if (!pte) return -1; =20