Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175901
b: refs/heads/master
c: 9288f99
h: refs/heads/master
i:
  175899: c934330
v: v3
  • Loading branch information
Christoph Lameter authored and Tejun Heo committed Oct 12, 2009
1 parent d6ccfa9 commit b6828b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 494f6a9e12f5137d355d3ce3f5789ef148b642bc
refs/heads/master: 9288f99aa52d90a5b82573c4b769c97c55af2f56
8 changes: 4 additions & 4 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ static int dummy_set_flag(u32 old_flags, u32 bit, int set)
*/
static int tracing_disabled = 1;

DEFINE_PER_CPU(local_t, ftrace_cpu_disabled);
DEFINE_PER_CPU(int, ftrace_cpu_disabled);

static inline void ftrace_disable_cpu(void)
{
preempt_disable();
local_inc(&__get_cpu_var(ftrace_cpu_disabled));
__this_cpu_inc(per_cpu_var(ftrace_cpu_disabled));
}

static inline void ftrace_enable_cpu(void)
{
local_dec(&__get_cpu_var(ftrace_cpu_disabled));
__this_cpu_dec(per_cpu_var(ftrace_cpu_disabled));
preempt_enable();
}

Expand Down Expand Up @@ -1085,7 +1085,7 @@ trace_function(struct trace_array *tr,
struct ftrace_entry *entry;

/* If we are reading the ring buffer, don't trace */
if (unlikely(local_read(&__get_cpu_var(ftrace_cpu_disabled))))
if (unlikely(__this_cpu_read(per_cpu_var(ftrace_cpu_disabled))))
return;

event = trace_buffer_lock_reserve(buffer, TRACE_FN, sizeof(*entry),
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ extern int DYN_FTRACE_TEST_NAME(void);

extern int ring_buffer_expanded;
extern bool tracing_selftest_disabled;
DECLARE_PER_CPU(local_t, ftrace_cpu_disabled);
DECLARE_PER_CPU(int, ftrace_cpu_disabled);

#ifdef CONFIG_FTRACE_STARTUP_TEST
extern int trace_selftest_startup_function(struct tracer *trace,
Expand Down

0 comments on commit b6828b8

Please sign in to comment.