Skip to content

Commit d06aca9

Browse files
josephlrsuryasaimadhu
authored andcommitted
x86/elf: Use _BITUL() macro in UAPI headers
Replace BIT() in x86's UAPI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: 742c45c ("x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2") Signed-off-by: Joe Richey <joerichey@google.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210521085849.37676-2-joerichey94@gmail.com
1 parent d07f6ca commit d06aca9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

arch/x86/include/uapi/asm/hwcap2.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
#ifndef _ASM_X86_HWCAP2_H
33
#define _ASM_X86_HWCAP2_H
44

5+
#include <linux/const.h>
6+
57
/* MONITOR/MWAIT enabled in Ring 3 */
6-
#define HWCAP2_RING3MWAIT (1 << 0)
8+
#define HWCAP2_RING3MWAIT _BITUL(0)
79

810
/* Kernel allows FSGSBASE instructions available in Ring 3 */
9-
#define HWCAP2_FSGSBASE BIT(1)
11+
#define HWCAP2_FSGSBASE _BITUL(1)
1012

1113
#endif

0 commit comments

Comments
 (0)