From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40qqg1366zzDqXp for ; Tue, 22 May 2018 19:12:45 +1000 (AEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4M98eiA108042 for ; Tue, 22 May 2018 05:12:42 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j4dft77h2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 May 2018 05:12:42 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 May 2018 10:12:41 +0100 From: Anju T Sudhakar To: mpe@ellerman.id.au Cc: linuxppc-dev@lists.ozlabs.org, maddy@linux.vnet.ibm.com, anju@linux.vnet.ibm.com Subject: [PATCH v2 0/4] powerpc/perf: IMC Cleanups Date: Tue, 22 May 2018 14:42:33 +0530 Message-Id: <1526980357-25385-1-git-send-email-anju@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This patch series includes some cleanups and Unregistration of thread-imc pmu, if the kernel does not have core-imc registered. The entire patch set has been verified using the static checker smatch. Command used: $ make ARCH=powerpc CHECK="/smatch -p=kernel" C=1 vmlinux | tee warns.txt Tests Done: * Fail core-imc at init: nest-imc - working cpuhotplug - works as expected thread-imc - not registered * Fail thread-imc at init: nest-imc - works core-imc - works cpuhotplug - works * Fail nest-imc at init core-imc - works thread-imc -works cpuhotplug - works * Fail only one nest unit (say for mcs23) Other nest-units - works core-imc - works thread-imc - works cpuhotplug - works. * Kexec works The first three patches in this series addresses the comments by Dan Carpenter. Patch series is based on: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git (merge branch) Anju T Sudhakar (4): powerpc/perf: Rearrange memory freeing in imc init powerpc/perf: Replace the direct return with goto statement powerpc/perf: Return appropriate value for unknown domain powerpc/perf: Unregister thread-imc if core-imc not supported arch/powerpc/include/asm/imc-pmu.h | 1 + arch/powerpc/perf/imc-pmu.c | 64 +++++++++++++++++++------------ arch/powerpc/platforms/powernv/opal-imc.c | 22 +++++++++-- 3 files changed, 60 insertions(+), 27 deletions(-) -- 2.7.4