From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753709AbdEQH5g (ORCPT ); Wed, 17 May 2017 03:57:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39242 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbdEQH5b (ORCPT ); Wed, 17 May 2017 03:57:31 -0400 From: Stewart Smith To: Anju T Sudhakar , mpe@ellerman.id.au Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ego@linux.vnet.ibm.com, bsingharora@gmail.com, anton@samba.org, sukadev@linux.vnet.ibm.com, mikey@neuling.org, dja@axtens.net, eranian@google.com, hemant@linux.vnet.ibm.com, maddy@linux.vnet.ibm.com, anju@linux.vnet.ibm.com Subject: Re: [PATCH v8 07/10] powerpc/perf: PMU functions for Core IMC and hotplugging In-Reply-To: <1493907596-11425-8-git-send-email-anju@linux.vnet.ibm.com> References: <1493907596-11425-1-git-send-email-anju@linux.vnet.ibm.com> <1493907596-11425-8-git-send-email-anju@linux.vnet.ibm.com> User-Agent: Notmuch/0.21+24~gbceb651 (http://notmuchmail.org) Emacs/25.2.1 (x86_64-redhat-linux-gnu) Date: Wed, 17 May 2017 17:57:22 +1000 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 17051707-0008-0000-0000-000007D0A42A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007076; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000212; SDB=6.00861643; UDB=6.00427383; IPR=6.00641305; BA=6.00005353; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015489; XFM=3.00000015; UTC=2017-05-17 07:57:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17051707-0009-0000-0000-0000422EF413 Message-Id: <87wp9fdifx.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-17_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705170061 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Anju T Sudhakar writes: > --- a/arch/powerpc/include/asm/imc-pmu.h > +++ b/arch/powerpc/include/asm/imc-pmu.h > @@ -24,6 +24,7 @@ > */ > #define IMC_MAX_CHIPS 32 > #define IMC_MAX_PMUS 32 > +#define IMC_MAX_CORES 32 > > /* > * This macro is used for memory buffer allocation of > @@ -38,6 +39,11 @@ > #define IMC_NEST_MAX_PAGES 64 > > /* > + * IMC Core engine expects 8K bytes of memory for counter collection. > + */ > +#define IMC_CORE_COUNTER_MEM 8192 Any reason for this not to be in the device tree? This is the size of memory that Linux needs to give OPAL, so the size of that should probably come from OPAL rather than Linux. Otherwise, if in the future, we had a counter with an offset greater than 8192 in, we'd have no way to detect that and we'd fail silently by overwriting memory. -- Stewart Smith OPAL Architect, IBM.