Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234759
b: refs/heads/master
c: 7812957
h: refs/heads/master
i:
  234757: afe68e3
  234755: 6feb359
  234751: 5f788bb
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent 1b8e285 commit 02cc1b6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3836ca08aad4575c120ccf328652f3873eea9063
refs/heads/master: 781295762defc709a609efc01d8bb065276cd9a2
3 changes: 2 additions & 1 deletion trunk/include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
#include <asm/irq_regs.h>

struct irq_desc;
struct irq_data;
typedef void (*irq_flow_handler_t)(unsigned int irq,
struct irq_desc *desc);

typedef void (*irq_preflow_handler_t)(struct irq_data *data);

/*
* IRQ line status.
Expand Down
14 changes: 14 additions & 0 deletions trunk/include/linux/irqdesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ struct irq_desc {
struct timer_rand_state *timer_rand_state;
unsigned int __percpu *kstat_irqs;
irq_flow_handler_t handle_irq;
#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
irq_preflow_handler_t preflow_handler;
#endif
struct irqaction *action; /* IRQ action list */
#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
unsigned int status_use_accessors;
Expand Down Expand Up @@ -187,6 +190,17 @@ static inline void __set_irq_handler_unlocked(int irq,
desc = irq_to_desc(irq);
desc->handle_irq = handler;
}

#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
static inline void
__irq_set_preflow_handler(unsigned int irq, irq_preflow_handler_t handler)
{
struct irq_desc *desc;

desc = irq_to_desc(irq);
desc->preflow_handler = handler;
}
#endif
#endif

#endif
3 changes: 3 additions & 0 deletions trunk/kernel/irq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ config AUTO_IRQ_AFFINITY
config HARDIRQS_SW_RESEND
def_bool n

config IRQ_PREFLOW_FASTEOI
def_bool n

config SPARSE_IRQ
bool "Support sparse irq numbering"
depends on HAVE_SPARSE_IRQ
Expand Down
11 changes: 11 additions & 0 deletions trunk/kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,16 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
}
EXPORT_SYMBOL_GPL(handle_level_irq);

#ifdef CONFIG_IRQ_PREFLOW_FASTEOI
static inline void preflow_handler(struct irq_desc *desc)
{
if (desc->preflow_handler)
desc->preflow_handler(&desc->irq_data);
}
#else
static inline void preflow_handler(struct irq_desc *desc) { }
#endif

/**
* handle_fasteoi_irq - irq handler for transparent controllers
* @irq: the interrupt number
Expand Down Expand Up @@ -503,6 +513,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
mask_irq(desc);
goto out;
}
preflow_handler(desc);
handle_irq_event(desc);
out:
desc->irq_data.chip->irq_eoi(&desc->irq_data);
Expand Down

0 comments on commit 02cc1b6

Please sign in to comment.