x86/CPU: Align CR3 defines
authorBorislav Petkov <bp@suse.de>
Mon, 21 Aug 2017 08:06:51 +0000 (10:06 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 21 Aug 2017 09:35:50 +0000 (11:35 +0200)
Align them vertically for better readability and use BIT_ULL() macro.

No functionality change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Link: http://lkml.kernel.org/r/20170821080651.4527-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/processor-flags.h

index 8a6d89fc9a7950f4fba22cac0bfcfe026b380c04..dc723b64acf0675689c1feb187bfd957480c5d94 100644 (file)
  */
 #ifdef CONFIG_X86_64
 /* Mask off the address space ID and SME encryption bits. */
-#define CR3_ADDR_MASK __sme_clr(0x7FFFFFFFFFFFF000ull)
-#define CR3_PCID_MASK 0xFFFull
-#define CR3_NOFLUSH (1UL << 63)
+#define CR3_ADDR_MASK  __sme_clr(0x7FFFFFFFFFFFF000ull)
+#define CR3_PCID_MASK  0xFFFull
+#define CR3_NOFLUSH    BIT_ULL(63)
 #else
 /*
  * CR3_ADDR_MASK needs at least bits 31:5 set on PAE systems, and we save
  * a tiny bit of code size by setting all the bits.
  */
-#define CR3_ADDR_MASK 0xFFFFFFFFull
-#define CR3_PCID_MASK 0ull
-#define CR3_NOFLUSH 0
+#define CR3_ADDR_MASK  0xFFFFFFFFull
+#define CR3_PCID_MASK  0ull
+#define CR3_NOFLUSH    0
 #endif
 
 #endif /* _ASM_X86_PROCESSOR_FLAGS_H */