[mm-stable,2/2] x86/mm: always pass NULL as the first argument of switch_mm_irqs_off()
Message ID | 20240222190911.1903054-2-yosryahmed@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp159812dyb; Thu, 22 Feb 2024 11:23:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRmIDwJkZEjWAYfOjRTD9c6zYk5Kc3/Dmhw0d1vIu6Djy5TXLznoL27dZUSMtYNnnZGUvuUwY+zK918nAgbqVXn00icw== X-Google-Smtp-Source: AGHT+IH4Xi9EMVDJCvcH9TiZsG1oso/EcJ/D1cAoQt+aEM47boukThhiH75ifOxiz69YzqDOc2mC X-Received: by 2002:a92:c688:0:b0:365:696:2817 with SMTP id o8-20020a92c688000000b0036506962817mr20033778ilg.3.1708629833246; Thu, 22 Feb 2024 11:23:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708629833; cv=pass; d=google.com; s=arc-20160816; b=pbkF7A0GUI1lxpk/1dXZJ9p2qdwvLj46C+7X7R9YKNYpMTvXa9XIDEZnocmGagSk4A AdefC3NTeTh2s+SPE2RZzcnjiyJ4MIFUffMGZdHiXYjy0V35jLo3h1Yh4dsfHVIcn7UH wy9+/kDbu/0V8YTW8fwoaMuu5e/otFvn22i39MdzfhxCd15mo3EQdRTCrCdqf7LZuJJ3 ZDa05pTOG3EnMjY/IbTU7LmyH6/8iCxac1nqMeSpzmZXXpVtkcEAK2vtwSWrrFl17fw7 3AatlMtr/u/1uFv/NR95gwAbxeId5YuNFv76IxUpzlN21t0kk9X2j34bQWQ+WuzshnY6 GNqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; fh=rsLmcDHJS0VQ9tQ37sxJaDxU+cmiK7KQCu+ciPjP7vg=; b=xEo0PWqyM6M38PunZiP+Tg3nzy4f9zJXGfIyN3+dP7F46jwljIHFDUrDnmVe5mbkZX jHHvzoI88U2W00HlLnqZ8A3gTQUPG14AkmZnDNBa1kavzMlCG/0ZSVxTFn6yzlcWo4zZ ZDB6dRhMv+emoOavudQRHuAWbEI9gynSNPtwmSTKSyW4yXhf1taK9yOhJEO9nJxk2ZHU kywzdR3xSoimpyoK/L9R2z+8j2AwQlrxmSV/GwxKDJZscjxzqRgryJmFjo4bkmy1c+As 2bndzEDGwCi6Wj3UUiKYmo2qF5rCkED4DfbVukk7fFJaqHY+Arq4dZSr0N8a870NYrR9 45Bw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="S9e9J/eQ"; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w30-20020a63af1e000000b005d8e1dc1df8si10795490pge.705.2024.02.22.11.23.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 11:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="S9e9J/eQ"; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77224-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B4E9129042D for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 19:10:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C1C76E613; Thu, 22 Feb 2024 19:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="S9e9J/eQ" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E48D548E4 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 19:09:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708628958; cv=none; b=Xm2bxfAbGLJTbZFjxVuEbAQk0uV+upP2AJbXBkpEkgCV/3bt12MWsnF/B2ho7G/6+hg4M2NUa12Mdkx+IEa1BmqPvfw902ULwGJ88MP0/7ynvstnYDkqd4tAjs3Y+lnqrqbzN+ixZEMhEjsqGklf9CCNGAz7sqkWylHr3dg8I3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708628958; c=relaxed/simple; bh=WbHoUINdvI+/EfoRmUSXGRsEKi+kuIuXKJxB7X2GgEo=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EB6eVRXIy5ZJOA/pYsePQsRfvgAJfMZXdQqJMVD3mofa8Agm2Kh/PNU35MSTVIf3dEuLljCk7wpWUfRsezhO9Io/8QnBTTEeRPJPrUwkg2j8nhtByUBc76Xbe0t+4I5Y7VIdy7ZfFpLaquPyaTn0IPnd7CWGhxgNu6E3IsCq4+g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=S9e9J/eQ; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dcbfe1a42a4so32864276.2 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 11:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708628955; x=1709233755; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; b=S9e9J/eQcigEc8zHdVHcndZCj2dXG8BLaBrgtI089iuuba1qzciO+DxUWOnwWjGP4H CPnQHsETzRUF1Y5nyrCZsSBF19w+iXOBJ9Rfhy7ZYmqjPDIJt68OhE2v3Y+2Ze7enBST GjrCL8zanmljR5YFgeBaHiTfiYhOQbBlQVCR4fjFgpch9CbokHtFMk0xh8dk5XN2UM63 A0HxYTnj4H5lyIF/G0ZV4r5KkGPv6efvuCm4QeElg5wIl64fj3VK7uUh06TuBHFVurCe EOS6G6e/RJbHWDEg1Ltzr3WdC3jpG8inu4LPhkLPwv7qtcIU0Iy45f0x9K/yiswnLuXZ rufw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708628955; x=1709233755; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; b=JHo0Ju57skc7B0kVQhCOD9VvZcfLSV1qS9SC3kKA3rEnXDtf5srV7rxVg6mKcN3hds lXIjIKlW5/PPPueOPsGO1ZJdoRBmg6tDfoCs0ueKs3VmAZ9qVI6RA2IooyowD+Bj9tST wKFHx10trYoavO+5/zXgRd+cs0ZLbiPhJPxGCl1VYntlGrcXmp5Z0RJPS9U4bMDgKyt3 1hXEJ0DwCYbGIEGeaAioDQpLuwk033h+W+UTFQTU4L84+yIFbCj9Tfmi4mJsRVrPHb8p DT67WpYrYDSpDvd88iyYmHsUJJv7/n9U31HFH+no03MY1u92jO7ke77QDfFzrbzKvW3z 5W/w== X-Forwarded-Encrypted: i=1; AJvYcCXHqL01D33o3gYACh0puTSwLwPtBqxBRe2R62zTuzz7Sw1TDy2eOG011ogq3XiBBFQn91kwPwDcfJGYlwY/viWDBkgsAViq9I+wWjx6 X-Gm-Message-State: AOJu0Ywa7c9nl59wS77I/dhAYEC9r17XLlRWVr1KnNuXXN94Umv8A1Tj GIityoy2zDQKAf0CoiK6X4xZlSsk0C5EnddMRtyWIKYD5SCsdP2IjH0EIrHBh1Jzqa6JIBH/AP0 gPlvQvn1v5lOvZUf0EQ== X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a25:abd0:0:b0:dc6:cafd:dce5 with SMTP id v74-20020a25abd0000000b00dc6cafddce5mr6172ybi.12.1708628955435; Thu, 22 Feb 2024 11:09:15 -0800 (PST) Date: Thu, 22 Feb 2024 19:09:11 +0000 In-Reply-To: <20240222190911.1903054-1-yosryahmed@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240222190911.1903054-1-yosryahmed@google.com> X-Mailer: git-send-email 2.44.0.rc1.240.g4c46232300-goog Message-ID: <20240222190911.1903054-2-yosryahmed@google.com> Subject: [PATCH mm-stable 2/2] x86/mm: always pass NULL as the first argument of switch_mm_irqs_off() From: Yosry Ahmed <yosryahmed@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave.hansen@intel.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yosry Ahmed <yosryahmed@google.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791627596173202862 X-GMAIL-MSGID: 1791628236321689956 |
Series |
[mm-stable,1/2] x86/mm: further clarify switch_mm_irqs_off() documentation
|
|
Commit Message
Yosry Ahmed
Feb. 22, 2024, 7:09 p.m. UTC
The first argument of switch_mm_irqs_off() is unused by the x86
implementation. Make sure that x86 code never passes a non-NULL value to
make this clear. Update the only non violating caller, switch_mm().
Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
---
arch/x86/mm/tlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index b67545baf6973..51f9f56941058 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@ -327,7 +327,7 @@ void switch_mm(struct mm_struct *prev, struct mm_struct *next, unsigned long flags; local_irq_save(flags); - switch_mm_irqs_off(prev, next, tsk); + switch_mm_irqs_off(NULL, next, tsk); local_irq_restore(flags); }