From: Bob Liu <lliubbo@gmail.com>
To: <linux-kernel@vger.kernel.org>
Cc: <sonic.adi@gmail.com>, <uclinux-dist-devel@blackfin.uclinux.org>,
<vapier@gentoo.org>, Steven Miao <realmz6@gmail.com>,
Bob Liu <lliubbo@gmail.com>
Subject: [PATCH 07/11] blackfin: smp: fix msg queue overflow issue
Date: Mon, 12 Dec 2011 11:28:29 +0800 [thread overview]
Message-ID: <1323660513-9620-7-git-send-email-lliubbo@gmail.com> (raw)
In-Reply-To: <1323660513-9620-1-git-send-email-lliubbo@gmail.com>
From: Steven Miao <realmz6@gmail.com>
disable preemption when icache flush and use wait mode cross call, hold the msg
queue lock while handle cross function call to avoid overflow
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
arch/blackfin/mach-common/smp.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/blackfin/mach-common/smp.c b/arch/blackfin/mach-common/smp.c
index d346405..ac8f8a4 100644
--- a/arch/blackfin/mach-common/smp.c
+++ b/arch/blackfin/mach-common/smp.c
@@ -193,14 +193,10 @@ static irqreturn_t ipi_handler_int1(int irq, void *dev_instance)
scheduler_ipi();
break;
case BFIN_IPI_CALL_FUNC:
- spin_unlock_irqrestore(&msg_queue->lock, flags);
ipi_call_function(cpu, msg);
- spin_lock_irqsave(&msg_queue->lock, flags);
break;
case BFIN_IPI_CPU_STOP:
- spin_unlock_irqrestore(&msg_queue->lock, flags);
ipi_cpu_stop(cpu);
- spin_lock_irqsave(&msg_queue->lock, flags);
break;
default:
printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%lx\n",
@@ -482,8 +478,10 @@ void smp_icache_flush_range_others(unsigned long start, unsigned long end)
smp_flush_data.start = start;
smp_flush_data.end = end;
- if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 0))
+ preempt_disable();
+ if (smp_call_function(&ipi_flush_icache, &smp_flush_data, 1))
printk(KERN_WARNING "SMP: failed to run I-cache flush request on other CPUs\n");
+ preempt_enable();
}
EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
--
1.7.0.4
next prev parent reply other threads:[~2011-12-12 3:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 3:28 [PATCH 01/11] blackfin: bf533-stamp: fix ad1836 name Bob Liu
2011-12-12 3:28 ` [PATCH 02/11] blackfin: bf533-stamp: add missed patches for new asoc driver Bob Liu
2011-12-12 3:28 ` [PATCH 03/11] blackfin: smp: add suspend and wakeup irq flags Bob Liu
2011-12-12 3:28 ` [PATCH 04/11] blackfin: smp: cleanup smp code Bob Liu
2011-12-12 3:28 ` [PATCH 05/11] blackfin: config: update def config for all boards Bob Liu
2011-12-12 3:28 ` [PATCH 06/11] blackfin: config: update macro SPI_BFIN in board file Bob Liu
2011-12-12 3:28 ` Bob Liu [this message]
2011-12-12 3:28 ` [PATCH 08/11] bf54x: get mem size: missing break in switch Bob Liu
2011-12-12 3:28 ` [PATCH 09/11] serial: bfin-uart: remove unused field for hardware flow control Bob Liu
2011-12-12 3:28 ` [PATCH 10/11] bf537: spi sport driver can support any gpio as its cs pin Bob Liu
2011-12-12 3:28 ` [PATCH 11/11] blackfin: mac: dsa: add vlan mask in board file Bob Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323660513-9620-7-git-send-email-lliubbo@gmail.com \
--to=lliubbo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=realmz6@gmail.com \
--cc=sonic.adi@gmail.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome