sparc64: Fix bootup with mcount in some configs.
commiteb2bbea7da00366d35e1a57084e7ca864292494d
authorDavid S. Miller <davem@davemloft.net>
Fri, 4 Sep 2009 10:38:54 +0000 (4 03:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 17:45:20 +0000 (15 10:45 -0700)
tree3e53e7391834278c2b618cd5dae59e352bb72b9b
parentdb945b995c0cfdc3276ef886f77cc90e5ceb9ff0
sparc64: Fix bootup with mcount in some configs.

[ Upstream commit bd4352cadfacb9084c97c853b025fac010266c26 ]

Functions invoked early when booting up a cpu can't use
tracing because mcount requires a valid 'current_thread_info()'
and TLB mappings to be setup.

The code path of sun4v_register_mondo_queues --> register_one_mondo
is one such case.  sun4v_register_mondo_queues already has the
necessary 'notrace' annotation, but register_one_mondo does not.

Normally register_one_mondo is inlined so the bug doesn't trigger,
but with some config/compiler combinations, it won't be so we
must properly mark it notrace.

While we're here, add 'notrace' annoations to prom_printf and
prom_halt so that early error handling won't have the same problem.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Reported-by: Leif Sawyer <lsawyer@gci.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/kernel/irq_64.c
arch/sparc/prom/misc_64.c
arch/sparc/prom/printf.c