Skip to content

Commit

Permalink
genirq: Add internal state field to irq_desc
Browse files Browse the repository at this point in the history
That field will contain internal state information which is not going
to be exposed to anything outside the core code - except via accessor
functions. I'm tired of everyone fiddling in irq_desc.status.

core_internal_state__do_not_mess_with_it is clear enough, annoying to
type and easy to grep for. Offenders will be tracked down and slapped
with stinking trouts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent 35e857c commit dbec07b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct timer_rand_state;
* @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
* @action: the irq action chain
* @status: status information
* @core_internal_state__do_not_mess_with_it: core internal status information
* @depth: disable-depth, for nested irq_disable() calls
* @wake_depth: enable depth, for multiple set_irq_wake() callers
* @irq_count: stats field to detect stalled irqs
Expand Down Expand Up @@ -63,7 +64,7 @@ struct irq_desc {
irq_flow_handler_t handle_irq;
struct irqaction *action; /* IRQ action list */
unsigned int status; /* IRQ status */

unsigned int core_internal_state__do_not_mess_with_it;
unsigned int depth; /* nested irq disables */
unsigned int wake_depth; /* nested wake enables */
unsigned int irq_count; /* For detecting broken IRQs */
Expand Down
6 changes: 6 additions & 0 deletions kernel/irq/internals.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/*
* IRQ subsystem internal functions and variables:
*
* Do not ever include this file from anything else than
* kernel/irq/. Do not even think about using any information outside
* of this file for your non core code.
*/
#include <linux/irqdesc.h>

Expand All @@ -9,6 +13,8 @@
# define IRQ_BITMAP_BITS NR_IRQS
#endif

#define istate core_internal_state__do_not_mess_with_it

extern int noirqdebug;

/*
Expand Down

0 comments on commit dbec07b

Please sign in to comment.