Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than
oprofile field to determine CPU version") added usage
of pvr value instead of oprofile field to determine the
platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8
when assigning the interface version for power8 platform.
But power8 can also have other pvr values like PVR_POWER8E and
PVR_POWER8NVL. Hence the interface version won't be set
properly incase of PVR_POWER8E and PVR_POWER8NVL.
Fix this issue by adding the checks for PVR_POWER8E and
PVR_POWER8NVL as well.
Fixes: ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version")
Reported-by: Sachin Sant <redacted>
Signed-off-by: Kajol Jain <redacted>
---
arch/powerpc/perf/hv-24x7.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -1727,7 +1727,8 @@ static int hv_24x7_init(void)}/* POWER8 only supports v1, while POWER9 only supports v2. */-if(PVR_VER(pvr)==PVR_POWER8)+if(PVR_VER(pvr)==PVR_POWER8||PVR_VER(pvr)==PVR_POWER8E||+PVR_VER(pvr)==PVR_POWER8NVL)interface_version=1;else{interface_version=2;
From: Sachin Sant <hidden> Date: 2023-02-01 14:12:47
On 01-Feb-2023, at 12:18 AM, Kajol Jain [off-list ref] wrote:
Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than
oprofile field to determine CPU version") added usage
of pvr value instead of oprofile field to determine the
platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8
when assigning the interface version for power8 platform.
But power8 can also have other pvr values like PVR_POWER8E and
PVR_POWER8NVL. Hence the interface version won't be set
properly incase of PVR_POWER8E and PVR_POWER8NVL.
Fix this issue by adding the checks for PVR_POWER8E and
PVR_POWER8NVL as well.
Fixes: ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version")
Reported-by: Sachin Sant <redacted>
Signed-off-by: Kajol Jain <redacted>
---
Thanks for the fix. Tested on Power8 successfully.
Tested-by: Sachin Sant <redacted>
On 01-Feb-2023, at 12:18 AM, Kajol Jain [off-list ref] wrote:
Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than
oprofile field to determine CPU version") added usage
of pvr value instead of oprofile field to determine the
platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8
when assigning the interface version for power8 platform.
But power8 can also have other pvr values like PVR_POWER8E and
PVR_POWER8NVL. Hence the interface version won't be set
properly incase of PVR_POWER8E and PVR_POWER8NVL.
Fix this issue by adding the checks for PVR_POWER8E and
PVR_POWER8NVL as well.
Fixes: ec3eb9d941a9 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version")
Reported-by: Sachin Sant <redacted>
Signed-off-by: Kajol Jain <redacted>
---
Thanks for the fix. Tested on Power8 successfully.
Tested-by: Sachin Sant <redacted>
@@ -1727,7 +1727,8 @@ static int hv_24x7_init(void)
}
/* POWER8 only supports v1, while POWER9 only supports v2. */
- if (PVR_VER(pvr) == PVR_POWER8)
+ if (PVR_VER(pvr) == PVR_POWER8 || PVR_VER(pvr) == PVR_POWER8E ||
+ PVR_VER(pvr) == PVR_POWER8NVL)
Do we really need the check for Power8NV?
Hi Sachin,
Thanks for testing the patch. Here the NVL in POWER8NVL corresponds
to "NVLink" and its not related to PowerNV. PVR value used to specify
processor version which might be in used in any of pseries/powernv,
hence I added this check.
Thanks,
Kajol Jain
From: Michael Ellerman <hidden> Date: 2023-02-15 12:47:39
On Wed, 1 Feb 2023 00:18:04 +0530, Kajol Jain wrote:
Commit ec3eb9d941a9 ("powerpc/perf: Use PVR rather than
oprofile field to determine CPU version") added usage
of pvr value instead of oprofile field to determine the
platform. In hv-24x7 pmu driver code, pvr check uses PVR_POWER8
when assigning the interface version for power8 platform.
But power8 can also have other pvr values like PVR_POWER8E and
PVR_POWER8NVL. Hence the interface version won't be set
properly incase of PVR_POWER8E and PVR_POWER8NVL.
Fix this issue by adding the checks for PVR_POWER8E and
PVR_POWER8NVL as well.
[...]