From: Guenter Roeck <linux@roeck-us.net>
To: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: steven.sistare@oracle.com, daniel.m.jordan@oracle.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, peterz@infradead.org
Subject: Re: [PATCH] sched/clock: disable irq for generic_sched_clock_init
Date: Tue, 31 Jul 2018 06:19:27 -0700 [thread overview]
Message-ID: <20180731131927.GA8906@roeck-us.net> (raw)
In-Reply-To: <20180730135252.24599-1-pasha.tatashin@oracle.com>
On Mon, Jul 30, 2018 at 09:52:52AM -0400, Pavel Tatashin wrote:
> sched_clock_init() used be called early in boot when IRQs are still
> disabled. Now, it is called when IRQs are already enabled, and this
> triggers some warning:
>
> WARNING: CPU: 0 PID: 0 at kernel/time/sched_clock.c:180
> sched_clock_register+0x44/0x278
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 4.18.0-rc6-next-20180724 #1
> Hardware name: ARM Integrator/CP (Device Tree)
> [<c0010cb4>] (unwind_backtrace) from [<c000dc24>] (show_stack+0x10/0x18)
> [<c000dc24>] (show_stack) from [<c03ffb94>] (dump_stack+0x18/0x24)
> [<c03ffb94>] (dump_stack) from [<c001a000>] (__warn+0xc8/0xf0)
> [<c001a000>] (__warn) from [<c001a13c>] (warn_slowpath_null+0x3c/0x4c)
> [<c001a13c>] (warn_slowpath_null) from [<c052367c>] (sched_clock_register+0x44/0x278)
> [<c052367c>] (sched_clock_register) from [<c05238d8>] (generic_sched_clock_init+0x28/0x88)
> [<c05238d8>] (generic_sched_clock_init) from [<c0521a00>] (sched_clock_init+0x54/0x74)
> [<c0521a00>] (sched_clock_init) from [<c0519c18>] (start_kernel+0x310/0x3e4)
> [<c0519c18>] (start_kernel) from [<00000000>] ( (null))
> ---[ end trace 08080eb81afa002c ]---
>
> Disable IRQs for the duration of generic_sched_clock_init().
>
> Fixes: 857baa87b642 ("sched/clock: Enable sched clock early")
>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Guenter
prev parent reply other threads:[~2018-07-31 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 13:52 [PATCH] sched/clock: disable irq for generic_sched_clock_init Pavel Tatashin
2018-07-30 17:37 ` [tip:x86/timers] sched/clock: Disable interrupts when calling generic_sched_clock_init() tip-bot for Pavel Tatashin
2018-07-31 13:19 ` Guenter Roeck [this message]
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=20180731131927.GA8906@roeck-us.net \
--to=linux@roeck-us.net \
--cc=daniel.m.jordan@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pasha.tatashin@oracle.com \
--cc=peterz@infradead.org \
--cc=steven.sistare@oracle.com \
--cc=tglx@linutronix.de \
/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