ia64: cpumask fix for is_affinity_mask_valid()

Impact: cleanup

The function prototype should use 'struct cpumask *' to declare
cpumask arguments (instead of cpumask_var_t).

Note: arch/ia64/kernel/irq.c still had the following "old cpumask_t" usages:

105: cpumask_t mask = CPU_MASK_NONE;
107: cpu_set(cpu_logical_id(hwid), mask);
110: irq_desc[irq].affinity = mask;

... replaced with a simple "cpumask_of(cpu_logical_id(hwid))".

161: new_cpu = any_online_cpu(cpu_online_map);
194: time_keeper_id = first_cpu(cpu_online_map);

... replaced with cpu_online_mask refs.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Mike Travis and committed by
Ingo Molnar
d3b66bf2 7d3b56ba

+7 -10
+1 -1
arch/ia64/include/asm/irq.h
··· 27 } 28 29 extern void set_irq_affinity_info (unsigned int irq, int dest, int redir); 30 - bool is_affinity_mask_valid(cpumask_var_t cpumask); 31 32 #define is_affinity_mask_valid is_affinity_mask_valid 33
··· 27 } 28 29 extern void set_irq_affinity_info (unsigned int irq, int dest, int redir); 30 + bool is_affinity_mask_valid(const struct cpumask *cpumask); 31 32 #define is_affinity_mask_valid is_affinity_mask_valid 33
+6 -9
arch/ia64/kernel/irq.c
··· 102 103 void set_irq_affinity_info (unsigned int irq, int hwid, int redir) 104 { 105 - cpumask_t mask = CPU_MASK_NONE; 106 - 107 - cpu_set(cpu_logical_id(hwid), mask); 108 - 109 if (irq < NR_IRQS) { 110 - irq_desc[irq].affinity = mask; 111 irq_redir[irq] = (char) (redir & 0xff); 112 } 113 } 114 115 - bool is_affinity_mask_valid(cpumask_var_t cpumask) 116 { 117 if (ia64_platform_is("sn2")) { 118 /* Only allow one CPU to be specified in the smp_affinity mask */ ··· 125 unsigned int vectors_in_migration[NR_IRQS]; 126 127 /* 128 - * Since cpu_online_map is already updated, we just need to check for 129 * affinity that has zeros 130 */ 131 static void migrate_irqs(void) ··· 155 */ 156 vectors_in_migration[irq] = irq; 157 158 - new_cpu = any_online_cpu(cpu_online_map); 159 160 /* 161 * Al three are essential, currently WARN_ON.. maybe panic? ··· 188 * Find a new timesync master 189 */ 190 if (smp_processor_id() == time_keeper_id) { 191 - time_keeper_id = first_cpu(cpu_online_map); 192 printk ("CPU %d is now promoted to time-keeper master\n", time_keeper_id); 193 } 194
··· 102 103 void set_irq_affinity_info (unsigned int irq, int hwid, int redir) 104 { 105 if (irq < NR_IRQS) { 106 + cpumask_copy(&irq_desc[irq].affinity, 107 + cpumask_of(cpu_logical_id(hwid))); 108 irq_redir[irq] = (char) (redir & 0xff); 109 } 110 } 111 112 + bool is_affinity_mask_valid(const struct cpumask *cpumask) 113 { 114 if (ia64_platform_is("sn2")) { 115 /* Only allow one CPU to be specified in the smp_affinity mask */ ··· 128 unsigned int vectors_in_migration[NR_IRQS]; 129 130 /* 131 + * Since cpu_online_mask is already updated, we just need to check for 132 * affinity that has zeros 133 */ 134 static void migrate_irqs(void) ··· 158 */ 159 vectors_in_migration[irq] = irq; 160 161 + new_cpu = cpumask_any(cpu_online_mask); 162 163 /* 164 * Al three are essential, currently WARN_ON.. maybe panic? ··· 191 * Find a new timesync master 192 */ 193 if (smp_processor_id() == time_keeper_id) { 194 + time_keeper_id = cpumask_first(cpu_online_mask); 195 printk ("CPU %d is now promoted to time-keeper master\n", time_keeper_id); 196 } 197