Set CPU Affinity for handling interrupt
authorEunok Jo <eunok25.jo@samsung.com>
Fri, 11 Nov 2016 09:23:34 +0000 (18:23 +0900)
committerTaekki Kim <taekki.kim@samsung.com>
Mon, 14 May 2018 05:42:48 +0000 (14:42 +0900)
When HMP for exynos series is enabled, cpu affinity for
handling interrupt will be set only for little cores.
Otherwise, all cores can catch interrupt and handle it.

Change-Id: Id6a37fd0e7e97ed240c94f47c91d096b5f5211cd
Signed-off-by: Eunok Jo <eunok25.jo@samsung.com>
drivers/dma/pl330.c

index 27708c91c5a61add174b8f5470744e1957bc6f19..ed3a7d1698868fea8914a9bd94e6e04328d8f78e 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/of_dma.h>
 #include <linux/err.h>
 #include <linux/pm_runtime.h>
+#include <linux/cpumask.h>
 
 #include "dmaengine.h"
 #ifdef CONFIG_EXYNOS_PD
@@ -3100,7 +3101,11 @@ static int pl330_resume(struct device *dev)
                for (i = 0; i < AMBA_NR_IRQS; i++) {
                        int irq = pl330->irqnum_having_multi[i];
                        if (irq)
+#if defined(CONFIG_SCHED_HMP)
+                               irq_set_affinity(irq, &hmp_slow_cpu_mask);
+#else
                                irq_set_affinity(irq, cpu_all_mask);
+#endif
                        else
                                break;
                }
@@ -3182,7 +3187,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
                                return ret;
 
                        if(pl330->multi_irq) {
+#if defined(CONFIG_SCHED_HMP)
+                               irq_set_affinity(irq, &hmp_slow_cpu_mask);
+#else
                                irq_set_affinity(irq, cpu_all_mask);
+#endif
                                pl330->irqnum_having_multi[count_irq++] = irq;
                        }
                } else {