genirq: Use modify_status for set_irq_nested_thread
No need for a separate function in the core code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
7acdd53e5b
commit
6f91a52d9b
|
@ -74,7 +74,7 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
|
||||||
#define IRQF_MODIFY_MASK \
|
#define IRQF_MODIFY_MASK \
|
||||||
(IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
|
(IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
|
||||||
IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \
|
IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \
|
||||||
IRQ_PER_CPU)
|
IRQ_PER_CPU | IRQ_NESTED_THREAD)
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_PER_CPU
|
#ifdef CONFIG_IRQ_PER_CPU
|
||||||
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
|
# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
|
||||||
|
@ -307,8 +307,6 @@ set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)
|
||||||
__set_irq_handler(irq, handle, 1, NULL);
|
__set_irq_handler(irq, handle, 1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void set_irq_nested_thread(unsigned int irq, int nest);
|
|
||||||
|
|
||||||
void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set);
|
void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set);
|
||||||
|
|
||||||
static inline void irq_set_status_flags(unsigned int irq, unsigned long set)
|
static inline void irq_set_status_flags(unsigned int irq, unsigned long set)
|
||||||
|
@ -331,6 +329,14 @@ static inline void irq_set_probe(unsigned int irq)
|
||||||
irq_modify_status(irq, IRQ_NOPROBE, 0);
|
irq_modify_status(irq, IRQ_NOPROBE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void irq_set_nested_thread(unsigned int irq, bool nest)
|
||||||
|
{
|
||||||
|
if (nest)
|
||||||
|
irq_set_status_flags(irq, IRQ_NESTED_THREAD);
|
||||||
|
else
|
||||||
|
irq_clear_status_flags(irq, IRQ_NESTED_THREAD);
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle dynamic irq creation and destruction */
|
/* Handle dynamic irq creation and destruction */
|
||||||
extern unsigned int create_irq_nr(unsigned int irq_want, int node);
|
extern unsigned int create_irq_nr(unsigned int irq_want, int node);
|
||||||
extern int create_irq(void);
|
extern int create_irq(void);
|
||||||
|
@ -448,6 +454,10 @@ static inline void set_irq_probe(unsigned int irq)
|
||||||
{
|
{
|
||||||
irq_set_probe(irq);
|
irq_set_probe(irq);
|
||||||
}
|
}
|
||||||
|
static inline void set_irq_nested_thread(unsigned int irq, int nest)
|
||||||
|
{
|
||||||
|
irq_set_nested_thread(irq, nest);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);
|
int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);
|
||||||
|
|
|
@ -164,34 +164,6 @@ struct irq_data *irq_get_irq_data(unsigned int irq)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(irq_get_irq_data);
|
EXPORT_SYMBOL_GPL(irq_get_irq_data);
|
||||||
|
|
||||||
/**
|
|
||||||
* set_irq_nested_thread - Set/Reset the IRQ_NESTED_THREAD flag of an irq
|
|
||||||
*
|
|
||||||
* @irq: Interrupt number
|
|
||||||
* @nest: 0 to clear / 1 to set the IRQ_NESTED_THREAD flag
|
|
||||||
*
|
|
||||||
* The IRQ_NESTED_THREAD flag indicates that on
|
|
||||||
* request_threaded_irq() no separate interrupt thread should be
|
|
||||||
* created for the irq as the handler are called nested in the
|
|
||||||
* context of a demultiplexing interrupt handler thread.
|
|
||||||
*/
|
|
||||||
void set_irq_nested_thread(unsigned int irq, int nest)
|
|
||||||
{
|
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
if (!desc)
|
|
||||||
return;
|
|
||||||
|
|
||||||
raw_spin_lock_irqsave(&desc->lock, flags);
|
|
||||||
if (nest)
|
|
||||||
desc->status |= IRQ_NESTED_THREAD;
|
|
||||||
else
|
|
||||||
desc->status &= ~IRQ_NESTED_THREAD;
|
|
||||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(set_irq_nested_thread);
|
|
||||||
|
|
||||||
int irq_startup(struct irq_desc *desc)
|
int irq_startup(struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
desc->status &= ~IRQ_DISABLED;
|
desc->status &= ~IRQ_DISABLED;
|
||||||
|
|
Loading…
Reference in a new issue