Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116621
b: refs/heads/master
c: 4427414
h: refs/heads/master
i:
  116619: 0b44e6e
v: v3
  • Loading branch information
Pekka Paalanen authored and Ingo Molnar committed Oct 14, 2008
1 parent a51ef87 commit 040c07d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 67 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: fc5e27ae4b45a0619701a83f30d9b7fad7ed9400
refs/heads/master: 4427414170a63331a9cc36b9598502c5cdfe453b
64 changes: 0 additions & 64 deletions trunk/arch/x86/mm/mmio-mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ struct remap_trace {
static DEFINE_PER_CPU(struct trap_reason, pf_reason);
static DEFINE_PER_CPU(struct mmiotrace_rw, cpu_trace);

#if 0 /* XXX: no way gather this info anymore */
/* Access to this is not per-cpu. */
static DEFINE_PER_CPU(atomic_t, dropped);
#endif

static struct dentry *marker_file;

static DEFINE_MUTEX(mmiotrace_mutex);
static DEFINE_SPINLOCK(trace_lock);
static atomic_t mmiotrace_enabled;
Expand Down Expand Up @@ -97,44 +90,6 @@ static bool is_enabled(void)
return atomic_read(&mmiotrace_enabled);
}

#if 0 /* XXX: needs rewrite */
/*
* Write callback for the debugfs entry:
* Read a marker and write it to the mmio trace log
*/
static ssize_t write_marker(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{
char *event = NULL;
struct mm_io_header *headp;
ssize_t len = (count > 65535) ? 65535 : count;

event = kzalloc(sizeof(*headp) + len, GFP_KERNEL);
if (!event)
return -ENOMEM;

headp = (struct mm_io_header *)event;
headp->type = MMIO_MAGIC | (MMIO_MARKER << MMIO_OPCODE_SHIFT);
headp->data_len = len;

if (copy_from_user(event + sizeof(*headp), buffer, len)) {
kfree(event);
return -EFAULT;
}

spin_lock_irq(&trace_lock);
#if 0 /* XXX: convert this to use tracing */
if (is_enabled())
relay_write(chan, event, sizeof(*headp) + len);
else
#endif
len = -EINVAL;
spin_unlock_irq(&trace_lock);
kfree(event);
return len;
}
#endif

static void print_pte(unsigned long address)
{
unsigned int level;
Expand Down Expand Up @@ -481,26 +436,12 @@ static void leave_uniprocessor(void)
}
#endif

#if 0 /* XXX: out of order */
static struct file_operations fops_marker = {
.owner = THIS_MODULE,
.write = write_marker
};
#endif

void enable_mmiotrace(void)
{
mutex_lock(&mmiotrace_mutex);
if (is_enabled())
goto out;

#if 0 /* XXX: tracing does not support text entries */
marker_file = debugfs_create_file("marker", 0660, dir, NULL,
&fops_marker);
if (!marker_file)
pr_err(NAME "marker file creation failed.\n");
#endif

if (nommiotrace)
pr_info(NAME "MMIO tracing disabled.\n");
enter_uniprocessor();
Expand All @@ -525,11 +466,6 @@ void disable_mmiotrace(void)

clear_trace_list(); /* guarantees: no more kmmio callbacks */
leave_uniprocessor();
if (marker_file) {
debugfs_remove(marker_file);
marker_file = NULL;
}

pr_info(NAME "disabled.\n");
out:
mutex_unlock(&mmiotrace_mutex);
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/mmiotrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ enum mm_io_opcode {
MMIO_WRITE = 0x2, /* struct mmiotrace_rw */
MMIO_PROBE = 0x3, /* struct mmiotrace_map */
MMIO_UNPROBE = 0x4, /* struct mmiotrace_map */
MMIO_MARKER = 0x5, /* raw char data */
MMIO_UNKNOWN_OP = 0x6, /* struct mmiotrace_rw */
MMIO_UNKNOWN_OP = 0x5, /* struct mmiotrace_rw */
};

struct mmiotrace_rw {
Expand Down

0 comments on commit 040c07d

Please sign in to comment.