public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: pbonzini@redhat.com, kvm@vger.kernel.org
Cc: like.xu@linux.intel.com, vkuznets@redhat.com
Subject: [kvm-unit-tests PATCH] x86/pmu: Fix compilation on 32-bit hosts
Date: Tue, 16 Jun 2020 12:59:40 +0200	[thread overview]
Message-ID: <20200616105940.2907-1-thuth@redhat.com> (raw)

When building for 32-bit hosts, the compiler currently complains:

 x86/pmu.c: In function 'check_gp_counters_write_width':
 x86/pmu.c:490:30: error: left shift count >= width of type

Use the correct suffix to avoid this problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 x86/pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/pmu.c b/x86/pmu.c
index 57a2b23..91a6fb4 100644
--- a/x86/pmu.c
+++ b/x86/pmu.c
@@ -487,7 +487,7 @@ static void do_unsupported_width_counter_write(void *index)
 static void  check_gp_counters_write_width(void)
 {
 	u64 val_64 = 0xffffff0123456789ull;
-	u64 val_32 = val_64 & ((1ul << 32) - 1);
+	u64 val_32 = val_64 & ((1ull << 32) - 1);
 	u64 val_max_width = val_64 & ((1ul << eax.split.bit_width) - 1);
 	int i;
 
-- 
2.18.1


             reply	other threads:[~2020-06-16 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 10:59 Thomas Huth [this message]
2020-06-16 11:13 ` [kvm-unit-tests PATCH] x86/pmu: Fix compilation on 32-bit hosts Xu, Like
2020-06-16 11:22   ` Thomas Huth
2020-06-16 12:29 ` Paolo Bonzini

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=20200616105940.2907-1-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu@linux.intel.com \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    /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