netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjan@linux.intel.com>,
	linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Jeff Garzik <jeff@garzik.org>,
	netdev@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: [PATCH] FRV: Fix {dis,en}able_irq_lockdep_irqrestore compile error
Date: Tue, 05 Sep 2006 16:21:03 +0100	[thread overview]
Message-ID: <5905.1157469663@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060905132530.GD9173@stusta.de>


Fix the lack of certain non-LOCKDEP stub functions in linux/interrupt.h and
also provide FRV with LOCKDEP variants.

This is to be applied to -mm kernel since not all of the functions added exist
in the main kernel.

Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat -p1 frv-irq-lockdep-2618rc5mm1.diff 
 include/asm-frv/irq.h     |   43 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/interrupt.h |    2 ++
 2 files changed, 45 insertions(+)

diff -urp ../kernels/linux-2.6.18-rc5-mm1/include/asm-frv/irq.h linux-2.6.18-rc5-mm1-frv/include/asm-frv/irq.h
--- ../kernels/linux-2.6.18-rc5-mm1/include/asm-frv/irq.h	2006-09-04 18:02:48.000000000 +0100
+++ linux-2.6.18-rc5-mm1-frv/include/asm-frv/irq.h	2006-09-05 15:59:08.000000000 +0100
@@ -39,5 +39,48 @@ extern void disable_irq_nosync(unsigned 
 extern void disable_irq(unsigned int irq);
 extern void enable_irq(unsigned int irq);
 
+#ifdef CONFIG_LOCKDEP
+/*
+ * Special lockdep variants of irq disabling/enabling.
+ * These should be used for locking constructs that
+ * know that a particular irq context which is disabled,
+ * and which is the only irq-context user of a lock,
+ * that it's safe to take the lock in the irq-disabled
+ * section without disabling hardirqs.
+ *
+ * On !CONFIG_LOCKDEP they are equivalent to the normal
+ * irq disable/enable methods.
+ */
+static inline void disable_irq_nosync_lockdep(unsigned int irq)
+{
+	disable_irq_nosync(irq);
+	local_irq_disable();
+}
+
+static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags)
+{
+	disable_irq_nosync(irq);
+	local_irq_save(*flags);
+}
+
+static inline void disable_irq_lockdep(unsigned int irq)
+{
+	disable_irq(irq);
+	local_irq_disable();
+}
+
+static inline void enable_irq_lockdep(unsigned int irq)
+{
+	local_irq_enable();
+	enable_irq(irq);
+}
+
+static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags)
+{
+	local_irq_restore(*flags);
+	enable_irq(irq);
+}
+#endif /* CONFIG_LOCKDEP */
+
 
 #endif /* _ASM_IRQ_H_ */
diff -urp ../kernels/linux-2.6.18-rc5-mm1/include/linux/interrupt.h linux-2.6.18-rc5-mm1-frv/include/linux/interrupt.h
--- ../kernels/linux-2.6.18-rc5-mm1/include/linux/interrupt.h	2006-09-04 18:03:31.000000000 +0100
+++ linux-2.6.18-rc5-mm1-frv/include/linux/interrupt.h	2006-09-05 15:58:53.000000000 +0100
@@ -178,6 +178,8 @@ static inline int disable_irq_wake(unsig
 #  define disable_irq_nosync_lockdep(irq)	disable_irq_nosync(irq)
 #  define disable_irq_lockdep(irq)		disable_irq(irq)
 #  define enable_irq_lockdep(irq)		enable_irq(irq)
+#  define disable_irq_nosync_lockdep_irqsave(irq, flags) disable_irq_nosync(irq)
+#  define enable_irq_lockdep_irqrestore(irq, flags) enable_irq(irq)
 # endif
 
 #endif /* CONFIG_GENERIC_HARDIRQS */

  reply	other threads:[~2006-09-05 15:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060901015818.42767813.akpm@osdl.org>
2006-09-05 13:25 ` 2.6.18-rc5-mm1: {dis,en}able_irq_lockdep_irqrestore compile error Adrian Bunk
2006-09-05 15:21   ` David Howells [this message]
2006-09-06 12:50     ` [PATCH] FRV: Fix " Ingo Molnar
2006-09-05 15:27   ` [PATCH] NOMMU: Move the fallback arch_vma_name() to a sensible place David Howells
2006-09-05 15:29   ` [PATCH] NOMMU: Provide page_mkclean() for NOMMU David Howells
2006-09-05 15:31   ` [PATCH] NOMMU: Make lib/ioremap.c conditional David Howells
2006-09-05 15:35   ` [PATCH] FRV: do_gettimeofday() should no longer use tickadj David Howells
2006-09-06  1:46     ` john stultz
2006-09-06  9:27       ` David Howells
2006-09-06  9:43         ` Ingo Molnar
2006-09-06 12:30           ` David Howells
2006-09-06 12:56             ` Ingo Molnar
2006-09-06 14:46               ` David Howells
2006-09-06 23:01                 ` Benjamin Herrenschmidt
2006-09-07  9:55                   ` David Howells
2006-09-07 10:26                     ` Ingo Molnar
2006-09-07 13:34                       ` David Howells
2006-09-07 22:53                     ` Benjamin Herrenschmidt
2006-09-08 10:25                       ` David Howells
2006-09-08 11:05                         ` Benjamin Herrenschmidt
2006-09-08 12:24                           ` David Howells
2006-09-08 12:29                       ` David Howells
2006-09-11  4:06                         ` Benjamin Herrenschmidt
2006-09-09  5:46                 ` Ingo Molnar
2006-09-11 10:46                   ` David Howells

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=5905.1157469663@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=arjan@linux.intel.com \
    --cc=bunk@stusta.de \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).