Commit e327284a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

ocfs2: remove __mlog_cpu_guess

raw_smp_processor_id() is the means of avoiding the runtime preemptibility
check.

[akpm@linux-foundation.org: fix printk warning]
Cc: Joe Perches <joe@perches.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7c2bd2f9
...@@ -64,19 +64,6 @@ static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count) ...@@ -64,19 +64,6 @@ static ssize_t mlog_mask_store(u64 mask, const char *buf, size_t count)
return count; return count;
} }
/*
* 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; \
})
void __mlog_printk(const u64 *mask, const char *func, int line, void __mlog_printk(const u64 *mask, const char *func, int line,
const char *fmt, ...) const char *fmt, ...)
{ {
...@@ -103,9 +90,9 @@ void __mlog_printk(const u64 *mask, const char *func, int line, ...@@ -103,9 +90,9 @@ void __mlog_printk(const u64 *mask, const char *func, int line,
vaf.fmt = fmt; vaf.fmt = fmt;
vaf.va = &args; vaf.va = &args;
printk("%s(%s,%u,%lu):%s:%d %s%pV", printk("%s(%s,%u,%u):%s:%d %s%pV",
level, current->comm, task_pid_nr(current), __mlog_cpu_guess, level, current->comm, task_pid_nr(current),
func, line, prefix, &vaf); raw_smp_processor_id(), func, line, prefix, &vaf);
va_end(args); va_end(args);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment