linux-mips
[Top] [All Lists]

[PATCH 9/9 UPDATED] MIPS: Netlogic: Fix oprofile compile on XLR uniproce

To: linux-mips@linux-mips.org, ralf@linux-mips.org, "John Crispin" <john@phrozen.org>
Subject: [PATCH 9/9 UPDATED] MIPS: Netlogic: Fix oprofile compile on XLR uniprocessor
From: "Jayachandran C" <jchandra@broadcom.com>
Date: Mon, 25 Mar 2013 13:21:52 +0530
Cc: "Jayachandran C" <jchandra@broadcom.com>
In-reply-to: <514EBDFA.4030903@phrozen.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <514EBDFA.4030903@phrozen.org>
Sender: linux-mips-bounce@linux-mips.org
The commit c783390a0ecef08df5c804f8c5f647431a04f502 [MIPS: oprofile:
Support for XLR/XLS processors] causes a compilation failure when
oprofile is enabled and SMP is not configured.

arch/mips/oprofile/op_model_mipsxx.c: In function 'mipsxx_cpu_setup':
arch/mips/oprofile/op_model_mipsxx.c:181:2: error: implicit declaration of 
function 'cpu_logical_map'

To fix this, update oprofile_skip_cpu to not call cpu_logical_map when
CONFIG_SMP is not defined.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
---
 arch/mips/oprofile/op_model_mipsxx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/oprofile/op_model_mipsxx.c 
b/arch/mips/oprofile/op_model_mipsxx.c
index 1fd3614..e4b1140 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -41,7 +41,7 @@ static int (*save_perf_irq)(void);
  * first hardware thread in the core for setup and init.
  * Skip CPUs with non-zero hardware thread id (4 hwt per core)
  */
-#ifdef CONFIG_CPU_XLR
+#if defined(CONFIG_CPU_XLR) && defined(CONFIG_SMP)
 #define oprofile_skip_cpu(c)   ((cpu_logical_map(c) & 0x3) != 0)
 #else
 #define oprofile_skip_cpu(c)   0
-- 
1.7.9.5



<Prev in Thread] Current Thread [Next in Thread>