]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/irq.h
Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mv-sheeva.git] / include / linux / irq.h
index eedbb8e5e0ccff99c79594b6485fd9259049d088..cb2e77a3f7f75a770a38b955d561aed8e77d3907 100644 (file)
@@ -157,7 +157,7 @@ struct irq_2_iommu;
  * @irqs_unhandled:    stats field for spurious unhandled interrupts
  * @lock:              locking for SMP
  * @affinity:          IRQ affinity on SMP
- * @cpu:               cpu index useful for balancing
+ * @node:              node index useful for balancing
  * @pending_mask:      pending rebalanced interrupts
  * @threads_active:    number of irqaction threads currently running
  * @wait_for_threads:  wait queue for sync_irq to wait for threaded handlers
@@ -423,30 +423,26 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry);
 /**
  * alloc_desc_masks - allocate cpumasks for irq_desc
  * @desc:      pointer to irq_desc struct
- * @cpu:       cpu which will be handling the cpumasks
+ * @node:      node which will be handling the cpumasks
  * @boot:      true if need bootmem
  *
  * Allocates affinity and pending_mask cpumask if required.
  * Returns true if successful (or not required).
  */
 static inline bool alloc_desc_masks(struct irq_desc *desc, int node,
-                                                               bool boot)
+                                                       bool boot)
 {
-#ifdef CONFIG_CPUMASK_OFFSTACK
-       if (boot) {
-               alloc_bootmem_cpumask_var(&desc->affinity);
+       gfp_t gfp = GFP_ATOMIC;
 
-#ifdef CONFIG_GENERIC_PENDING_IRQ
-               alloc_bootmem_cpumask_var(&desc->pending_mask);
-#endif
-               return true;
-       }
+       if (boot)
+               gfp = GFP_NOWAIT;
 
-       if (!alloc_cpumask_var_node(&desc->affinity, GFP_ATOMIC, node))
+#ifdef CONFIG_CPUMASK_OFFSTACK
+       if (!alloc_cpumask_var_node(&desc->affinity, gfp, node))
                return false;
 
 #ifdef CONFIG_GENERIC_PENDING_IRQ
-       if (!alloc_cpumask_var_node(&desc->pending_mask, GFP_ATOMIC, node)) {
+       if (!alloc_cpumask_var_node(&desc->pending_mask, gfp, node)) {
                free_cpumask_var(desc->affinity);
                return false;
        }