mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
cpumask: update irq_desc to use cpumask_var_t
Impact: reduce memory usage, use new cpumask API. Replace the affinity and pending_masks with cpumask_var_t's. This adds to the significant size reduction done with the SPARSE_IRQS changes. The added functions (init_alloc_desc_masks & init_copy_desc_masks) are in the include file so they can be inlined (and optimized out for the !CONFIG_CPUMASKS_OFFSTACK case.) [Naming chosen to be consistent with the other init*irq functions, as well as the backwards arg declaration of "from, to" instead of the more common "to, from" standard.] Includes a slight change to the declaration of struct irq_desc to embed the pending_mask within ifdef(CONFIG_SMP) to be consistent with other references, and some small changes to Xen. Tested: sparse/non-sparse/cpumask_offstack/non-cpumask_offstack/nonuma/nosmp on x86_64 Signed-off-by: Mike Travis <[email protected]> Cc: Chris Wright <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Venkatesh Pallipadi <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Yinghai Lu <[email protected]>
This commit is contained in:
parent
c59765042f
commit
7f7ace0cda
11 changed files with 135 additions and 45 deletions
|
|
@ -125,7 +125,7 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
|
|||
|
||||
BUG_ON(irq == -1);
|
||||
#ifdef CONFIG_SMP
|
||||
irq_to_desc(irq)->affinity = cpumask_of_cpu(cpu);
|
||||
cpumask_copy(irq_to_desc(irq)->affinity, cpumask_of(cpu));
|
||||
#endif
|
||||
|
||||
__clear_bit(chn, cpu_evtchn_mask[cpu_evtchn[chn]]);
|
||||
|
|
@ -142,7 +142,7 @@ static void init_evtchn_cpu_bindings(void)
|
|||
|
||||
/* By default all event channels notify CPU#0. */
|
||||
for_each_irq_desc(i, desc) {
|
||||
desc->affinity = cpumask_of_cpu(0);
|
||||
cpumask_copy(desc->affinity, cpumask_of(0));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue