Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-tracefile.c
index 52986c2..78d0d8a 100644 (file)
 #include <libcfs/libcfs.h>
 #include "tracefile.h"
 
-#ifndef get_cpu
-#define get_cpu() smp_processor_id()
-#define put_cpu() do { } while (0)
-#endif
-
 /* three types of trace_data in linux */
 enum {
        TCD_TYPE_PROC = 0,
@@ -152,7 +147,7 @@ void tracefile_write_unlock()
 char *
 trace_get_console_buffer(void)
 {
-       int  cpu = get_cpu();
+       int  cpu = cfs_get_cpu();
        int  idx;
 
        if (in_irq()) {
@@ -169,7 +164,7 @@ trace_get_console_buffer(void)
 void
 trace_put_console_buffer(char *buffer)
 {
-       put_cpu();
+       cfs_put_cpu();
 }
 
 struct trace_cpu_data *
@@ -178,7 +173,7 @@ trace_get_tcd(void)
        struct trace_cpu_data *tcd;
        int cpu;
 
-       cpu = get_cpu();
+       cpu = cfs_get_cpu();
        if (in_irq())
                tcd = &(*trace_data[TCD_TYPE_IRQ])[cpu].tcd;
        else if (in_softirq())
@@ -196,7 +191,7 @@ trace_put_tcd (struct trace_cpu_data *tcd)
 {
        trace_unlock_tcd(tcd);
 
-       put_cpu();
+       cfs_put_cpu();
 }
 
 int trace_lock_tcd(struct trace_cpu_data *tcd)