]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/irq/proc.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[linux.git] / kernel / irq / proc.c
index 9e5783d98033ee183e389ca9efa3681e0b642743..32c071d7bc0338ac73253c586e04de7fc816a873 100644 (file)
@@ -111,6 +111,28 @@ static int irq_affinity_list_proc_show(struct seq_file *m, void *v)
        return show_irq_affinity(AFFINITY_LIST, m);
 }
 
+#ifndef CONFIG_AUTO_IRQ_AFFINITY
+static inline int irq_select_affinity_usr(unsigned int irq)
+{
+       /*
+        * If the interrupt is started up already then this fails. The
+        * interrupt is assigned to an online CPU already. There is no
+        * point to move it around randomly. Tell user space that the
+        * selected mask is bogus.
+        *
+        * If not then any change to the affinity is pointless because the
+        * startup code invokes irq_setup_affinity() which will select
+        * a online CPU anyway.
+        */
+       return -EINVAL;
+}
+#else
+/* ALPHA magic affinity auto selector. Keep it for historical reasons. */
+static inline int irq_select_affinity_usr(unsigned int irq)
+{
+       return irq_select_affinity(irq);
+}
+#endif
 
 static ssize_t write_irq_affinity(int type, struct file *file,
                const char __user *buffer, size_t count, loff_t *pos)