From patchwork Thu Jun 30 11:35:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bryan Wu X-Patchwork-Id: 932652 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5UBa6M5018246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 30 Jun 2011 11:36:27 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcFWz-0008Ul-3C; Thu, 30 Jun 2011 11:35:37 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QcFWx-0000Iw-Qz; Thu, 30 Jun 2011 11:35:35 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QcFWu-0000Ic-Jr for linux-arm-kernel@lists.infradead.org; Thu, 30 Jun 2011 11:35:33 +0000 Received: by iyn15 with SMTP id 15so2254911iyn.36 for ; Thu, 30 Jun 2011 04:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=qZ+Lb21ix/U914Trk2KBDH88t778a88zAivm8zBdiLU=; b=GTDkfX1AdTGpEcu6FCyOdjC3STgAU3TTaw+Ndv79t9qvWW4kVzKsXxt02CUmSMsnDQ Or0ciZ6kcItziPrt5oGcvCpBggWMpbg/lYLxtu4tlSjtDY9k0o7hfFZu0M9cS8lI46hq XdVNKoYVSwz/2NL/SgcWvN+dPdCvBoDo4d70s= Received: by 10.231.47.207 with SMTP id o15mr1703285ibf.35.1309433727110; Thu, 30 Jun 2011 04:35:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.206.76 with HTTP; Thu, 30 Jun 2011 04:35:06 -0700 (PDT) In-Reply-To: <20110628135706.GA28871@e102144-lin.cambridge.arm.com> References: <1309268265-2685-1-git-send-email-bryan.wu@canonical.com> <20110628135706.GA28871@e102144-lin.cambridge.arm.com> From: Bryan Wu Date: Thu, 30 Jun 2011 19:35:06 +0800 X-Google-Sender-Auth: uq0kXkdVPCEzdUhyAo6imMCTzrI Message-ID: Subject: Re: [PATCH] ARM: automatically select OMAP3_PMU if we try to use perf on OMAP3 To: Will Deacon X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110630_073533_040536_FBD2771C X-CRM114-Status: GOOD ( 21.13 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (cooloney[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: "ming.lei@canonical.com" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 11:36:27 +0000 (UTC) X-MIME-Autoconverted: from quoted-printable to 8bit by demeter1.kernel.org id p5UBa6M5018246 On Tue, Jun 28, 2011 at 9:57 PM, Will Deacon wrote: > > Hi Bryan, > > On Tue, Jun 28, 2011 at 02:37:45PM +0100, Bryan Wu wrote: >> For our Ubuntu kernel on OMAP4 machine, we need to enable OMAP3 as well as >> OMAP4. OMAP3_EMU has to be enabled manully to make CPU_HAS_PMU=y, which is >> required by perf. >> >> So this patch will select the OMAP3_EMU if ARCH_OMAP3 is enabled. >> >> Cc: Ming Lei >> Signed-off-by: Bryan Wu >> --- >>  arch/arm/Kconfig |    4 ++-- >>  1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index 2fd0911..53d0eba 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -1084,10 +1084,10 @@ config XSCALE_PMU >>       default y >> >>  config CPU_HAS_PMU >> -     depends on (CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU) && \ >> -                (!ARCH_OMAP3 || OMAP3_EMU) >> +     depends on CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU >>       default y >>       bool >> +     select OMAP3_EMU if ARCH_OMAP3 >> >>  config MULTI_IRQ_HANDLER >>       bool > > This issue has been discussed on the list in the past and I still think that > it would be better for your config to select OMAP3_EMU explicitly. If we do > that here unconditionally then we end up also bringing in OC_ETM which isn't > something that sounds like a good idea (may have implications for power > consumption in production hardware?). > Will, I quite understand your concern. How about this one? ---- ---- I think it is quite logically clear. 1. if the CPU is V6, V6K, V7, then CPU_HAS_PMU supported 2. if the CPU is OMAP3, we need select OMAP3_EMU built-in 3. if we don't use PERF at all, we don't need built-in OMAP3_EMU Thanks, diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2fd0911..e53f9e4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1084,10 +1084,10 @@ config XSCALE_PMU default y config CPU_HAS_PMU - depends on (CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU) && \ - (!ARCH_OMAP3 || OMAP3_EMU) + depends on CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU default y bool + select OMAP3_EMU if (PERF_EVENTS && ARCH_OMAP3) config MULTI_IRQ_HANDLER bool