On Tue, Jan 21, 2020 at 07:01:12PM +0300, Mika Westerberg wrote: > Add new function that allows telemetry modules to get pointer to the > platform specific configuration. This is needed to allow the telemetry > debugfs module to fetch PMC IPC instance in the subsequent patch. One comment below. After addressing, Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > > Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> > --- > arch/x86/include/asm/intel_telemetry.h | 1 + > drivers/platform/x86/intel_telemetry_core.c | 12 ++++++++++++ > 2 files changed, 13 insertions(+) > > diff --git a/arch/x86/include/asm/intel_telemetry.h b/arch/x86/include/asm/intel_telemetry.h > index e19deb776003..1335565c43b5 100644 > --- a/arch/x86/include/asm/intel_telemetry.h > +++ b/arch/x86/include/asm/intel_telemetry.h > @@ -99,6 +99,7 @@ int telemetry_set_pltdata(const struct telemetry_core_ops *ops, > int telemetry_clear_pltdata(void); > > int telemetry_pltconfig_valid(void); > +struct telemetry_plt_config *telemetry_get_pltdata(void); > > int telemetry_get_evtname(enum telemetry_unit telem_unit, > const char **name, int len); > diff --git a/drivers/platform/x86/intel_telemetry_core.c b/drivers/platform/x86/intel_telemetry_core.c > index d4040bb222b4..e11b79d1b3a7 100644 > --- a/drivers/platform/x86/intel_telemetry_core.c > +++ b/drivers/platform/x86/intel_telemetry_core.c > @@ -369,6 +369,18 @@ int telemetry_pltconfig_valid(void) > } > EXPORT_SYMBOL_GPL(telemetry_pltconfig_valid); > > +/** > + * telemetry_get_pltdata() - Return telemetry platform config > + * > + * May be used by other telemetry modules to get platform specific > + * configuration. > + */ > +struct telemetry_plt_config *telemetry_get_pltdata(void) > +{ > + return telm_core_conf.plt_config; > +} > +EXPORT_SYMBOL_GPL(telemetry_get_pltdata); Effectively this may replace telemetry_pltconfig_valid(). > + > static inline int telemetry_get_pssevtname(enum telemetry_unit telem_unit, > const char **name, int len) > { > -- > 2.24.1 > -- With Best Regards, Andy Shevchenko