x86/asm/msr: Retract msr-index.h
Subsystems (2)
Borislav Petkov
maintainerPATCH 1/1 x86/asm/msr: Retract msr-index.h
From: Borislav Petkov <[email protected]>
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big uapi shuffle.
But, it doesn't have anything to do 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.
---
arch/x86/include/{uapi => }/asm/msr-index.h | 0
tools/power/x86/turbostat/Makefile | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename arch/x86/include/{uapi => }/asm/msr-index.h (100%)arch/x86/include/asm/msr-index.h renamed from arch/x86/include/uapi/asm/msr-index.h +0 -0
tools/power/x86/turbostat/Makefile +1 -1
@@ -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)
Signature · 1 line
2.3.5
Borislav Petkov
maintainerQuoted 8 lines · Borislav Petkov
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big uapi shuffle.
But, it doesn't have anything to do 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.
Here's v2. Needed to *not* include it into uapi/asm/msr.h either.
---
From: Borislav Petkov <[email protected]>
Date: Wed, 3 Jun 2015 14:37:05 +0200
Subject: [PATCH] x86/asm/msr: Retract msr-index.h
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big uapi shuffle.
But, it doesn't have anything to do 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.
---
arch/x86/include/{uapi => }/asm/msr-index.h | 0
arch/x86/include/asm/msr.h | 3 ++-
arch/x86/include/uapi/asm/msr.h | 2 --
tools/power/x86/turbostat/Makefile | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
rename arch/x86/include/{uapi => }/asm/msr-index.h (100%)arch/x86/include/asm/msr-index.h renamed from arch/x86/include/uapi/asm/msr-index.h +0 -0
arch/x86/include/asm/msr.h +2 -1
@@ -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 {
arch/x86/include/uapi/asm/msr.h +0 -2
@@ -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>
tools/power/x86/turbostat/Makefile +1 -1
@@ -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)
Signature · 8 lines
2.3.5
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--H. Peter Anvin
reviewerQuoted 11 lines · Borislav Petkov
Quoted 8 lines · Borislav Petkov
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big uapi shuffle.
But, it doesn't have anything to do 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.
Here's v2. Needed to *not* include it into
uapi/asm/msr.heither.
I really like the patch, but the description is awful.
How about: "x86/uapi: <asm/msr.h> is not a UAPI"
-hpa
Borislav Petkov
maintainerQuoted 3 lines · H. Peter Anvin
I really like the patch, but the description is awful.
How about: "x86/uapi: <
asm/msr.h> is not a UAPI"
Sure. Commit text needs improvement too?
Signature · 5 lines
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--H. Peter Anvin
reviewerQuoted 7 lines · Borislav Petkov
Quoted 3 lines · H. Peter Anvin
I really like the patch, but the description is awful.
How about: "x86/uapi: <
asm/msr.h> is not a UAPI"Sure. Commit text needs improvement too?
The commit text is fine, IMO.
-hpa
Quoted 11 lines · H. Peter Anvin
Quoted 10 lines · Borislav Petkov
Quoted 8 lines · Borislav Petkov
This header containing all MSRs and respective bit definitions got exported to userspace in conjunction with the big uapi shuffle.
But, it doesn't have anything to do 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.
Quoted 5 lines
Quoted 1 line
Here's v2. Needed to *not* include it into
uapi/asm/msr.heither.I really like the patch, but the description is awful.
How about: "x86/uapi: <
asm/msr.h> is not a UAPI"
So a small nit: a simple statement of fact is not really a proper commit title. A commit title should express what the patch _does_.
Missing leading verbs are really passive-aggressive on the reader of a flow of commit titles - such as when reading a short log or a one-line git log.
Something like:
x86/uapi: Remove <asm/msr.h> from the list of exported UAPI headers
or so would work fine with me.
Thanks!
Ingo
Borislav Petkov
maintainerQuoted 5 lines · Ingo Molnar
Something like:
x86/uapi: Remove <
asm/msr.h> from the list of exported UAPI headersor so would work fine with me.
I did this - this is maximally descriptive IMO. :-)
---
From: Borislav Petkov <[email protected]>
Date: Wed, 3 Jun 2015 14:37:05 +0200
Subject: [PATCH] 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.
---
arch/x86/include/{uapi => }/asm/msr-index.h | 0
arch/x86/include/asm/msr.h | 3 ++-
arch/x86/include/uapi/asm/msr.h | 2 --
tools/power/x86/turbostat/Makefile | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
rename arch/x86/include/{uapi => }/asm/msr-index.h (100%)arch/x86/include/asm/msr-index.h renamed from arch/x86/include/uapi/asm/msr-index.h +0 -0
arch/x86/include/asm/msr.h +2 -1
@@ -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 {
arch/x86/include/uapi/asm/msr.h +0 -2
@@ -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>
tools/power/x86/turbostat/Makefile +1 -1
@@ -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)
Signature · 8 lines
2.3.5
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--Quoted 5 lines · Borislav Petkov
Quoted 4 lines · Ingo Molnar
Something like:
x86/uapi: Remove <
asm/msr.h> from the list of exported UAPI headers
Quoted 8 lines
Quoted 1 line
or so would work fine with me.
I did this - this is maximally descriptive IMO. :-)
---
From: Borislav Petkov <[email protected]>
Date: Wed, 3 Jun 2015 14:37:05 +0200
Subject: [PATCH] x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers
This sounds good to me too.
Thanks,
Ingo
Quoted 1 line
tools/power/x86/turbostat/Makefile | 2 +-
One of the reasons I put turbostat in the kernel tree was so that it would be easy
to have 1 copy of the truth for MSR definitions. I'm okay with treating it like a kernel file
and following any MSR name changes in the kernel.
That is much more attractive to me than managing a 2nd set of definitions in user-space that would diverge.
thanks,
-Len Brown
Intel Open Source Technology Center