]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hardirq.h
USB: make usbdevices export their device nodes instead of using a separate class
[linux-2.6-omap-h63xx.git] / include / linux / hardirq.h
index 50d8b5744cf6fc5d7e5387289e7139e99cb557b3..7803014f3a11bae4f353e7b042c0e1835997c7be 100644 (file)
 
 #ifndef HARDIRQ_BITS
 #define HARDIRQ_BITS   12
+
+#ifndef MAX_HARDIRQS_PER_CPU
+#define MAX_HARDIRQS_PER_CPU NR_IRQS
+#endif
+
 /*
  * The hardirq mask has to be large enough to have space for potentially
  * all IRQ sources in the system nesting on a single CPU.
  */
-#if (1 << HARDIRQ_BITS) < NR_IRQS
+#if (1 << HARDIRQ_BITS) < MAX_HARDIRQS_PER_CPU
 # error HARDIRQ_BITS is too low!
 #endif
 #endif
@@ -101,13 +106,18 @@ static inline void account_system_vtime(struct task_struct *tsk)
  * always balanced, so the interrupted value of ->hardirq_context
  * will always be restored.
  */
-#define irq_enter()                                    \
+#define __irq_enter()                                  \
        do {                                            \
                account_system_vtime(current);          \
                add_preempt_count(HARDIRQ_OFFSET);      \
                trace_hardirq_enter();                  \
        } while (0)
 
+/*
+ * Enter irq context (on NO_HZ, update jiffies):
+ */
+extern void irq_enter(void);
+
 /*
  * Exit irq context without processing softirqs:
  */
@@ -123,7 +133,7 @@ static inline void account_system_vtime(struct task_struct *tsk)
  */
 extern void irq_exit(void);
 
-#define nmi_enter()            do { lockdep_off(); irq_enter(); } while (0)
+#define nmi_enter()            do { lockdep_off(); __irq_enter(); } while (0)
 #define nmi_exit()             do { __irq_exit(); lockdep_on(); } while (0)
 
 #endif /* LINUX_HARDIRQ_H */