]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/perf: Properly detect mpc7450 family
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 27 Feb 2023 15:54:45 +0000 (16:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:31 +0000 (23:03 +0900)
commit3770bc87d45c744a0322163cca3f58b4b8701519
treeb045eda2b774d3282ff7bc1ffd940d88a56a05ec
parent69199c6f0f919ecc61f1e9244eba99fabe198eb6
powerpc/perf: Properly detect mpc7450 family

[ Upstream commit e7299f961fe5e4496db0bfaa9e819f5e97f3846b ]

Unlike PVR_POWER8, etc ...., PVR_7450 represents a full PVR
value and not a family value.

To avoid confusion, do like E500 family and define the relevant
PVR_VER_xxxx values for the 7450 family:
  0x8000 ==> 7450
  0x8001 ==> 7455
  0x8002 ==> 7447
  0x8003 ==> 7447A
  0x8004 ==> 7448

And use them to detect 7450 family for perf events.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202302260657.7dM9Uwev-lkp@intel.com/
Fixes: b48a8250f367 ("powerpc/perf: Use PVR rather than oprofile field to determine CPU version")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/99ca1da2e5a6cf82a8abf4bc034918e500e31781.1677513277.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/reg.h
arch/powerpc/perf/mpc7450-pmu.c