Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752188AbbGWH2b (ORCPT ); Thu, 23 Jul 2015 03:28:31 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:39192 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbbGWH2W (ORCPT ); Thu, 23 Jul 2015 03:28:22 -0400 X-Helo: d28dlp01.in.ibm.com X-MailFrom: maddy@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Message-ID: <55B096FF.80407@linux.vnet.ibm.com> Date: Thu, 23 Jul 2015 12:55:51 +0530 From: Madhavan Srinivasan User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Daniel Axtens CC: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Stephane Eranian , Paul Mackerras , Anton Blanchard , Preeti U Murthy , Sukadev Bhattiprolu , Ingo Molnar , Anshuman Khandual Subject: Re: [PATCH v5 7/7] powerpc/powernv: nest pmu cpumask and cpu hotplug support References: <1437045206-7491-1-git-send-email-maddy@linux.vnet.ibm.com> <1437045206-7491-8-git-send-email-maddy@linux.vnet.ibm.com> <1437541404.30906.43.camel@axtens.net> <55B08E28.3090902@linux.vnet.ibm.com> <1437634142.13972.12.camel@axtens.net> In-Reply-To: <1437634142.13972.12.camel@axtens.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15072307-0025-0000-0000-000005FF5995 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 33 On Thursday 23 July 2015 12:19 PM, Daniel Axtens wrote: > On Thu, 2015-07-23 at 12:18 +0530, Madhavan Srinivasan wrote: >> On Wednesday 22 July 2015 10:33 AM, Daniel Axtens wrote: >>>> +static void nest_change_cpu_context(int old_cpu, int new_cpu) >>>> +{ >>>> + int i; >>>> + >>>> + for (i = 0; per_nest_pmu_arr[i] != NULL; i++) >>>> + perf_pmu_migrate_context(&per_nest_pmu_arr[i]->pmu, >>>> + old_cpu, new_cpu); >>> From patch 4, I see per_nest_pmu_arr is defined as: >>> +static struct nest_pmu *per_nest_pmu_arr[P8_NEST_MAX_PMUS]; >>> >>> Therefore, does this loop need to have a check that >>> i < P8_NEST_MAX_PMUS? >> No, that is max possible pmu, but we may have only couple for nest pmus >> registered. >> > What if we have P8_NEST_MAX_PMUS registered? Then we'll check beyond the > end of the array... OK, i will add check for P8_NEST_MAX_PMUS also. >> Thanks for the review comments >> Maddy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/