public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question re: __mlog_cpu_guess in fs/ocfs2/cluster/masklog.h
@ 2006-05-22 23:45 Lee Revell
  2006-05-23 15:27 ` Zach Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Revell @ 2006-05-22 23:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: mark.fasheh, kurt.hackel

I am puzzled by this code and comment:

/*
 * smp_processor_id() "helpfully" screams when called outside preemptible
 * regions in current kernels.  sles doesn't have the variants that don't
 * scream.  just do this instead of trying to guess which we're building
 * against.. *sigh*.
 */
#define __mlog_cpu_guess ({             \
        unsigned long _cpu = get_cpu(); \
        put_cpu();                      \
        _cpu;                           \
})

First I think you mean "inside preemptible regions".  Second, it screams
because it's a bug to call smp_processor_id() from preemptible code!

Am I missing something?

Lee


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-23 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-22 23:45 Question re: __mlog_cpu_guess in fs/ocfs2/cluster/masklog.h Lee Revell
2006-05-23 15:27 ` Zach Brown
2006-05-23 16:34   ` Lee Revell
2006-05-23 16:42     ` Zach Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox