lkml.org 
[lkml]   [2013]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] x86: allow to call text_poke_bp during boot
On Sun, 20 Oct 2013 00:02:32 +0900
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:

> (2013/10/18 23:27), Petr Mladek wrote:
> > We would like to use text_poke_bp in ftrace. It might be called also during
> > boot when the interupts are disabled. We need to enable them for syncing
> > the cores on each CPU. Otherwise, there might be a deadlock, see the
> > warning in "smp_call_function_many", kernel/smp.c:371.
>
> Steven, is this really needed?
> I think if this is the special use(e.g. boottime test),
> we'd better to run it after boot...
>

It's used to convert the calls to mcount to nops. But maybe a better
thing to do is to check if we only have a single CPU:

static void run_sync(void)
{
if (num_online_cpus() != 1)
on_each_cpu(do_sync_core, NULL, 1);
}


I believe that the only time we call this function with interrupts
disabled is before SMP is set up. Thus, the above change would handle
that case.

-- Steve


\
 
 \ /
  Last update: 2013-10-19 21:41    [W:0.080 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site