aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-09-16 15:03:56 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:37:17 -0400
commit4427414170a63331a9cc36b9598502c5cdfe453b (patch)
tree684d77d4052d5ab59d2e0786fc627d113a403833 /arch
parentfc5e27ae4b45a0619701a83f30d9b7fad7ed9400 (diff)
mmiotrace: remove left-over marker cruft
Signed-off-by: Pekka Paalanen <pq@iki.fi> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/mmio-mod.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/arch/x86/mm/mmio-mod.c b/arch/x86/mm/mmio-mod.c
index 5e2e2e72ee80..2c4baa88f2cb 100644
--- a/arch/x86/mm/mmio-mod.c
+++ b/arch/x86/mm/mmio-mod.c
@@ -56,13 +56,6 @@ struct remap_trace {
56static DEFINE_PER_CPU(struct trap_reason, pf_reason); 56static DEFINE_PER_CPU(struct trap_reason, pf_reason);
57static DEFINE_PER_CPU(struct mmiotrace_rw, cpu_trace); 57static DEFINE_PER_CPU(struct mmiotrace_rw, cpu_trace);
58 58
59#if 0 /* XXX: no way gather this info anymore */
60/* Access to this is not per-cpu. */
61static DEFINE_PER_CPU(atomic_t, dropped);
62#endif
63
64static struct dentry *marker_file;
65
66static DEFINE_MUTEX(mmiotrace_mutex); 59static DEFINE_MUTEX(mmiotrace_mutex);
67static DEFINE_SPINLOCK(trace_lock); 60static DEFINE_SPINLOCK(trace_lock);
68static atomic_t mmiotrace_enabled; 61static atomic_t mmiotrace_enabled;
@@ -97,44 +90,6 @@ static bool is_enabled(void)
97 return atomic_read(&mmiotrace_enabled); 90 return atomic_read(&mmiotrace_enabled);
98} 91}
99 92
100#if 0 /* XXX: needs rewrite */
101/*
102 * Write callback for the debugfs entry:
103 * Read a marker and write it to the mmio trace log
104 */
105static ssize_t write_marker(struct file *file, const char __user *buffer,
106 size_t count, loff_t *ppos)
107{
108 char *event = NULL;
109 struct mm_io_header *headp;
110 ssize_t len = (count > 65535) ? 65535 : count;
111
112 event = kzalloc(sizeof(*headp) + len, GFP_KERNEL);
113 if (!event)
114 return -ENOMEM;
115
116 headp = (struct mm_io_header *)event;
117 headp->type = MMIO_MAGIC | (MMIO_MARKER << MMIO_OPCODE_SHIFT);
118 headp->data_len = len;
119
120 if (copy_from_user(event + sizeof(*headp), buffer, len)) {
121 kfree(event);
122 return -EFAULT;
123 }
124
125 spin_lock_irq(&trace_lock);
126#if 0 /* XXX: convert this to use tracing */
127 if (is_enabled())
128 relay_write(chan, event, sizeof(*headp) + len);
129 else
130#endif
131 len = -EINVAL;
132 spin_unlock_irq(&trace_lock);
133 kfree(event);
134 return len;
135}
136#endif
137
138static void print_pte(unsigned long address) 93static void print_pte(unsigned long address)
139{ 94{
140 unsigned int level; 95 unsigned int level;
@@ -481,26 +436,12 @@ static void leave_uniprocessor(void)
481} 436}
482#endif 437#endif
483 438
484#if 0 /* XXX: out of order */
485static struct file_operations fops_marker = {
486 .owner = THIS_MODULE,
487 .write = write_marker
488};
489#endif
490
491void enable_mmiotrace(void) 439void enable_mmiotrace(void)
492{ 440{
493 mutex_lock(&mmiotrace_mutex); 441 mutex_lock(&mmiotrace_mutex);
494 if (is_enabled()) 442 if (is_enabled())
495 goto out; 443 goto out;
496 444
497#if 0 /* XXX: tracing does not support text entries */
498 marker_file = debugfs_create_file("marker", 0660, dir, NULL,
499 &fops_marker);
500 if (!marker_file)
501 pr_err(NAME "marker file creation failed.\n");
502#endif
503
504 if (nommiotrace) 445 if (nommiotrace)
505 pr_info(NAME "MMIO tracing disabled.\n"); 446 pr_info(NAME "MMIO tracing disabled.\n");
506 enter_uniprocessor(); 447 enter_uniprocessor();
@@ -525,11 +466,6 @@ void disable_mmiotrace(void)
525 466
526 clear_trace_list(); /* guarantees: no more kmmio callbacks */ 467 clear_trace_list(); /* guarantees: no more kmmio callbacks */
527 leave_uniprocessor(); 468 leave_uniprocessor();
528 if (marker_file) {
529 debugfs_remove(marker_file);
530 marker_file = NULL;
531 }
532
533 pr_info(NAME "disabled.\n"); 469 pr_info(NAME "disabled.\n");
534out: 470out:
535 mutex_unlock(&mmiotrace_mutex); 471 mutex_unlock(&mmiotrace_mutex);