Skip to content

Commit b72e746

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big UAPI shuffle. But, it doesn't belong in the UAPI headers because userspace can do its own MSR defines and exporting them from the kernel blocks us from doing cleanups/renames in that header. Which is ridiculous - it is not kernel's job to export such a header and keep MSRs list and their names stable. Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: David Howells <dhowells@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1433436928-31903-19-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent c2f9b0a commit b72e746

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

arch/x86/include/asm/msr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#ifndef _ASM_X86_MSR_H
22
#define _ASM_X86_MSR_H
33

4-
#include <uapi/asm/msr.h>
4+
#include "msr-index.h"
55

66
#ifndef __ASSEMBLY__
77

88
#include <asm/asm.h>
99
#include <asm/errno.h>
1010
#include <asm/cpumask.h>
11+
#include <uapi/asm/msr.h>
1112

1213
struct msr {
1314
union {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef _UAPI_ASM_X86_MSR_H
22
#define _UAPI_ASM_X86_MSR_H
33

4-
#include <asm/msr-index.h>
5-
64
#ifndef __ASSEMBLY__
75

86
#include <linux/types.h>

tools/power/x86/turbostat/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99

1010
turbostat : turbostat.c
1111
CFLAGS += -Wall
12-
CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/uapi/asm/msr-index.h"'
12+
CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"'
1313

1414
%: %.c
1515
@mkdir -p $(BUILD_OUTPUT)

0 commit comments

Comments
 (0)