From nobody Fri Oct 2 03:44:11 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 2C93445D1BD; Wed, 5 Aug 2026 12:26:52 +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=1785932814; cv=none; b=GRPoOf0ilZI69/138qlilIAzxNLwj+KXihxPSXyFHfsTacYaH5s5R+ps9iee/B+oRRtFR7YdfEgd6u+nZq/ewDDxdeKWZ2wZHiqssIBjh01gqLJZ+vuBidMgg5NsYGoTL+9/NkahxsDs19vYi4ejoyQfo7J4oUqBK5MpgAH4O+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785932814; c=relaxed/simple; bh=mUyUGCgSA6yWEiPnXyqGoo/X2vm9AjofFRss1Q0FzaU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=hEhRIA1E7qX69Vu+UM85jTeDLcn7leQ9rnhEbu0vkQviB2daznDlcANx+Y4ICZNbV3jnnEA9LA6WbdBIi6QqpsJjq8BZPfEswXxPPsM1yiEa5MCVIj8zfr3JPDHA0F4vQe3ZhtwIuaXlDHmXPRJCWlTEUtB6iz75HQg9bPvotDU= 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=wojZ5IIj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DsCuJ2UP; 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="wojZ5IIj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DsCuJ2UP" Date: Wed, 05 Aug 2026 12:26:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1785932811; 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=JGZT+GVRZ85btGaqWT8l2xbY65lWb093KGp2Cct1f6Q=; b=wojZ5IIjyclNtvFug9MWZyri8WGS+e3Dk/19Tpd83PvixtYJJVWvle5g515OUyHdU13HE7 2Ph3hKjf/ak8ARLpxYUm1q/ANy32pIgN/0VmDi8cE7YFD2ApA1NW8n+FPfwEgS21C2wizz Iy43li9WMLyIOBQA2fEkfbtQMRkvohir9pslnlbVaij1xEphv64LZreubx/R+HNvzOG00R fK4iu/gfHhtHf4unOdt6fTWEpCGkA6+rdA0GNokJag7ITun+w3xrh9sHKdir/vyImOjuKX VD3QBHvqjdCD+S8xwVTYoXueH5XwkH4JwIp3bgE1LUxm8wymt5AbEMznd2IRsA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1785932811; 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=JGZT+GVRZ85btGaqWT8l2xbY65lWb093KGp2Cct1f6Q=; b=DsCuJ2UPm+yGkBY4b46vvAVHWccT9cmOztrRyhI5ua8bV5aoxkLyV1bjpOVtq/mS+gREp/ N/KCNNd7Mt9w+3Aw== From: "tip-bot2 for Peter Zijlstra" 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: Use guard() in cpa_collapse_large_pages() Cc: "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260729111119.375614011@infradead.org> References: <20260729111119.375614011@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178593280988.708.15483140992252723625.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: c980eafc5b738f274b36fac634f06ff000a07038 Gitweb: https://git.kernel.org/tip/c980eafc5b738f274b36fac634f06ff00= 0a07038 Author: Peter Zijlstra AuthorDate: Wed, 29 Jul 2026 13:08:08 +02:00 Committer: Peter Zijlstra CommitterDate: Wed, 05 Aug 2026 14:19:35 +02:00 x86/mm: Use guard() in cpa_collapse_large_pages() Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260729111119.375614011@infradead.org --- arch/x86/mm/pat/set_memory.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c index b1e780a..fc6a1b2 100644 --- a/arch/x86/mm/pat/set_memory.c +++ b/arch/x86/mm/pat/set_memory.c @@ -417,7 +417,7 @@ static void cpa_collapse_large_pages(struct cpa_data *c= pa) int collapsed =3D 0; int i; =20 - spin_lock(&cpa_lock); + guard(spinlock)(&cpa_lock); =20 if (cpa->flags & (CPA_PAGES_ARRAY | CPA_ARRAY)) { for (i =3D 0; i < cpa->numpages; i++) @@ -432,10 +432,8 @@ static void cpa_collapse_large_pages(struct cpa_data *= cpa) collapsed +=3D collapse_large_pages(addr, &pgtables); } =20 - if (!collapsed) { - spin_unlock(&cpa_lock); + if (!collapsed) return; - } =20 flush_tlb_all(); =20 @@ -443,8 +441,6 @@ static void cpa_collapse_large_pages(struct cpa_data *c= pa) list_del(&ptdesc->pt_list); pagetable_free(ptdesc); } - - spin_unlock(&cpa_lock); } =20 static void cpa_flush(struct cpa_data *cpa, int cache)