genirq: Provide !SMP stub for irq_set_affinity_notifier()
[firefly-linux-kernel-4.4.55.git] / include / linux / interrupt.h
index 8834a7e5b944a04850ebd824b0dc6b94e944fb35..3f74c0593171c0fd150224e61e761b3c6fbd4618 100644 (file)
@@ -199,6 +199,26 @@ extern int check_wakeup_irqs(void);
 static inline int check_wakeup_irqs(void) { return 0; }
 #endif
 
+/**
+ * struct irq_affinity_notify - context for notification of IRQ affinity changes
+ * @irq:               Interrupt to which notification applies
+ * @kref:              Reference count, for internal use
+ * @work:              Work item, for internal use
+ * @notify:            Function to be called on change.  This will be
+ *                     called in process context.
+ * @release:           Function to be called on release.  This will be
+ *                     called in process context.  Once registered, the
+ *                     structure must only be freed when this function is
+ *                     called or later.
+ */
+struct irq_affinity_notify {
+       unsigned int irq;
+       struct kref kref;
+       struct work_struct work;
+       void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
+       void (*release)(struct kref *ref);
+};
+
 #if defined(CONFIG_SMP)
 
 extern cpumask_var_t irq_default_affinity;
@@ -210,7 +230,7 @@ extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask,
 /**
  * irq_set_affinity - Set the irq affinity of a given irq
  * @irq:       Interrupt to set affinity
- * @mask:      cpumask
+ * @cpumask:   cpumask
  *
  * Fails if cpumask does not contain an online CPU
  */
@@ -223,7 +243,7 @@ irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
 /**
  * irq_force_affinity - Force the irq affinity of a given irq
  * @irq:       Interrupt to set affinity
- * @mask:      cpumask
+ * @cpumask:   cpumask
  *
  * Same as irq_set_affinity, but without checking the mask against
  * online cpus.
@@ -242,26 +262,6 @@ extern int irq_select_affinity(unsigned int irq);
 
 extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
 
-/**
- * struct irq_affinity_notify - context for notification of IRQ affinity changes
- * @irq:               Interrupt to which notification applies
- * @kref:              Reference count, for internal use
- * @work:              Work item, for internal use
- * @notify:            Function to be called on change.  This will be
- *                     called in process context.
- * @release:           Function to be called on release.  This will be
- *                     called in process context.  Once registered, the
- *                     structure must only be freed when this function is
- *                     called or later.
- */
-struct irq_affinity_notify {
-       unsigned int irq;
-       struct kref kref;
-       struct work_struct work;
-       void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
-       void (*release)(struct kref *ref);
-};
-
 extern int
 irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
 
@@ -284,6 +284,12 @@ static inline int irq_set_affinity_hint(unsigned int irq,
 {
        return -EINVAL;
 }
+
+static inline int
+irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
+{
+       return 0;
+}
 #endif /* CONFIG_SMP */
 
 /*