mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
genirq: Move field 'affinity' from irq_data into irq_common_data
Irq affinity mask is per-irq instead of per irqchip, so move it into struct irq_common_data. Signed-off-by: Jiang Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: Tony Luck <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Kevin Cernekee <[email protected]> Cc: Arnd Bergmann <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
af7080e040
commit
9df872faa7
5 changed files with 19 additions and 20 deletions
|
|
@ -38,12 +38,13 @@ static void __init init_irq_default_affinity(void)
|
|||
#ifdef CONFIG_SMP
|
||||
static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node)
|
||||
{
|
||||
if (!zalloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node))
|
||||
if (!zalloc_cpumask_var_node(&desc->irq_common_data.affinity,
|
||||
gfp, node))
|
||||
return -ENOMEM;
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
if (!zalloc_cpumask_var_node(&desc->pending_mask, gfp, node)) {
|
||||
free_cpumask_var(desc->irq_data.affinity);
|
||||
free_cpumask_var(desc->irq_common_data.affinity);
|
||||
return -ENOMEM;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -52,7 +53,7 @@ static int alloc_masks(struct irq_desc *desc, gfp_t gfp, int node)
|
|||
|
||||
static void desc_smp_init(struct irq_desc *desc, int node)
|
||||
{
|
||||
cpumask_copy(desc->irq_data.affinity, irq_default_affinity);
|
||||
cpumask_copy(desc->irq_common_data.affinity, irq_default_affinity);
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
cpumask_clear(desc->pending_mask);
|
||||
#endif
|
||||
|
|
@ -124,7 +125,7 @@ static void free_masks(struct irq_desc *desc)
|
|||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
free_cpumask_var(desc->pending_mask);
|
||||
#endif
|
||||
free_cpumask_var(desc->irq_data.affinity);
|
||||
free_cpumask_var(desc->irq_common_data.affinity);
|
||||
}
|
||||
#else
|
||||
static inline void free_masks(struct irq_desc *desc) { }
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,
|
|||
switch (ret) {
|
||||
case IRQ_SET_MASK_OK:
|
||||
case IRQ_SET_MASK_OK_DONE:
|
||||
cpumask_copy(data->affinity, mask);
|
||||
cpumask_copy(desc->irq_common_data.affinity, mask);
|
||||
case IRQ_SET_MASK_OK_NOCOPY:
|
||||
irq_set_thread_affinity(desc);
|
||||
ret = 0;
|
||||
|
|
@ -304,7 +304,7 @@ static void irq_affinity_notify(struct work_struct *work)
|
|||
if (irq_move_pending(&desc->irq_data))
|
||||
irq_get_pending(cpumask, desc);
|
||||
else
|
||||
cpumask_copy(cpumask, desc->irq_data.affinity);
|
||||
cpumask_copy(cpumask, desc->irq_common_data.affinity);
|
||||
raw_spin_unlock_irqrestore(&desc->lock, flags);
|
||||
|
||||
notify->notify(notify, cpumask);
|
||||
|
|
@ -375,9 +375,9 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask)
|
|||
* one of the targets is online.
|
||||
*/
|
||||
if (irqd_has_set(&desc->irq_data, IRQD_AFFINITY_SET)) {
|
||||
if (cpumask_intersects(desc->irq_data.affinity,
|
||||
if (cpumask_intersects(desc->irq_common_data.affinity,
|
||||
cpu_online_mask))
|
||||
set = desc->irq_data.affinity;
|
||||
set = desc->irq_common_data.affinity;
|
||||
else
|
||||
irqd_clear(&desc->irq_data, IRQD_AFFINITY_SET);
|
||||
}
|
||||
|
|
@ -829,8 +829,8 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
|
|||
* This code is triggered unconditionally. Check the affinity
|
||||
* mask pointer. For CPU_MASK_OFFSTACK=n this is optimized out.
|
||||
*/
|
||||
if (desc->irq_data.affinity)
|
||||
cpumask_copy(mask, desc->irq_data.affinity);
|
||||
if (desc->irq_common_data.affinity)
|
||||
cpumask_copy(mask, desc->irq_common_data.affinity);
|
||||
else
|
||||
valid = false;
|
||||
raw_spin_unlock_irq(&desc->lock);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ static struct proc_dir_entry *root_irq_dir;
|
|||
static int show_irq_affinity(int type, struct seq_file *m, void *v)
|
||||
{
|
||||
struct irq_desc *desc = irq_to_desc((long)m->private);
|
||||
const struct cpumask *mask = desc->irq_data.affinity;
|
||||
const struct cpumask *mask = desc->irq_common_data.affinity;
|
||||
|
||||
#ifdef CONFIG_GENERIC_PENDING_IRQ
|
||||
if (irqd_is_setaffinity_pending(&desc->irq_data))
|
||||
|
|
|
|||
Loading…
Reference in a new issue