projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'backport/v3.14.24-ltsi-rc1/rcar-du-for-hdmi-20141211' into backport/v3...
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
kernel
/
irq
/
manage.c
diff --git
a/kernel/irq/manage.c
b/kernel/irq/manage.c
index
481a13c
..
ebb8a9e
100644
(file)
--- a/
kernel/irq/manage.c
+++ b/
kernel/irq/manage.c
@@
-150,7
+150,7
@@
int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
struct irq_chip *chip = irq_data_get_irq_chip(data);
int ret;
struct irq_chip *chip = irq_data_get_irq_chip(data);
int ret;
- ret = chip->irq_set_affinity(data, mask, f
als
e);
+ ret = chip->irq_set_affinity(data, mask, f
orc
e);
switch (ret) {
case IRQ_SET_MASK_OK:
cpumask_copy(data->affinity, mask);
switch (ret) {
case IRQ_SET_MASK_OK:
cpumask_copy(data->affinity, mask);
@@
-162,7
+162,8
@@
int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
return ret;
}
return ret;
}
-int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask)
+int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,
+ bool force)
{
struct irq_chip *chip = irq_data_get_irq_chip(data);
struct irq_desc *desc = irq_data_to_desc(data);
{
struct irq_chip *chip = irq_data_get_irq_chip(data);
struct irq_desc *desc = irq_data_to_desc(data);
@@
-172,7
+173,7
@@
int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask)
return -EINVAL;
if (irq_can_move_pcntxt(data)) {
return -EINVAL;
if (irq_can_move_pcntxt(data)) {
- ret = irq_do_set_affinity(data, mask, f
als
e);
+ ret = irq_do_set_affinity(data, mask, f
orc
e);
} else {
irqd_set_move_pending(data);
irq_copy_pending(desc, mask);
} else {
irqd_set_move_pending(data);
irq_copy_pending(desc, mask);
@@
-187,13
+188,7
@@
int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask)
return ret;
}
return ret;
}
-/**
- * irq_set_affinity - Set the irq affinity of a given irq
- * @irq: Interrupt to set affinity
- * @mask: cpumask
- *
- */
-int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
+int __irq_set_affinity(unsigned int irq, const struct cpumask *mask, bool force)
{
struct irq_desc *desc = irq_to_desc(irq);
unsigned long flags;
{
struct irq_desc *desc = irq_to_desc(irq);
unsigned long flags;
@@
-203,7
+198,7
@@
int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
return -EINVAL;
raw_spin_lock_irqsave(&desc->lock, flags);
return -EINVAL;
raw_spin_lock_irqsave(&desc->lock, flags);
- ret =
__irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask
);
+ ret =
irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask, force
);
raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret;
}
raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret;
}
@@
-802,8
+797,7
@@
static irqreturn_t irq_thread_fn(struct irq_desc *desc,
static void wake_threads_waitq(struct irq_desc *desc)
{
static void wake_threads_waitq(struct irq_desc *desc)
{
- if (atomic_dec_and_test(&desc->threads_active) &&
- waitqueue_active(&desc->wait_for_threads))
+ if (atomic_dec_and_test(&desc->threads_active))
wake_up(&desc->wait_for_threads);
}
wake_up(&desc->wait_for_threads);
}
@@
-862,8
+856,8
@@
static int irq_thread(void *data)
irq_thread_check_affinity(desc, action);
action_ret = handler_fn(desc, action);
irq_thread_check_affinity(desc, action);
action_ret = handler_fn(desc, action);
- if (
!noirqdebug
)
-
note_interrupt(action->irq, desc, action_ret
);
+ if (
action_ret == IRQ_HANDLED
)
+
atomic_inc(&desc->threads_handled
);
wake_threads_waitq(desc);
}
wake_threads_waitq(desc);
}