Skip to content

Commit fbb789f

Browse files
committed
sh/ftrace: Remove only user of ftrace_arch_read_dyn_info()
I noticed that there's only one user of ftrace_arch_read_dyn_info(). That was used a while ago during the NMI updating in x86, and superh copied it to implement its version of handling NMIs during stop_machine(). But that is a debug feature, and this code hasn't been touched since 2009. Also, x86 no longer does the ftrace updates with stop_machine() and instead uses breakpoints. If superh needs to modify its code, it should implement the breakpoint conversion, and remove stop_machine(). Which also gets rid of the NMI issue. Anyway, I want to nuke ftrace_arch_read_dyn_info() and this gets rid of the one user, which is for an arch that shouldn't need it anymore. Link: http://lkml.kernel.org/r/20170626181749.2ce954d1@gandalf.local.home Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: linux-sh@vger.kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent 8c08f0d commit fbb789f

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

arch/sh/kernel/ftrace.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,6 @@ static int mod_code_status; /* holds return value of text write */
9696
static void *mod_code_ip; /* holds the IP to write to */
9797
static void *mod_code_newcode; /* holds the text to write to the IP */
9898

99-
static unsigned nmi_wait_count;
100-
static atomic_t nmi_update_count = ATOMIC_INIT(0);
101-
102-
int ftrace_arch_read_dyn_info(char *buf, int size)
103-
{
104-
int r;
105-
106-
r = snprintf(buf, size, "%u %u",
107-
nmi_wait_count,
108-
atomic_read(&nmi_update_count));
109-
return r;
110-
}
111-
11299
static void clear_mod_flag(void)
113100
{
114101
int old = atomic_read(&nmi_running);
@@ -144,7 +131,6 @@ void arch_ftrace_nmi_enter(void)
144131
if (atomic_inc_return(&nmi_running) & MOD_CODE_WRITE_FLAG) {
145132
smp_rmb();
146133
ftrace_mod_code();
147-
atomic_inc(&nmi_update_count);
148134
}
149135
/* Must have previous changes seen before executions */
150136
smp_mb();
@@ -165,8 +151,6 @@ static void wait_for_nmi_and_set_mod_flag(void)
165151
do {
166152
cpu_relax();
167153
} while (atomic_cmpxchg(&nmi_running, 0, MOD_CODE_WRITE_FLAG));
168-
169-
nmi_wait_count++;
170154
}
171155

172156
static void wait_for_nmi(void)
@@ -177,8 +161,6 @@ static void wait_for_nmi(void)
177161
do {
178162
cpu_relax();
179163
} while (atomic_read(&nmi_running));
180-
181-
nmi_wait_count++;
182164
}
183165

184166
static int

0 commit comments

Comments
 (0)