Skip to content

Commit

Permalink
ZEN: Add an option to make threadirqs the default
Browse files Browse the repository at this point in the history
And a parameter 'nothreadirqs' to disable it again.
  • Loading branch information
ckolivas authored and heftig committed Jan 27, 2020
1 parent de7119e commit e9a38f8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions kernel/irq/Kconfig
Expand Up @@ -111,6 +111,23 @@ config GENERIC_IRQ_RESERVATION_MODE
config IRQ_FORCED_THREADING
bool

config FORCE_IRQ_THREADING
bool "Make IRQ threading compulsory"
depends on IRQ_FORCED_THREADING
default n
---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.

Enabling this may make some architectures not boot with runqueue
sharing and MuQSS.

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---
Expand Down
11 changes: 11 additions & 0 deletions kernel/irq/manage.c
Expand Up @@ -24,9 +24,20 @@
#include "internals.h"

#if defined(CONFIG_IRQ_FORCED_THREADING) && !defined(CONFIG_PREEMPT_RT)
#ifdef CONFIG_FORCE_IRQ_THREADING
__read_mostly bool force_irqthreads = true;
#else
__read_mostly bool force_irqthreads;
#endif
EXPORT_SYMBOL_GPL(force_irqthreads);

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)
{
force_irqthreads = true;
Expand Down

0 comments on commit e9a38f8

Please sign in to comment.