[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DF4PR8401MB1035CE7DBCCD58B531748BC69B080@DF4PR8401MB1035.NAMPRD84.PROD.OUTLOOK.COM>
Date: Fri, 9 Oct 2020 14:11:03 +0000
From: "Meyer, Kyle" <kyle.meyer@....com>
To: "alexander.antonov@...ux.intel.com"
<alexander.antonov@...ux.intel.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>
CC: "alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"kan.liang@...ux.intel.com" <kan.liang@...ux.intel.com>,
"alexey.budankov@...ux.intel.com" <alexey.budankov@...ux.intel.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"acme@...nel.org" <acme@...nel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"Anderson, Russ" <russ.anderson@....com>
Subject: Re: [PATCH] perf/x86/intel/uncore: Fix for iio mapping on Skylake
Server
Hello Alexander,
Do you plan on supporting multiple segment platforms?
Thanks,
Kyle Meyer
________________________________________
From: alexander.antonov@...ux.intel.com <alexander.antonov@...ux.intel.com>
Sent: Monday, September 28, 2020 5:21 AM
To: peterz@...radead.org; linux-kernel@...r.kernel.org; x86@...nel.org
Cc: alexander.shishkin@...ux.intel.com; kan.liang@...ux.intel.com; alexey.budankov@...ux.intel.com; ak@...ux.intel.com; acme@...nel.org; mingo@...hat.com; alexander.antonov@...ux.intel.com; Meyer, Kyle; Anderson, Russ
Subject: [PATCH] perf/x86/intel/uncore: Fix for iio mapping on Skylake Server
From: Alexander Antonov <alexander.antonov@...ux.intel.com>
Introduced early attributes /sys/devices/uncore_iio_<pmu_idx>/die* are
initialized by skx_iio_set_mapping(), however, for example, for multiple
segment platforms skx_iio_get_topology() returns -EPERM before a list of
attributes in skx_iio_mapping_group will have been initialized.
As a result the list is being NULL. Thus the warning
"sysfs: (bin_)attrs not set by subsystem for group: uncore_iio_*/" appears
and uncore_iio pmus are not available in sysfs. Clear IIO attr_update
to properly handle the cases when topology information cannot be
retrieved.
Fixes: bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping")
Reported-by: Kyle Meyer <kyle.meyer@....com>
Suggested-by: Kan Liang <kan.liang@...ux.intel.com>
Reviewed-by: Alexei Budankov <alexey.budankov@...ux.intel.com>
Reviewed-by: Kan Liang <kan.liang@...ux.intel.com>
Signed-off-by: Alexander Antonov <alexander.antonov@...ux.intel.com>
---
arch/x86/events/intel/uncore_snbep.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index 62e88ad919ff..ccfa1d6b6aa0 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -3749,7 +3749,9 @@ static int skx_iio_set_mapping(struct intel_uncore_type *type)
ret = skx_iio_get_topology(type);
if (ret)
- return ret;
+ goto clear_attr_update;
+
+ ret = -ENOMEM;
/* One more for NULL. */
attrs = kcalloc((uncore_max_dies() + 1), sizeof(*attrs), GFP_KERNEL);
@@ -3781,8 +3783,9 @@ static int skx_iio_set_mapping(struct intel_uncore_type *type)
kfree(eas);
kfree(attrs);
kfree(type->topology);
+clear_attr_update:
type->attr_update = NULL;
- return -ENOMEM;
+ return ret;
}
static void skx_iio_cleanup_mapping(struct intel_uncore_type *type)
base-commit: a1b8638ba1320e6684aa98233c15255eb803fac7
--
2.19.1
Powered by blists - more mailing lists