aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2009-01-11 00:58:08 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-11 13:12:46 -0500
commit7f7ace0cda64c99599c23785f8979a072e118058 (patch)
tree13f2826e64e09ebaef94a3e7fd9c21cfbd31ec3f /drivers/xen
parentc59765042f53a79a7a65585042ff463b69cb248c (diff)
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 <travis@sgi.com> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: virtualization@lists.osdl.org Cc: xen-devel@lists.xensource.com Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index eb0dfdeaa949..e0767ff35d6c 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -125,7 +125,7 @@ static void bind_evtchn_to_cpu(unsigned int chn, unsigned int cpu)
125 125
126 BUG_ON(irq == -1); 126 BUG_ON(irq == -1);
127#ifdef CONFIG_SMP 127#ifdef CONFIG_SMP
128 irq_to_desc(irq)->affinity = cpumask_of_cpu(cpu); 128 cpumask_copy(irq_to_desc(irq)->affinity, cpumask_of(cpu));
129#endif 129#endif
130 130
131 __clear_bit(chn, cpu_evtchn_mask[cpu_evtchn[chn]]); 131 __clear_bit(chn, cpu_evtchn_mask[cpu_evtchn[chn]]);
@@ -142,7 +142,7 @@ static void init_evtchn_cpu_bindings(void)
142 142
143 /* By default all event channels notify CPU#0. */ 143 /* By default all event channels notify CPU#0. */
144 for_each_irq_desc(i, desc) { 144 for_each_irq_desc(i, desc) {
145 desc->affinity = cpumask_of_cpu(0); 145 cpumask_copy(desc->affinity, cpumask_of(0));
146 } 146 }
147#endif 147#endif
148 148