From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>, <stable-rt@vger.kernel.org>,
Priyanka Jain <Priyanka.Jain@freescale.com>
Subject: [PATCH RT 3/5] powerpc/64bit,PREEMPT_RT: Check preempt_count before preempting
Date: Fri, 03 May 2013 17:37:06 -0400 [thread overview]
Message-ID: <20130503213818.087747521@goodmis.org> (raw)
In-Reply-To: <20130503213703.521223574@goodmis.org>
[-- Attachment #1: 0003-powerpc-64bit-PREEMPT_RT-Check-preempt_count-before-.patch --]
[-- Type: text/plain, Size: 1050 bytes --]
From: Priyanka Jain <Priyanka.Jain@freescale.com>
In ret_from_except_lite() with CONFIG_PREEMPT enabled,
add the missing check to compare value of preempt_count
with zero before continuing with preemption process of
the current task.
If preempt_count is non-zero, restore reg and return,
else continue the preemption process.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
arch/powerpc/kernel/entry_64.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index a9b98cc..7af1ea7 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -596,6 +596,8 @@ resume_kernel:
#ifdef CONFIG_PREEMPT
/* Check if we need to preempt */
lwz r8,TI_PREEMPT(r9)
+ cmpwi 0,r8,0 /* if non-zero, just restore regs and return */
+ bne restore
andi. r0,r4,_TIF_NEED_RESCHED
bne+ 1f
--
1.7.10.4
next prev parent reply other threads:[~2013-05-03 21:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 21:37 [PATCH RT 0/5] [ANNOUNCE] 3.6.11.2-rt34-rc1 Steven Rostedt
2013-05-03 21:37 ` [PATCH RT 1/5] tcp: force a dst refcount when prequeue packet Steven Rostedt
2013-05-03 21:37 ` [PATCH RT 2/5] x86/mce: Defer mce wakeups to threads for PREEMPT_RT Steven Rostedt
2013-05-03 21:37 ` Steven Rostedt [this message]
2013-05-03 21:37 ` [PATCH RT 4/5] swap: Use unique local lock name for swap_lock Steven Rostedt
2013-05-03 21:37 ` [PATCH RT 5/5] Linux 3.6.11.2-rt34-rc1 Steven Rostedt
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=20130503213818.087747521@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=Priyanka.Jain@freescale.com \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=stable-rt@vger.kernel.org \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®