From patchwork Mon Sep 13 06:07:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Fleming X-Patchwork-Id: 173832 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8D67iSI013346 for ; Mon, 13 Sep 2010 06:07:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772Ab0IMGHr (ORCPT ); Mon, 13 Sep 2010 02:07:47 -0400 Received: from arkanian.console-pimps.org ([212.110.184.194]:39333 "EHLO arkanian.console-pimps.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752799Ab0IMGHn (ORCPT ); Mon, 13 Sep 2010 02:07:43 -0400 Received: by arkanian.console-pimps.org (Postfix, from userid 1002) id 3D4E14808D; Mon, 13 Sep 2010 07:07:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on arkanian.vm.bytemark.co.uk X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from localhost (cpc5-brad6-0-0-cust25.barn.cable.virginmedia.com [82.38.64.26]) by arkanian.console-pimps.org (Postfix) with ESMTPSA id 8DA7E48089; Mon, 13 Sep 2010 07:07:41 +0100 (BST) From: Matt Fleming To: Robert Richter Cc: Will Deacon , Paul Mundt , Russell King , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Frederic Weisbecker , Arnaldo Carvalho de Melo , linux-arch@vger.kernel.org Subject: [PATCH 5/6] ARM: Make oprofile depend on CONFIG_HW_PERF_EVENTS Date: Mon, 13 Sep 2010 07:07:36 +0100 Message-Id: <831bc9523fe04ce899bc78230990033fbe009431.1284357372.git.matt@console-pimps.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Sep 2010 06:07:48 +0000 (UTC) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a7ed21f..d29075c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -14,7 +14,7 @@ config ARM select RTC_LIB select SYS_SUPPORTS_APM_EMULATION select GENERIC_ATOMIC64 if (!CPU_32v6K) - select HAVE_OPROFILE if (HAVE_PERF_EVENTS) + select HAVE_OPROFILE if (HW_PERF_EVENTS) select HAVE_ARCH_KGDB select HAVE_KPROBES if (!XIP_KERNEL) select HAVE_KRETPROBES if (HAVE_KPROBES) diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 9a3ed26..444ea86 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c @@ -24,7 +24,6 @@ #include #include -#ifdef CONFIG_HW_PERF_EVENTS static char *op_name_from_perf_id(enum arm_perf_pmu_ids id) { switch (id) { @@ -119,11 +118,3 @@ void __exit oprofile_arch_exit(void) { oprofile_perf_exit(); } -#else -int __init oprofile_arch_init(struct oprofile_operations *ops) -{ - pr_info("oprofile: hardware counters not available\n"); - return -ENODEV; -} -void __exit oprofile_arch_exit(void) {} -#endif /* CONFIG_HW_PERF_EVENTS */