* [PATCH] powerpc/pseries: Mark accumulate_stolen_time() as notrace
@ 2019-10-24 5:59 Michael Ellerman
2019-10-30 12:14 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2019-10-24 5:59 UTC (permalink / raw)
To: linuxppc-dev
accumulate_stolen_time() is called prior to interrupt state being
reconciled, which can trip the warning in arch_local_irq_restore():
WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258 .arch_local_irq_restore+0x9c/0x130
...
NIP .arch_local_irq_restore+0x9c/0x130
LR .rb_start_commit+0x38/0x80
Call Trace:
.ring_buffer_lock_reserve+0xe4/0x620
.trace_function+0x44/0x210
.function_trace_call+0x148/0x170
.ftrace_ops_no_ops+0x180/0x1d0
ftrace_call+0x4/0x8
.accumulate_stolen_time+0x1c/0xb0
decrementer_common+0x124/0x160
For now just mark it as notrace. We may change the ordering to call it
after interrupt state has been reconciled, but that is a larger
change.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/kernel/time.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 694522308cd5..968ae97382b4 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -232,7 +232,7 @@ static u64 scan_dispatch_log(u64 stop_tb)
* Accumulate stolen time by scanning the dispatch trace log.
* Called on entry from user mode.
*/
-void accumulate_stolen_time(void)
+void notrace accumulate_stolen_time(void)
{
u64 sst, ust;
unsigned long save_irq_soft_mask = irq_soft_mask_return();
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/pseries: Mark accumulate_stolen_time() as notrace
2019-10-24 5:59 [PATCH] powerpc/pseries: Mark accumulate_stolen_time() as notrace Michael Ellerman
@ 2019-10-30 12:14 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-10-30 12:14 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
On Thu, 2019-10-24 at 05:59:32 UTC, Michael Ellerman wrote:
> accumulate_stolen_time() is called prior to interrupt state being
> reconciled, which can trip the warning in arch_local_irq_restore():
>
> WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258 .arch_local_irq_restore+0x9c/0x130
> ...
> NIP .arch_local_irq_restore+0x9c/0x130
> LR .rb_start_commit+0x38/0x80
> Call Trace:
> .ring_buffer_lock_reserve+0xe4/0x620
> .trace_function+0x44/0x210
> .function_trace_call+0x148/0x170
> .ftrace_ops_no_ops+0x180/0x1d0
> ftrace_call+0x4/0x8
> .accumulate_stolen_time+0x1c/0xb0
> decrementer_common+0x124/0x160
>
> For now just mark it as notrace. We may change the ordering to call it
> after interrupt state has been reconciled, but that is a larger
> change.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/eb8e20f89093b64f48975c74ccb114e6775cee22
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-30 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-24 5:59 [PATCH] powerpc/pseries: Mark accumulate_stolen_time() as notrace Michael Ellerman
2019-10-30 12:14 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).