mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: startww3@inbox.com
To: linux-kernel@vger.kernel.org
Subject: PATCH: irqflags.h
Date: Mon, 21 Dec 2009 20:55:16 -0800	[thread overview]
Message-ID: <09708B4D5B0.0000098Bstartww3@inbox.com> (raw)

The following diff -up patch was tested OK
on AMD K8 2.6.31.5-127 (Fedora 12 standard release)
for the file: include/linux/irqflags.h

Other platforms are untested.
===================================================================================

--- linux-2.6.31/include/linux/irqflags.h.orig  2009-12-21 21:24:55.000000000 -0500
+++ linux-2.6.31/include/linux/irqflags.h       2009-12-21 22:35:44.000000000 -0500
@@ -1,4 +1,22 @@
 /*
+
+ * PATCH Description -
+ *
+ * fixes defines for:
+ * local_irq_enable, local_irq_disable, local_irq_save, local_irq_restore,
+ * safe_halt, local_save_flags, irqs_disabled, irqs_disabled_flags
+ * when CONFIG_TRACE_IRQFLAGS_SUPPORT=n
+ * i.e. (arch/x86/Kconfig.debug contains:
+ *          config TRACE_IRQFLAGS_SUPPORT def_bool n)
+ *
+ * applies to kernel-2.6.31.5-127 (Fedora 12 standard release).
+ *
+ * This patch has tested ok on AMD K8 Fedora 12.
+ *
+ * Signed-off-by: RF <startww3@inbox.com>
+
+
+
  * include/linux/irqflags.h
  *
  * IRQ flags tracing: follow the state of the hardirq and softirq flags and
@@ -80,24 +98,29 @@
                }                                       \
        } while (0)
 #else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
-/*
- * 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)                     \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               local_irq_save(flags);                  \
-       } while (0)
-# define raw_local_irq_restore(flags)                  \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               local_irq_restore(flags);               \
-       } while (0)
+
+#include <asm/irqflags.h>
+
+#define local_irq_enable()             raw_local_irq_enable()
+#define local_irq_disable()            raw_local_irq_disable()
+
+#define local_irq_save(flags)                                          \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_local_irq_save(flags);                              \
+})
+
+#define local_irq_restore(flags)                                       \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_local_irq_restore(flags);                           \
+})
+
 #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */

+
+
+
 #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
 #define safe_halt()                                            \
        do {                                                    \
@@ -105,25 +128,39 @@
                raw_safe_halt();                                \
        } while (0)

-#define local_save_flags(flags)                                \
-       do {                                            \
-               typecheck(unsigned long, flags);        \
-               raw_local_save_flags(flags);            \
+#define local_save_flags(flags)                                        \
+       do {                                                    \
+               typecheck(unsigned long, flags);                \
+               raw_local_save_flags(flags);                    \
        } while (0)

-#define irqs_disabled()                                                \
+
+#else
+
+#define safe_halt()                     raw_safe_halt()
+
+#define local_save_flags(flags)                                \
 ({                                                             \
-       unsigned long _flags;                                   \
-                                                               \
-       raw_local_save_flags(_flags);                           \
-       raw_irqs_disabled_flags(_flags);                        \
+       typecheck(unsigned long, flags);                        \
+       raw_local_save_flags(flags);                            \
+})
+
+
+#endif          /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
+
+
+
+
+#define irqs_disabled()                                         \
+({                                                              \
+       unsigned long _flags;                                   \
+       raw_irqs_disabled();                                    \
 })

-#define irqs_disabled_flags(flags)             \
-({                                             \
-       typecheck(unsigned long, flags);        \
-       raw_irqs_disabled_flags(flags);         \
+#define irqs_disabled_flags(flags)                             \
+({                                                             \
+       typecheck(unsigned long, flags);                        \
+       raw_irqs_disabled_flags(flags);                         \
 })
-#endif         /* CONFIG_X86 */

 #endif

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth

                 reply	other threads:[~2009-12-22  4:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=09708B4D5B0.0000098Bstartww3@inbox.com \
    --to=startww3@inbox.com \
    --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

all inboxes | Powered by JetHome®