projects/linux·commit b41ecbeb

debug_smp_processor_id() fixlets

b41ecbeb · Andrew Morton <[email protected]> · 2008-02-06 01:37:57 -08:00

- Account for debug_smp_processor_id()'s own preempt_disable() when
  displaying the preempt_count().

- 80 cols, not 800.

Cc: Ingo Molnar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
b41ecbebd4091a15233abab2d771e65fb82cdb20
Parents
1bf47346

Changes

1 files changed · +3 −1

FileStatusAddDelContent
lib/smp_processor_id.cmodified+3−1View file

lib/smp_processor_id.c

View file
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index eddc9b3..6c90fb9 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
@@ -42,7 +42,9 @@ unsigned int debug_smp_processor_id(void)
if (!printk_ratelimit())
goto out_enable;
- printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x] code: %s/%d\n", preempt_count(), current->comm, current->pid);
+ printk(KERN_ERR "BUG: using smp_processor_id() in preemptible [%08x] "
+ "code: %s/%d\n",
+ preempt_count() - 1, current->comm, current->pid);
print_symbol("caller is %s\n", (long)__builtin_return_address(0));
dump_stack();