[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200121180015.GC32742@smile.fi.intel.com>
Date: Tue, 21 Jan 2020 20:00:15 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Darren Hart <dvhart@...radead.org>,
Lee Jones <lee.jones@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Zha Qipeng <qipeng.zha@...el.com>,
"David E . Box" <david.e.box@...ux.intel.com>,
Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Mark Brown <broonie@...nel.org>,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 36/38] platform/x86: intel_telemetry: Add
telemetry_get_pltdata()
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@...ux.intel.com>
>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
> 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
Powered by blists - more mailing lists