Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ksym_tracer: Support read accesses independent of read/write.

All of the infrastructure already exists to support read accesses
for platforms that support a read access independently of read/write
(such as in the case of the SuperH UBC). This just trivially hooks
up the read case by itself.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20091109083733.GA25848@linux-sh.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

authored by

Paul Mundt and committed by
Frederic Weisbecker
676c0dbe 30ff21e3

+10 -1
+10 -1
kernel/trace/trace_ksym.c
··· 136 136 access |= HW_BREAKPOINT_X; 137 137 138 138 switch (access) { 139 + case HW_BREAKPOINT_R: 139 140 case HW_BREAKPOINT_W: 140 141 case HW_BREAKPOINT_W | HW_BREAKPOINT_R: 141 142 return access; ··· 240 239 241 240 hlist_for_each_entry(entry, node, &ksym_filter_head, ksym_hlist) { 242 241 ret = trace_seq_printf(s, "%pS:", (void *)entry->ksym_addr); 243 - if (entry->type == HW_BREAKPOINT_W) 242 + if (entry->type == HW_BREAKPOINT_R) 243 + ret = trace_seq_puts(s, "r--\n"); 244 + else if (entry->type == HW_BREAKPOINT_W) 244 245 ret = trace_seq_puts(s, "-w-\n"); 245 246 else if (entry->type == (HW_BREAKPOINT_W | HW_BREAKPOINT_R)) 246 247 ret = trace_seq_puts(s, "rw-\n"); ··· 417 414 return TRACE_TYPE_PARTIAL_LINE; 418 415 419 416 switch (field->type) { 417 + case HW_BREAKPOINT_R: 418 + ret = trace_seq_printf(s, " R "); 419 + break; 420 420 case HW_BREAKPOINT_W: 421 421 ret = trace_seq_printf(s, " W "); 422 422 break; ··· 494 488 access_type = entry->type; 495 489 496 490 switch (access_type) { 491 + case HW_BREAKPOINT_R: 492 + seq_puts(m, " R "); 493 + break; 497 494 case HW_BREAKPOINT_W: 498 495 seq_puts(m, " W "); 499 496 break;