]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
genirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y
authorThomas Gleixner <tglx@linutronix.de>
Thu, 10 Feb 2011 21:01:25 +0000 (22:01 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 19 Feb 2011 11:58:22 +0000 (12:58 +0100)
If everything uses the right accessors, then enabling
GENERIC_HARDIRQS_NO_COMPAT should just work. If not it will tell you.

Don't be lazy and use the trick which I use in the core code!

git grep status_use_accessors

will unearth it in a split second. Offenders are tracked down and not
slapped with stinking trouts. This time we use frozen shark for a
better educational value.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/irqdesc.h
kernel/irq/internals.h
kernel/irq/settings.h

index 581d9665fd3891528f4b5a9b46803e6d384df0f7..36c95f08023d68b61f936a654e01cc234cfaa68d 100644 (file)
@@ -64,7 +64,11 @@ struct irq_desc {
        unsigned int __percpu   *kstat_irqs;
        irq_flow_handler_t      handle_irq;
        struct irqaction        *action;        /* IRQ action list */
+#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
+       unsigned int            status_use_accessors;
+#else
        unsigned int            status;         /* IRQ status */
+#endif
        unsigned int            core_internal_state__do_not_mess_with_it;
        unsigned int            depth;          /* nested irq disables */
        unsigned int            wake_depth;     /* nested wake enables */
@@ -164,6 +168,7 @@ static inline int irq_has_action(unsigned int irq)
        return desc->action != NULL;
 }
 
+#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
 static inline int irq_balancing_disabled(unsigned int irq)
 {
        struct irq_desc *desc;
@@ -171,6 +176,7 @@ static inline int irq_balancing_disabled(unsigned int irq)
        desc = irq_to_desc(irq);
        return desc->status & IRQ_NO_BALANCING_MASK;
 }
+#endif
 
 /* caller has locked the irq_desc and both params are valid */
 static inline void __set_irq_handler_unlocked(int irq,
index 5e2366da9f3826c593ec9c695592e17387f54734..fd5777ab2d342c18617e87ce5cbb4cfaf896045a 100644 (file)
 
 #define istate core_internal_state__do_not_mess_with_it
 
+#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
+# define status status_use_accessors
+#endif
+
 extern int noirqdebug;
 
 /*
index 55ebe1e09da437851b8a5d569b1e6f42fb420c32..0227ad3582726f8a35ed593b8ac01187c3c3a7d3 100644 (file)
@@ -134,4 +134,5 @@ static inline bool irq_settings_is_nested_thread(struct irq_desc *desc)
 }
 
 /* Nothing should touch desc->status from now on */
+#undef status
 #define status         USE_THE_PROPER_WRAPPERS_YOU_MORON