From: Robert Love <rml@tech9.net>
To: Dave Jones <davej@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.5.4-dj1
Date: 11 Feb 2002 21:53:08 -0500 [thread overview]
Message-ID: <1013482389.6781.645.camel@phantasy> (raw)
In-Reply-To: <20020212013034.A14368@suse.de>
In-Reply-To: <20020212013034.A14368@suse.de>
On Mon, 2002-02-11 at 20:30, Dave Jones wrote:
> o Fix UP Preempt compilation. (Mikael Pettersson)
I ended up sending the following patch to Linus instead.
Would you merge this into your next release, so we can keep the trees in
sync (and not inadvertently push your fix over Linus's later on). This
approach removes the conditional altogether in the UP+preempt case, so
it is optimal.
Thanks,
Robert Love
diff -urN linux-2.5.4-dj1/include/asm-i386/smplock.h linux/include/asm-i386/smplock.h
--- linux-2.5.4-dj1/include/asm-i386/smplock.h Sun Feb 10 20:50:13 2002
+++ linux/include/asm-i386/smplock.h Mon Feb 11 21:34:18 2002
@@ -12,10 +12,15 @@
#ifdef CONFIG_SMP
#define kernel_locked() spin_is_locked(&kernel_flag)
+#define check_irq_holder(cpu) \
+do { \
+ if (global_irq_holder == (cpu)) \
+ BUG(); \
+} while(0)
#else
#ifdef CONFIG_PREEMPT
#define kernel_locked() preempt_get_count()
-#define global_irq_holder 0xFF /* NO_PROC_ID */
+#define check_irq_holder(cpu) do { } while(0)
#else
#define kernel_locked() 1
#endif
@@ -28,8 +33,7 @@
do { \
if (unlikely(task->lock_depth >= 0)) { \
spin_unlock(&kernel_flag); \
- if (global_irq_holder == (cpu)) \
- BUG(); \
+ check_irq_holder(cpu); \
} \
} while (0)
next prev parent reply other threads:[~2002-02-12 2:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-12 1:30 Linux 2.5.4-dj1 Dave Jones
2002-02-12 2:53 ` Robert Love [this message]
2002-02-12 11:36 ` Dave Jones
-- strict thread matches above, loose matches on Subject: below --
2002-02-12 2:26 Thomas Hood
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=1013482389.6781.645.camel@phantasy \
--to=rml@tech9.net \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.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