mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tsutomu OWA <tsutomu.owa@toshiba.co.jp>
To: mingo@elte.hu
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
	tsutomu.owa@toshiba.co.jp
Subject: [RFC] [patch 4/6 -rt] powerpc 2.6.20-rt8: fix a runtime warnings for xmon
Date: Wed, 07 Mar 2007 10:42:08 +0900	[thread overview]
Message-ID: <yyi3b4h25jj.wl@toshiba.co.jp> (raw)
In-Reply-To: <yyi8xe925vg.wl@toshiba.co.jp>


  To fix the following runtime warnings when entering xmon.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Entering xmon
BUG: using smp_processor_id() in preemptible [00000000] code: khvcd/280
caller is .xmon_core+0xb8/0x8ec
Call Trace:
[C00000000FD737C0] [C00000000000FAAC] .show_stack+0x68/0x1b0 (unreliable)
[C00000000FD73860] [C0000000001F71F0] .debug_smp_processor_id+0xc8/0xf8
[C00000000FD738F0] [C00000000004AF30] .xmon_core+0xb8/0x8ec
[C00000000FD73A80] [C00000000004B918] .xmon+0x38/0x4c
[C00000000FD73C60] [C00000000004BA8C] .sysrq_handle_xmon+0x48/0x5c
[C00000000FD73CD0] [C000000000243A68] .__handle_sysrq+0xe0/0x1b0
[C00000000FD73D70] [C000000000244974] .hvc_poll+0x18c/0x2b4
[C00000000FD73E50] [C000000000244E80] .khvcd+0x88/0x164
[C00000000FD73EE0] [C000000000075014] .kthread+0x124/0x174
[C00000000FD73F90] [C000000000023D48] .kernel_thread+0x4c/0x68
BUG: khvcd:280 task might have lost a preemption check!
Call Trace:
[C00000000FD73740] [C00000000000FAAC] .show_stack+0x68/0x1b0 (unreliable)
[C00000000FD737E0] [C000000000054920] .preempt_enable_no_resched+0x64/0x7c
[C00000000FD73860] [C0000000001F71F8] .debug_smp_processor_id+0xd0/0xf8
[C00000000FD738F0] [C00000000004AF30] .xmon_core+0xb8/0x8ec
[C00000000FD73A80] [C00000000004B918] .xmon+0x38/0x4c
[C00000000FD73C60] [C00000000004BA8C] .sysrq_handle_xmon+0x48/0x5c
[C00000000FD73CD0] [C000000000243A68] .__handle_sysrq+0xe0/0x1b0
[C00000000FD73D70] [C000000000244974] .hvc_poll+0x18c/0x2b4
[C00000000FD73E50] [C000000000244E80] .khvcd+0x88/0x164
[C00000000FD73EE0] [C000000000075014] .kthread+0x124/0x174
[C00000000FD73F90] [C000000000023D48] .kernel_thread+0x4c/0x68
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

  I'd appreciate if experts on xmon would give any comments/suggestions
on this.  These warnings was just found yesterday, this patch seems to
eliminate the warnings but I have not looked into it seriously.

Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
-- owa

diff -rup linux-rt8/arch/powerpc/xmon/xmon.c rt/arch/powerpc/xmon/xmon.c
--- linux-rt8/arch/powerpc/xmon/xmon.c	2007-02-20 09:38:52.000000000 +0900
+++ rt/arch/powerpc/xmon/xmon.c	2007-03-05 15:29:46.000000000 +0900
@@ -342,6 +342,7 @@ static int xmon_core(struct pt_regs *reg
 
 	msr = mfmsr();
 	mtmsr(msr & ~MSR_EE);	/* disable interrupts */
+	preempt_disable();
 
 	bp = in_breakpoint_table(regs->nip, &offset);
 	if (bp != NULL) {
@@ -516,6 +517,7 @@ static int xmon_core(struct pt_regs *reg
 
 	insert_cpu_bpts();
 
+	preempt_enable();
 	mtmsr(msr);		/* restore interrupt enable */
 
 	return cmd != 'X' && cmd != EOF;


  parent reply	other threads:[~2007-03-07  1:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07  1:34 [patch 0/6 -rt] powerpc 2.6.20-rt8: fix boot/runtime errors/warnings for PowerPC(ppc64) Tsutomu OWA
2007-03-07  1:36 ` [patch 1/6 -rt] powerpc 2.6.20-rt8: add preemption checks for NEED_RESCHED_DELAYED Tsutomu OWA
2007-03-16 19:20   ` Sergei Shtylyov
2007-03-19  0:00     ` Tsutomu OWA
2007-03-07  1:37 ` [patch 2/6 -rt] powerpc 2.6.20-rt8: to convert spinlocks to raw ones Tsutomu OWA
2007-03-07 14:38   ` Sergei Shtylyov
2007-03-07 14:43     ` Benjamin Herrenschmidt
2007-03-07 14:54       ` Sergei Shtylyov
2007-03-07 16:49     ` Paul Mackerras
2007-03-07 17:30       ` Sergei Shtylyov
2007-03-07 19:21         ` Paul Mackerras
2007-03-07 21:21           ` Sergei Shtylyov
2007-03-07 21:30             ` Paul Mackerras
2007-03-08  0:43               ` Bill Huey
2007-03-08  3:26                 ` Paul Mackerras
2007-03-08  4:00                   ` Bill Huey
2007-03-07  1:39 ` [patch 3/6 -rt] powerpc 2.6.20-rt8: fix a runtime warning for smp_processor_id() Tsutomu OWA
2007-03-07  1:42 ` Tsutomu OWA [this message]
2007-03-07  9:16   ` [RFC] [patch 4/6 -rt] powerpc 2.6.20-rt8: fix a runtime warnings for xmon Ingo Molnar
2007-03-07 10:10     ` Benjamin Herrenschmidt
2007-03-07 10:54       ` Tsutomu OWA
2007-03-07 11:06     ` Arnd Bergmann
2007-03-07  1:45 ` [RFC] [patch 5/6] powerpc 2.6.20-rt8: fix a boot error for handle_percpu_irq Tsutomu OWA
2007-03-07 21:29   ` Sergei Shtylyov
2007-03-07  1:47 ` [patch 6/6 -rt] powerpc 2.6.20-rt8: fix boot/runtime errors/warnings Tsutomu OWA
2007-03-07  9:13 ` [patch 0/6 -rt] powerpc 2.6.20-rt8: fix boot/runtime errors/warnings for PowerPC(ppc64) Ingo Molnar
2007-03-07 14:26 ` Sergei Shtylyov
2007-03-08  2:28   ` Tsutomu OWA

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=yyi3b4h25jj.wl@toshiba.co.jp \
    --to=tsutomu.owa@toshiba.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    /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®