Skip to content

Commit

Permalink
x86: Use correct type for %cr4
Browse files Browse the repository at this point in the history
%cr4 is 64-bit in 64-bit mode (although the upper 32-bits are currently reserved).
Use unsigned long for the temporary variable to get the right size.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1283563039-3466-2-git-send-email-brgerst@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Brian Gerst authored and H. Peter Anvin committed Sep 9, 2010
1 parent 1f999ab commit 2df7a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ extern unsigned long mmu_cr4_features;

static inline void set_in_cr4(unsigned long mask)
{
unsigned cr4;
unsigned long cr4;

mmu_cr4_features |= mask;
cr4 = read_cr4();
Expand All @@ -612,7 +612,7 @@ static inline void set_in_cr4(unsigned long mask)

static inline void clear_in_cr4(unsigned long mask)
{
unsigned cr4;
unsigned long cr4;

mmu_cr4_features &= ~mask;
cr4 = read_cr4();
Expand Down

0 comments on commit 2df7a6e

Please sign in to comment.