From: Rui Sousa <rui.p.m.sousa@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: [PATH] Fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
Date: Wed, 3 Sep 2008 17:53:07 +0200 [thread overview]
Message-ID: <200809031753.07292.rui.p.m.sousa@gmail.com> (raw)
Hi,
This patch fixes compilation if CONFIG_TRACE_IRQFLAGS_SUPPORT is ever
disabled (which is currently not allowed by Kconfig). Alternatively
we could just remove the option altogether and the associated code
paths. Since the compilation error has been in the tree for at
least two years and no one noticed it, I guess we don't really have
the need for CONFIG_TRACE_IRQFLAGS_SUPPORT=n.
Boot tested on x86 UP.
Signed-off-by: Rui Sousa <rui.p.m.sousa@gmail.com>
---
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 74bde13..f299351 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -52,10 +52,10 @@
# define start_critical_timings() do { } while (0)
#endif
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-
#include <asm/irqflags.h>
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
+
#define local_irq_enable() \
do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
#define local_irq_disable() \
@@ -84,21 +84,20 @@
* The local_irq_*() APIs are equal to the raw_local_irq*()
* if !TRACE_IRQFLAGS.
*/
-# define raw_local_irq_disable() local_irq_disable()
-# define raw_local_irq_enable() local_irq_enable()
-# define raw_local_irq_save(flags) \
+#define local_irq_disable() raw_local_irq_disable()
+#define local_irq_enable() raw_local_irq_enable()
+#define local_irq_save(flags) \
do { \
typecheck(unsigned long, flags); \
- local_irq_save(flags); \
+ raw_local_irq_save(flags); \
} while (0)
-# define raw_local_irq_restore(flags) \
+# define local_irq_restore(flags) \
do { \
typecheck(unsigned long, flags); \
- local_irq_restore(flags); \
+ raw_local_irq_restore(flags); \
} while (0)
#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
#define safe_halt() \
do { \
trace_hardirqs_on(); \
@@ -124,6 +123,5 @@
typecheck(unsigned long, flags); \
raw_irqs_disabled_flags(flags); \
})
-#endif /* CONFIG_X86 */
#endif
next reply other threads:[~2008-09-03 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 15:53 Rui Sousa [this message]
2008-09-04 14:39 ` [PATH] Fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set Ingo Molnar
2008-09-04 17:14 ` Hiroshi Shimamoto
2008-09-04 17:47 ` Rui Sousa
2008-09-04 18:29 ` Hiroshi Shimamoto
2008-09-05 10:57 ` Ingo Molnar
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=200809031753.07292.rui.p.m.sousa@gmail.com \
--to=rui.p.m.sousa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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