Skip to content

Commit

Permalink
x86/uapi: Do not export <asm/msr-index.h> as part of the user API hea…
Browse files Browse the repository at this point in the history
…ders

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 <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: David Howells <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
suryasaimadhu authored and Ingo Molnar committed Jun 7, 2015
1 parent c2f9b0a commit b72e746
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
File renamed without changes.
3 changes: 2 additions & 1 deletion arch/x86/include/asm/msr.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#ifndef _ASM_X86_MSR_H
#define _ASM_X86_MSR_H

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

#ifndef __ASSEMBLY__

#include <asm/asm.h>
#include <asm/errno.h>
#include <asm/cpumask.h>
#include <uapi/asm/msr.h>

struct msr {
union {
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/include/uapi/asm/msr.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _UAPI_ASM_X86_MSR_H
#define _UAPI_ASM_X86_MSR_H

#include <asm/msr-index.h>

#ifndef __ASSEMBLY__

#include <linux/types.h>
Expand Down
2 changes: 1 addition & 1 deletion tools/power/x86/turbostat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ endif

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

%: %.c
@mkdir -p $(BUILD_OUTPUT)
Expand Down

0 comments on commit b72e746

Please sign in to comment.