Commit 0539486f authored by Philippe Gerum's avatar Philippe Gerum

ipipe: switch potentially large cpumask to static storage

When a huge number of CPUs is available (e.g. CONFIG_MAXSMP/x86), we
might overflow the stack with cpumask_t variables in
ipipe_critical_enter().

Instead of allocating cpumask_var_t dynamically for these, rely on the
fact that we cannot reenter the code accessing them by design, so
those variables may be moved to local static storage.
parent 23ff222e
......@@ -1779,7 +1779,7 @@ void __ipipe_do_critical_sync(unsigned int irq, void *cookie)
unsigned long ipipe_critical_enter(void (*syncfn)(void))
{
cpumask_t allbutself __maybe_unused, online __maybe_unused;
static cpumask_t allbutself __maybe_unused, online __maybe_unused;
int cpu __maybe_unused, n __maybe_unused;
unsigned long flags, loops __maybe_unused;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment