Some of the Primary Subsystem events differ on Gemini Lake but the IOSS
events remain same. This patch adds the updated PSS event table to enable
Telemetry driver on Gemini Lake.
Signed-off-by: Shanth Murthy <[email protected]>
Signed-off-by: Rajneesh Bhardwaj <[email protected]>
---
Changes in v2:
* Dropped "Add Audio domain PG status events" from series.
drivers/platform/x86/intel_telemetry_debugfs.c | 1 +
drivers/platform/x86/intel_telemetry_pltdrv.c | 35 ++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index cd21df982abd..d4fc42b4cbeb 100644
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@ -331,6 +331,7 @@ static struct telemetry_debugfs_conf telem_apl_debugfs_conf = {
static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
+ TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE, telem_apl_debugfs_conf),
{}
};
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel_telemetry_pltdrv.c
index 6ebdbd2b04fc..6393b3b1d5a6 100644
--- a/drivers/platform/x86/intel_telemetry_pltdrv.c
+++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
@@ -153,6 +153,30 @@ static struct telemetry_evtmap
{"PC2_AND_MEM_SHALLOW_IDLE_RES", 0x1D40},
};
+static struct telemetry_evtmap
+ telemetry_glk_pss_default_events[TELEM_MAX_OS_ALLOCATED_EVENTS] = {
+ {"IA_CORE0_C6_RES", 0x0400},
+ {"IA_CORE0_C6_CTR", 0x0000},
+ {"IA_MODULE0_C7_RES", 0x0410},
+ {"IA_MODULE0_C7_CTR", 0x000C},
+ {"IA_C0_RES", 0x0805},
+ {"PCS_LTR", 0x2801},
+ {"PSTATES", 0x2802},
+ {"SOC_S0I3_RES", 0x0407},
+ {"SOC_S0I3_CTR", 0x0008},
+ {"PCS_S0I3_CTR", 0x0007},
+ {"PCS_C1E_RES", 0x0414},
+ {"PCS_IDLE_STATUS", 0x2806},
+ {"IA_PERF_LIMITS", 0x280B},
+ {"GT_PERF_LIMITS", 0x280C},
+ {"PCS_WAKEUP_S0IX_CTR", 0x0025},
+ {"PCS_IDLE_BLOCKED", 0x2C00},
+ {"PCS_S0IX_BLOCKED", 0x2C01},
+ {"PCS_S0IX_WAKE_REASONS", 0x2C02},
+ {"PCS_LTR_BLOCKING", 0x2C03},
+ {"PC2_AND_MEM_SHALLOW_IDLE_RES", 0x1D40},
+};
+
/* APL specific Data */
static struct telemetry_plt_config telem_apl_config = {
.pss_config = {
@@ -163,8 +187,19 @@ static struct telemetry_plt_config telem_apl_config = {
},
};
+/* GLK specific Data */
+static struct telemetry_plt_config telem_glk_config = {
+ .pss_config = {
+ .telem_evts = telemetry_glk_pss_default_events,
+ },
+ .ioss_config = {
+ .telem_evts = telemetry_apl_ioss_default_events,
+ },
+};
+
static const struct x86_cpu_id telemetry_cpu_ids[] = {
TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config),
+ TELEM_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE, telem_glk_config),
{}
};
--
2.7.4
Telemetry driver includes intel_telemetry.h which defines
TELEM_MAX_OS_ALLOCATED_EVENTS already.
Signed-off-by: Rajneesh Bhardwaj <[email protected]>
---
drivers/platform/x86/intel_telemetry_pltdrv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel_telemetry_pltdrv.c
index 6393b3b1d5a6..e0424d5a795a 100644
--- a/drivers/platform/x86/intel_telemetry_pltdrv.c
+++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
@@ -46,7 +46,6 @@
#define TELEM_SAMPLING_DEFAULT_PERIOD 0xD
#define TELEM_MAX_EVENTS_SRAM 28
-#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
#define TELEM_SSRAM_STARTTIME_OFFSET 8
#define TELEM_SSRAM_EVTLOG_OFFSET 16
--
2.7.4
Both set of two looks good. +1.
> -----Original Message-----
> From: [email protected] [mailto:platform-driver-
> [email protected]] On Behalf Of Rajneesh Bhardwaj
> Sent: Thursday, July 20, 2017 7:51 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Murthy, Shanth <[email protected]>;
> Chakravarty, Souvik K <[email protected]>; Bhardwaj,
> Rajneesh <[email protected]>
> Subject: [PATCH v2 2/2] Telemetry: remove redundant macro definition
>
> Telemetry driver includes intel_telemetry.h which defines
> TELEM_MAX_OS_ALLOCATED_EVENTS already.
>
> Signed-off-by: Rajneesh Bhardwaj <[email protected]>
> ---
> drivers/platform/x86/intel_telemetry_pltdrv.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c
> b/drivers/platform/x86/intel_telemetry_pltdrv.c
> index 6393b3b1d5a6..e0424d5a795a 100644
> --- a/drivers/platform/x86/intel_telemetry_pltdrv.c
> +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
> @@ -46,7 +46,6 @@
> #define TELEM_SAMPLING_DEFAULT_PERIOD 0xD
>
> #define TELEM_MAX_EVENTS_SRAM 28
> -#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
> #define TELEM_SSRAM_STARTTIME_OFFSET 8
> #define TELEM_SSRAM_EVTLOG_OFFSET 16
>
> --
> 2.7.4
Just missed the email from Darren.
Reviewed-by: Souvik K Chakravarty <[email protected]>
> -----Original Message-----
> From: Chakravarty, Souvik K
> Sent: Friday, July 21, 2017 8:45 AM
> To: 'Rajneesh Bhardwaj' <[email protected]>; platform-driver-
> [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Murthy, Shanth <[email protected]>;
> Bhardwaj, Rajneesh <[email protected]>
> Subject: RE: [PATCH v2 2/2] Telemetry: remove redundant macro definition
>
> Both set of two looks good. +1.
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:platform-driver- [email protected]] On Behalf Of
> > Rajneesh Bhardwaj
> > Sent: Thursday, July 20, 2017 7:51 PM
> > To: [email protected]
> > Cc: [email protected]; [email protected]; linux-
> > [email protected]; Murthy, Shanth <[email protected]>;
> > Chakravarty, Souvik K <[email protected]>; Bhardwaj,
> > Rajneesh <[email protected]>
> > Subject: [PATCH v2 2/2] Telemetry: remove redundant macro definition
> >
> > Telemetry driver includes intel_telemetry.h which defines
> > TELEM_MAX_OS_ALLOCATED_EVENTS already.
> >
> > Signed-off-by: Rajneesh Bhardwaj <[email protected]>
> > ---
> > drivers/platform/x86/intel_telemetry_pltdrv.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c
> > b/drivers/platform/x86/intel_telemetry_pltdrv.c
> > index 6393b3b1d5a6..e0424d5a795a 100644
> > --- a/drivers/platform/x86/intel_telemetry_pltdrv.c
> > +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
> > @@ -46,7 +46,6 @@
> > #define TELEM_SAMPLING_DEFAULT_PERIOD 0xD
> >
> > #define TELEM_MAX_EVENTS_SRAM 28
> > -#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
> > #define TELEM_SSRAM_STARTTIME_OFFSET 8
> > #define TELEM_SSRAM_EVTLOG_OFFSET 16
> >
> > --
> > 2.7.4
Reviewed-by: Souvik K Chakravarty <[email protected]>
> -----Original Message-----
> From: Bhardwaj, Rajneesh
> Sent: Thursday, July 20, 2017 7:51 PM
> To: [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Murthy, Shanth <[email protected]>;
> Chakravarty, Souvik K <[email protected]>; Bhardwaj,
> Rajneesh <[email protected]>
> Subject: [PATCH v2 1/2] platform/x86: Add GLK PSS Event Table
>
> Some of the Primary Subsystem events differ on Gemini Lake but the IOSS
> events remain same. This patch adds the updated PSS event table to enable
> Telemetry driver on Gemini Lake.
>
> Signed-off-by: Shanth Murthy <[email protected]>
> Signed-off-by: Rajneesh Bhardwaj <[email protected]>
> ---
> Changes in v2:
> * Dropped "Add Audio domain PG status events" from series.
>
> drivers/platform/x86/intel_telemetry_debugfs.c | 1 +
> drivers/platform/x86/intel_telemetry_pltdrv.c | 35
> ++++++++++++++++++++++++++
> 2 files changed, 36 insertions(+)
>
> diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c
> b/drivers/platform/x86/intel_telemetry_debugfs.c
> index cd21df982abd..d4fc42b4cbeb 100644
> --- a/drivers/platform/x86/intel_telemetry_debugfs.c
> +++ b/drivers/platform/x86/intel_telemetry_debugfs.c
> @@ -331,6 +331,7 @@ static struct telemetry_debugfs_conf
> telem_apl_debugfs_conf = {
>
> static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
> TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT,
> telem_apl_debugfs_conf),
> + TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE,
> +telem_apl_debugfs_conf),
> {}
> };
>
> diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c
> b/drivers/platform/x86/intel_telemetry_pltdrv.c
> index 6ebdbd2b04fc..6393b3b1d5a6 100644
> --- a/drivers/platform/x86/intel_telemetry_pltdrv.c
> +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
> @@ -153,6 +153,30 @@ static struct telemetry_evtmap
> {"PC2_AND_MEM_SHALLOW_IDLE_RES", 0x1D40},
> };
>
> +static struct telemetry_evtmap
> +
> telemetry_glk_pss_default_events[TELEM_MAX_OS_ALLOCATED_E
> VENTS] = {
> + {"IA_CORE0_C6_RES", 0x0400},
> + {"IA_CORE0_C6_CTR", 0x0000},
> + {"IA_MODULE0_C7_RES", 0x0410},
> + {"IA_MODULE0_C7_CTR", 0x000C},
> + {"IA_C0_RES", 0x0805},
> + {"PCS_LTR", 0x2801},
> + {"PSTATES", 0x2802},
> + {"SOC_S0I3_RES", 0x0407},
> + {"SOC_S0I3_CTR", 0x0008},
> + {"PCS_S0I3_CTR", 0x0007},
> + {"PCS_C1E_RES", 0x0414},
> + {"PCS_IDLE_STATUS", 0x2806},
> + {"IA_PERF_LIMITS", 0x280B},
> + {"GT_PERF_LIMITS", 0x280C},
> + {"PCS_WAKEUP_S0IX_CTR", 0x0025},
> + {"PCS_IDLE_BLOCKED", 0x2C00},
> + {"PCS_S0IX_BLOCKED", 0x2C01},
> + {"PCS_S0IX_WAKE_REASONS", 0x2C02},
> + {"PCS_LTR_BLOCKING", 0x2C03},
> + {"PC2_AND_MEM_SHALLOW_IDLE_RES", 0x1D40},
> +};
> +
> /* APL specific Data */
> static struct telemetry_plt_config telem_apl_config = {
> .pss_config = {
> @@ -163,8 +187,19 @@ static struct telemetry_plt_config
> telem_apl_config = {
> },
> };
>
> +/* GLK specific Data */
> +static struct telemetry_plt_config telem_glk_config = {
> + .pss_config = {
> + .telem_evts = telemetry_glk_pss_default_events,
> + },
> + .ioss_config = {
> + .telem_evts = telemetry_apl_ioss_default_events,
> + },
> +};
> +
> static const struct x86_cpu_id telemetry_cpu_ids[] = {
> TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config),
> + TELEM_CPU(INTEL_FAM6_ATOM_GEMINI_LAKE, telem_glk_config),
> {}
> };
>
> --
> 2.7.4
On Fri, Jul 21, 2017 at 03:29:39AM +0000, Chakravarty, Souvik K wrote:
> Just missed the email from Darren.
:-)
> Reviewed-by: Souvik K Chakravarty <[email protected]>
Thank you Souvik.
While these one liners are OK for trivial changes like this, please note that
Andy and I depend on individual driver maintainers to provide thorough reviews,
and it helps to document that review to help us understand what sorts of things
you considered before approving the patch. Please keep this in mind in the
future for more complex changes.
This set is on Andy's queue, so the final review/follow-up will come from him.
Thanks,
>
> > -----Original Message-----
> > From: Chakravarty, Souvik K
> > Sent: Friday, July 21, 2017 8:45 AM
> > To: 'Rajneesh Bhardwaj' <[email protected]>; platform-driver-
> > [email protected]
> > Cc: [email protected]; [email protected]; linux-
> > [email protected]; Murthy, Shanth <[email protected]>;
> > Bhardwaj, Rajneesh <[email protected]>
> > Subject: RE: [PATCH v2 2/2] Telemetry: remove redundant macro definition
> >
> > Both set of two looks good. +1.
> >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:platform-driver- [email protected]] On Behalf Of
> > > Rajneesh Bhardwaj
> > > Sent: Thursday, July 20, 2017 7:51 PM
> > > To: [email protected]
> > > Cc: [email protected]; [email protected]; linux-
> > > [email protected]; Murthy, Shanth <[email protected]>;
> > > Chakravarty, Souvik K <[email protected]>; Bhardwaj,
> > > Rajneesh <[email protected]>
> > > Subject: [PATCH v2 2/2] Telemetry: remove redundant macro definition
> > >
> > > Telemetry driver includes intel_telemetry.h which defines
> > > TELEM_MAX_OS_ALLOCATED_EVENTS already.
> > >
> > > Signed-off-by: Rajneesh Bhardwaj <[email protected]>
> > > ---
> > > drivers/platform/x86/intel_telemetry_pltdrv.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c
> > > b/drivers/platform/x86/intel_telemetry_pltdrv.c
> > > index 6393b3b1d5a6..e0424d5a795a 100644
> > > --- a/drivers/platform/x86/intel_telemetry_pltdrv.c
> > > +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
> > > @@ -46,7 +46,6 @@
> > > #define TELEM_SAMPLING_DEFAULT_PERIOD 0xD
> > >
> > > #define TELEM_MAX_EVENTS_SRAM 28
> > > -#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
> > > #define TELEM_SSRAM_STARTTIME_OFFSET 8
> > > #define TELEM_SSRAM_EVTLOG_OFFSET 16
> > >
> > > --
> > > 2.7.4
>
>
--
Darren Hart
VMware Open Source Technology Center
On Sat, Jul 22, 2017 at 2:02 AM, Darren Hart <[email protected]> wrote:
> On Fri, Jul 21, 2017 at 03:29:39AM +0000, Chakravarty, Souvik K wrote:
>> Just missed the email from Darren.
>
> :-)
>
>> Reviewed-by: Souvik K Chakravarty <[email protected]>
>
> Thank you Souvik.
>
> While these one liners are OK for trivial changes like this, please note that
> Andy and I depend on individual driver maintainers to provide thorough reviews,
> and it helps to document that review to help us understand what sorts of things
> you considered before approving the patch. Please keep this in mind in the
> future for more complex changes.
>
> This set is on Andy's queue, so the final review/follow-up will come from him.
>
Pushed both to testing, thanks!
> Thanks,
>
>>
>> > -----Original Message-----
>> > From: Chakravarty, Souvik K
>> > Sent: Friday, July 21, 2017 8:45 AM
>> > To: 'Rajneesh Bhardwaj' <[email protected]>; platform-driver-
>> > [email protected]
>> > Cc: [email protected]; [email protected]; linux-
>> > [email protected]; Murthy, Shanth <[email protected]>;
>> > Bhardwaj, Rajneesh <[email protected]>
>> > Subject: RE: [PATCH v2 2/2] Telemetry: remove redundant macro definition
>> >
>> > Both set of two looks good. +1.
>> >
>> > > -----Original Message-----
>> > > From: [email protected]
>> > > [mailto:platform-driver- [email protected]] On Behalf Of
>> > > Rajneesh Bhardwaj
>> > > Sent: Thursday, July 20, 2017 7:51 PM
>> > > To: [email protected]
>> > > Cc: [email protected]; [email protected]; linux-
>> > > [email protected]; Murthy, Shanth <[email protected]>;
>> > > Chakravarty, Souvik K <[email protected]>; Bhardwaj,
>> > > Rajneesh <[email protected]>
>> > > Subject: [PATCH v2 2/2] Telemetry: remove redundant macro definition
>> > >
>> > > Telemetry driver includes intel_telemetry.h which defines
>> > > TELEM_MAX_OS_ALLOCATED_EVENTS already.
>> > >
>> > > Signed-off-by: Rajneesh Bhardwaj <[email protected]>
>> > > ---
>> > > drivers/platform/x86/intel_telemetry_pltdrv.c | 1 -
>> > > 1 file changed, 1 deletion(-)
>> > >
>> > > diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c
>> > > b/drivers/platform/x86/intel_telemetry_pltdrv.c
>> > > index 6393b3b1d5a6..e0424d5a795a 100644
>> > > --- a/drivers/platform/x86/intel_telemetry_pltdrv.c
>> > > +++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
>> > > @@ -46,7 +46,6 @@
>> > > #define TELEM_SAMPLING_DEFAULT_PERIOD 0xD
>> > >
>> > > #define TELEM_MAX_EVENTS_SRAM 28
>> > > -#define TELEM_MAX_OS_ALLOCATED_EVENTS 20
>> > > #define TELEM_SSRAM_STARTTIME_OFFSET 8
>> > > #define TELEM_SSRAM_EVTLOG_OFFSET 16
>> > >
>> > > --
>> > > 2.7.4
>>
>>
>
> --
> Darren Hart
> VMware Open Source Technology Center
--
With Best Regards,
Andy Shevchenko