linux-mips
[Top] [All Lists]

[PATCH 7/8] MIPS: smp: Warn on too early irq enable

To: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH 7/8] MIPS: smp: Warn on too early irq enable
From: Yong Zhang <yong.zhang0@gmail.com>
Date: Thu, 17 May 2012 18:10:09 +0800
Cc: ralf@linux-mips.org, david.daney@cavium.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=0IRlgv01dAknhKBKmA6R21toMapphhEqrBvlfTwAgmg=; b=FxQ+4iLaZ0NBIqJC4maFJI5GGb3SOlUtCbOLVVS/vj8BvXrLW1bzDILV/YtrZW6PY1 N/WwVYahrenz6uG8vdIO8gdOhoFvoV6e6mss4VozXNme9jdKjYrXOFfDQ+0u46ZuKlmu XQi94So5CyLGSm38LfC4mLTlk4bilKLlCNlYCdFkgtnT1yrlA4SKc6v5GtyQgPVi0ycZ 3UGRxtzsVLWj1pCHWXIicfi2JqFgdfwmRtXos76mSptQuGJdtitTGCHJ5wh9ilbfD6or NrYXbpLHxxDL79dT3IUUqec6I7cb8SJKRMvK6PvmZ+EN0G18N/0RPw6lAB0pU/cPtDIt A92Q==
In-reply-to: <1337249410-7162-1-git-send-email-yong.zhang0@gmail.com>
References: <1337249410-7162-1-git-send-email-yong.zhang0@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: Yong Zhang <yong.zhang@windriver.com>

Just to catch a potential issue.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
---
 arch/mips/kernel/smp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 042145f..0d48598 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -130,6 +130,11 @@ asmlinkage __cpuinit void start_secondary(void)
 
        synchronise_count_slave();
 
+       /*
+        * irq will be enabled in ->smp_finish(), enable it too early
+        * is dangerous.
+        */
+       WARN_ON_ONCE(!irqs_disabled());
        mp_ops->smp_finish();
 
        cpu_idle();
-- 
1.7.1


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