* [PATCH 15/20] x86, intel_telemetry: use Intel family name macros for telemetry driver
2016-06-03 0:19 [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen
@ 2016-06-03 0:19 ` Dave Hansen
2016-06-03 0:19 ` [PATCH 16/20] x86, pmc_core: use Intel family name macros for pmc_core driver Dave Hansen
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2016-06-03 0:19 UTC (permalink / raw)
To: linux-kernel
Cc: x86, jacob.jun.pan, Dave Hansen, dave.hansen, dvhart,
souvik.k.chakravarty, platform-driver-x86
From: Dave Hansen <dave.hansen@linux.intel.com>
Another straightforward replacement of magic numbers.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Darren Hart <dvhart@infradead.org>
Cc: Souvik Kumar Chakravarty <souvik.k.chakravarty@intel.com>
Cc: platform-driver-x86@vger.kernel.org
---
b/drivers/platform/x86/intel_telemetry_debugfs.c | 3 ++-
b/drivers/platform/x86/intel_telemetry_pltdrv.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff -puN drivers/platform/x86/intel_telemetry_debugfs.c~x86-intel-families-telemetry drivers/platform/x86/intel_telemetry_debugfs.c
--- a/drivers/platform/x86/intel_telemetry_debugfs.c~x86-intel-families-telemetry 2016-06-02 15:19:21.988385142 -0700
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c 2016-06-02 15:19:21.993385369 -0700
@@ -32,6 +32,7 @@
#include <linux/suspend.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/intel_pmc_ipc.h>
#include <asm/intel_punit_ipc.h>
#include <asm/intel_telemetry.h>
@@ -331,7 +332,7 @@ static struct telemetry_debugfs_conf tel
};
static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
- TELEM_DEBUGFS_CPU(0x5c, telem_apl_debugfs_conf),
+ TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
{}
};
diff -puN drivers/platform/x86/intel_telemetry_pltdrv.c~x86-intel-families-telemetry drivers/platform/x86/intel_telemetry_pltdrv.c
--- a/drivers/platform/x86/intel_telemetry_pltdrv.c~x86-intel-families-telemetry 2016-06-02 15:19:21.990385233 -0700
+++ b/drivers/platform/x86/intel_telemetry_pltdrv.c 2016-06-02 15:19:21.995385460 -0700
@@ -28,6 +28,7 @@
#include <linux/platform_device.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/intel_pmc_ipc.h>
#include <asm/intel_punit_ipc.h>
#include <asm/intel_telemetry.h>
@@ -163,7 +164,7 @@ static struct telemetry_plt_config telem
};
static const struct x86_cpu_id telemetry_cpu_ids[] = {
- TELEM_CPU(0x5c, telem_apl_config),
+ TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config),
{}
};
_
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 16/20] x86, pmc_core: use Intel family name macros for pmc_core driver
2016-06-03 0:19 [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen
2016-06-03 0:19 ` [PATCH 15/20] x86, intel_telemetry: use Intel family name macros for telemetry driver Dave Hansen
@ 2016-06-03 0:19 ` Dave Hansen
2016-06-03 0:38 ` [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Rafael J. Wysocki
2016-06-08 11:01 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2016-06-03 0:19 UTC (permalink / raw)
To: linux-kernel
Cc: x86, jacob.jun.pan, Dave Hansen, dave.hansen, dvhart,
rajneesh.bhardwaj, vishwanath.somayaji, platform-driver-x86
From: Dave Hansen <dave.hansen@linux.intel.com>
Another straightforward replacement of magic numbers.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Darren Hart <dvhart@infradead.org>
Cc: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Cc: Vishwanath Somayaji <vishwanath.somayaji@intel.com>
Cc: platform-driver-x86@vger.kernel.org
---
b/drivers/platform/x86/intel_pmc_core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff -puN drivers/platform/x86/intel_pmc_core.c~x86-intel-families-pmc_core drivers/platform/x86/intel_pmc_core.c
--- a/drivers/platform/x86/intel_pmc_core.c~x86-intel-families-pmc_core 2016-06-02 15:19:22.437405579 -0700
+++ b/drivers/platform/x86/intel_pmc_core.c 2016-06-02 15:19:22.440405715 -0700
@@ -26,6 +26,7 @@
#include <linux/seq_file.h>
#include <asm/cpu_device_id.h>
+#include <asm/intel-family.h>
#include <asm/pmc_core.h>
#include "intel_pmc_core.h"
@@ -138,10 +139,10 @@ static inline void pmc_core_dbgfs_unregi
#endif /* CONFIG_DEBUG_FS */
static const struct x86_cpu_id intel_pmc_core_ids[] = {
- { X86_VENDOR_INTEL, 6, 0x4e, X86_FEATURE_MWAIT,
- (kernel_ulong_t)NULL}, /* Skylake CPUID Signature */
- { X86_VENDOR_INTEL, 6, 0x5e, X86_FEATURE_MWAIT,
- (kernel_ulong_t)NULL}, /* Skylake CPUID Signature */
+ { X86_VENDOR_INTEL, 6, INTEL_FAM6_SKYLAKE_MOBILE, X86_FEATURE_MWAIT,
+ (kernel_ulong_t)NULL},
+ { X86_VENDOR_INTEL, 6, INTEL_FAM6_SKYLAKE_DESKTOP, X86_FEATURE_MWAIT,
+ (kernel_ulong_t)NULL},
{}
};
_
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers
2016-06-03 0:19 [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen
2016-06-03 0:19 ` [PATCH 15/20] x86, intel_telemetry: use Intel family name macros for telemetry driver Dave Hansen
2016-06-03 0:19 ` [PATCH 16/20] x86, pmc_core: use Intel family name macros for pmc_core driver Dave Hansen
@ 2016-06-03 0:38 ` Rafael J. Wysocki
2016-06-08 11:01 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-06-03 0:38 UTC (permalink / raw)
To: Dave Hansen
Cc: linux-kernel, x86, jacob.jun.pan, dave.hansen, adrian.hunter, ak,
luto, bp, dvhart, dougthompson, edubezval, hpa, mingo,
jacob.jun.pan, kan.liang, lenb, linux-acpi, linux-edac, linux-mmc,
linux-pm, mchehab, peterz, platform-driver-x86, rafael.j.wysocki,
rajneesh.bhardwaj, souvik.k.chakravarty, srinivas.pandruvada,
eranian, tglx, tony.luck, ulf.hansson, viresh.kumar,
vishwanath.somayaji, rui.zhang
On Thursday, June 02, 2016 05:19:27 PM Dave Hansen wrote:
>
> Changes from v1:
> * added acks from a few folks
> * Took the redundant "MODEL_" out of the macro names (Suggested
> by Borislav Petkov and acked by others)
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> If you are cc'd on this code, please check _your_ code vs. the
> model list in "intel-family.h". Please make sure you have all
> the models listed that you intend to.
>
> Also, rather than trickling these in via all the various
> maintainers, should these just get pulled in to the x86 tree in
> one go?
Yes, please.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers
2016-06-03 0:19 [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Dave Hansen
` (2 preceding siblings ...)
2016-06-03 0:38 ` [PATCH 01/20] [v2] x86, intel: Introduce macros for Intel family numbers Rafael J. Wysocki
@ 2016-06-08 11:01 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2016-06-08 11:01 UTC (permalink / raw)
To: Dave Hansen
Cc: linux-kernel, x86, jacob.jun.pan, dave.hansen, adrian.hunter, ak,
luto, bp, dvhart, dougthompson, edubezval, hpa, mingo,
jacob.jun.pan, kan.liang, lenb, linux-acpi, linux-edac, linux-mmc,
linux-pm, mchehab, peterz, platform-driver-x86, rafael.j.wysocki,
rajneesh.bhardwaj, souvik.k.chakravarty, srinivas.pandruvada,
eranian, tglx, tony.luck, ulf.hansson, viresh.kumar,
vishwanath.somayaji, rui.zhang
* Dave Hansen <dave@sr71.net> wrote:
>
> Changes from v1:
> * added acks from a few folks
> * Took the redundant "MODEL_" out of the macro names (Suggested
> by Borislav Petkov and acked by others)
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> If you are cc'd on this code, please check _your_ code vs. the
> model list in "intel-family.h". Please make sure you have all
> the models listed that you intend to.
>
> Also, rather than trickling these in via all the various
> maintainers, should these just get pulled in to the x86 tree in
> one go?
>
> Problem:
>
> We have a boatload of open-coded family-6 model numbers. Half of
> them have these model numbers in hex and the other half in
> decimal. This makes grepping for them tons of fun, if you were
> to try.
>
> Solution:
>
> Consolidate all the magic numbers. Put all the definitions in
> one header.
>
> The names here are closely derived from the comments describing
> the models from arch/x86/events/intel/core.c. We could easily
> make them shorter by doing things like s/SANDYBRIDGE/SNB/, but
> they seemed fine even with the longer versions to me.
>
> Do not take any of these names too literally, like "DESKTOP"
> or "MOBILE". These are all colloquial names and not precise
> descriptions of everywhere a given model will show up.
>
> These have all been compile-tested. I also made a stab at
> dumping .o files and looking for unexpected deltas when I was
> just replacing magic numbers with equivalent macros.
So I've picked up this series and restructured it: I've created a single patch
that creates intel-family.h and have put it into x86/urgent. This eliminated
dependencies and allowed some of the patches to be queued in their natural trees,
in particular the 7 perf patches.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread