From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: <linux-kernel@vger.kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <adech.fo@gmail.com>,
Dmitriy Vyukov <dvyukov@google.com>, <will.deacon@arm.com>,
<catalin.marinas@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
<kasan-dev@googlegroups.com>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: [PATCH 1/2] cpu, idle: move init_idle() out of idle_thread_get()
Date: Wed, 2 Mar 2016 16:51:58 +0300 [thread overview]
Message-ID: <1456926719-13102-1-git-send-email-aryabinin@virtuozzo.com> (raw)
In-Reply-To: <56D6E250.7070301@gmail.com>
Currently idle_thread_get() not only gets the idle task but also
initializes it. This is fine for _cpu_up() which is the only caller
of idle_thread_get().
idle_thread_get() is going to be used in the next patch, but it
would be nice to avoid double initialization of idle task.
Hence this patch removes init_idle() call from idle_thread_get()
and invokes it directly from _cpu_up().
No functional changes here.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
kernel/cpu.c | 2 ++
kernel/smpboot.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 5b9d396..63d8e7b 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -503,6 +503,8 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen)
goto out;
}
+ init_idle(idle, cpu);
+
ret = smpboot_create_threads(cpu);
if (ret)
goto out;
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index d264f59..74687e8 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -31,7 +31,6 @@ struct task_struct *idle_thread_get(unsigned int cpu)
if (!tsk)
return ERR_PTR(-ENOMEM);
- init_idle(tsk, cpu);
return tsk;
}
--
2.4.10
next prev parent reply other threads:[~2016-03-02 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 12:38 [PATCH v1] kasan, arm64: Unpoison dirty stack frames when resuming from suspend Alexander Potapenko
2016-02-26 13:53 ` Mark Rutland
2016-02-26 17:28 ` Alexander Potapenko
2016-03-01 19:37 ` Mark Rutland
2016-03-01 19:42 ` Mark Rutland
2016-03-01 20:05 ` [PATCH] sched/kasan: clear stale stack poison kbuild test robot
2016-03-02 12:53 ` [PATCH v1] kasan, arm64: Unpoison dirty stack frames when resuming from suspend Andrey Ryabinin
2016-03-02 13:51 ` Andrey Ryabinin [this message]
2016-03-02 13:51 ` [PATCH 2/2] kasan: unpoison stack of idle task on cpu online Andrey Ryabinin
2016-03-02 14:50 ` Mark Rutland
2016-03-02 15:27 ` Andrey Ryabinin
2016-03-02 15:43 ` Mark Rutland
2016-02-27 1:05 ` [PATCH v1] kasan, arm64: Unpoison dirty stack frames when resuming from suspend kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456926719-13102-1-git-send-email-aryabinin@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=adech.fo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®