From 0207ad7e8f0e23bd8e2b4e8fb64b0e83a31d9854 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Wed, 7 Dec 2016 21:13:16 +1100 Subject: [PATCH 12/18] Make threaded IRQs optionally the default which can be disabled. --- kernel/irq/Kconfig | 14 ++++++++++++++ kernel/irq/manage.c | 10 ++++++++++ 2 files changed, 24 insertions(+) Index: linux-4.11-ck1/kernel/irq/Kconfig =================================================================== --- linux-4.11-ck1.orig/kernel/irq/Kconfig 2017-05-12 13:25:56.005572928 +1000 +++ linux-4.11-ck1/kernel/irq/Kconfig 2017-05-12 13:25:56.005572928 +1000 @@ -95,6 +95,20 @@ config IRQ_DOMAIN_DEBUG config IRQ_FORCED_THREADING bool +config FORCE_IRQ_THREADING + bool "Make IRQ threading compulsory" + depends on IRQ_FORCED_THREADING + default y + ---help--- + + Make IRQ threading mandatory for any IRQ handlers that support it + instead of being optional and requiring the threadirqs kernel + parameter. Instead they can be optionally disabled with the + nothreadirqs kernel parameter. + + Enable if you are building for a desktop or low latency system, + otherwise say N. + config SPARSE_IRQ bool "Support sparse irq numbering" if MAY_HAVE_SPARSE_IRQ ---help--- Index: linux-4.11-ck1/kernel/irq/manage.c =================================================================== --- linux-4.11-ck1.orig/kernel/irq/manage.c 2017-05-12 13:25:56.005572928 +1000 +++ linux-4.11-ck1/kernel/irq/manage.c 2017-05-12 13:25:56.005572928 +1000 @@ -24,7 +24,17 @@ #include "internals.h" #ifdef CONFIG_IRQ_FORCED_THREADING +#ifdef CONFIG_FORCE_IRQ_THREADING +__read_mostly bool force_irqthreads = true; +#else __read_mostly bool force_irqthreads; +#endif +static int __init setup_noforced_irqthreads(char *arg) +{ + force_irqthreads = false; + return 0; +} +early_param("nothreadirqs", setup_noforced_irqthreads); static int __init setup_forced_irqthreads(char *arg) {