linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Jann Horn <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com,
	luto@kernel.org, sai.praneeth.prakhya@intel.com,
	peterz@infradead.org, bigeasy@linutronix.de, x86@kernel.org,
	hpa@zytor.com, mojha@codeaurora.org, dave.hansen@intel.com,
	jannh@google.com, tglx@linutronix.de, bp@suse.de,
	riel@surriel.com
Subject: [tip:x86/cleanups] x86/mm/tlb: Define LOADED_MM_SWITCHING with pointer-sized number
Date: Fri, 29 Mar 2019 07:04:13 -0700	[thread overview]
Message-ID: <tip-a72a19327b92e09dab0eb9fd2bc83466465cbffb@git.kernel.org> (raw)
In-Reply-To: <20190328230939.15711-1-jannh@google.com>

Commit-ID:  a72a19327b92e09dab0eb9fd2bc83466465cbffb
Gitweb:     https://git.kernel.org/tip/a72a19327b92e09dab0eb9fd2bc83466465cbffb
Author:     Jann Horn <jannh@google.com>
AuthorDate: Fri, 29 Mar 2019 00:09:39 +0100
Committer:  Borislav Petkov <bp@suse.de>
CommitDate: Fri, 29 Mar 2019 14:55:31 +0100

x86/mm/tlb: Define LOADED_MM_SWITCHING with pointer-sized number

sparse complains that LOADED_MM_SWITCHING's definition casts an int to a
pointer:

  arch/x86/mm/tlb.c:409:17: warning: non size-preserving integer to pointer cast

Use a pointer-sized integer constant instead.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Sai Praneeth <sai.praneeth.prakhya@intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190328230939.15711-1-jannh@google.com
---
 arch/x86/include/asm/tlbflush.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index f4204bf377fc..90926e8dd1f8 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -167,7 +167,7 @@ struct tlb_state {
 	 */
 	struct mm_struct *loaded_mm;
 
-#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
+#define LOADED_MM_SWITCHING ((struct mm_struct *)1UL)
 
 	/* Last user mm for optimizing IBPB */
 	union {

      parent reply	other threads:[~2019-03-29 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 23:09 [PATCH] x86: define LOADED_MM_SWITCHING with pointer-sized number Jann Horn
2019-03-29  7:32 ` Mukesh Ojha
2019-03-29 13:57 ` Borislav Petkov
2019-03-29 14:47   ` Jann Horn
2019-03-29 14:04 ` tip-bot for Jann Horn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-a72a19327b92e09dab0eb9fd2bc83466465cbffb@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bigeasy@linutronix.de \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mojha@codeaurora.org \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=sai.praneeth.prakhya@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).