All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: BMIPS: fix warnings for non BMIPS43xx builds
@ 2013-06-27 10:45 Florian Fainelli
  2013-06-27 11:11 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2013-06-27 10:45 UTC (permalink / raw)
  To: linux-mips; +Cc: ralf, blogic, jogo, cernekee, Florian Fainelli

Commit dccfb4c4 ("MIPS: BMIPS: support booting from physical CPU other
than 0") introduces the following warning when building for non
BMIPS43xx builds:

arch/mips/kernel/smp-bmips.c:150:6: error: unused variable 'tpid'
[-Werror=unused-variable]

Fix this by getting rid of this variable and directly using
cpu_logical_map(cpu).

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
Ralf,

You might want to fold this into the commit that actually introduced the
build warning.

Thanks!

 arch/mips/kernel/smp-bmips.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c
index 62c5c7c..aea6c08 100644
--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -147,7 +147,6 @@ static void bmips_prepare_cpus(unsigned int max_cpus)
  */
 static void bmips_boot_secondary(int cpu, struct task_struct *idle)
 {
-	int tpid = cpu_logical_map(cpu);
 	bmips_smp_boot_sp = __KSTK_TOS(idle);
 	bmips_smp_boot_gp = (unsigned long)task_thread_info(idle);
 	mb();
@@ -174,7 +173,7 @@ static void bmips_boot_secondary(int cpu, struct task_struct *idle)
 	else {
 #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380)
 		/* Reset slave TP1 if booting from TP0 */
-		if (tpid == 0)
+		if (cpu_logical_map(cpu) == 0)
 			set_c0_brcm_cmt_ctrl(0x01);
 #elif defined(CONFIG_CPU_BMIPS5000)
 		if (cpu & 0x01)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-27 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-27 10:45 [PATCH] MIPS: BMIPS: fix warnings for non BMIPS43xx builds Florian Fainelli
2013-06-27 11:11 ` Ralf Baechle
2013-06-27 11:17   ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.