aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-12-10 04:06:36 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-12-22 04:44:03 -0500
commita99d6fde69dd9c73ac0b4e42a77ed1ebc714e56a (patch)
tree96d0136b37139a696265b7218e7037ce09a19873 /arch/sh/kernel
parent4d1f3bbec49a080cae753aaa44dc1fc7277b3e50 (diff)
sh: Convert sh64 /proc/asids to debugfs and generic sh.
This converts the sh64 /proc/asids entry to debugfs and enables it for all SH parts that have debugfs enabled. On MMU systems this can be used to determine which processes are using which ASIDs which in turn can be used for finer grained cache tag analysis. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/process_64.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c
index e9bf2548d6d4..a7e5f2e74bac 100644
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -23,7 +23,6 @@
23#include <linux/reboot.h> 23#include <linux/reboot.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/proc_fs.h>
27#include <linux/io.h> 26#include <linux/io.h>
28#include <asm/syscalls.h> 27#include <asm/syscalls.h>
29#include <asm/uaccess.h> 28#include <asm/uaccess.h>
@@ -590,41 +589,3 @@ unsigned long get_wchan(struct task_struct *p)
590#endif 589#endif
591 return pc; 590 return pc;
592} 591}
593
594/* Provide a /proc/asids file that lists out the
595 ASIDs currently associated with the processes. (If the DM.PC register is
596 examined through the debug link, this shows ASID + PC. To make use of this,
597 the PID->ASID relationship needs to be known. This is primarily for
598 debugging.)
599 */
600
601#if defined(CONFIG_SH64_PROC_ASIDS)
602static int
603asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data)
604{
605 int len=0;
606 struct task_struct *p;
607 read_lock(&tasklist_lock);
608 for_each_process(p) {
609 int pid = p->pid;
610
611 if (!pid)
612 continue;
613 if (p->mm)
614 len += sprintf(buf+len, "%5d : %02lx\n", pid,
615 asid_cache(smp_processor_id()));
616 else
617 len += sprintf(buf+len, "%5d : (none)\n", pid);
618 }
619 read_unlock(&tasklist_lock);
620 *eof = 1;
621 return len;
622}
623
624static int __init register_proc_asids(void)
625{
626 create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL);
627 return 0;
628}
629__initcall(register_proc_asids);
630#endif