11 #include <linux/module.h>
14 #include <asm/processor.h>
15 #include <asm/uaccess.h>
16 #include <asm/cache.h>
25 static int cache_seq_show(
struct seq_file *
file,
void *iter)
29 unsigned int waysize, way;
31 unsigned long addrstart = 0;
55 waysize =
cache->sets;
64 waysize <<=
cache->entry_shift;
66 for (way = 0; way <
cache->ways; way++) {
70 seq_printf(file,
"-----------------------------------------\n");
72 seq_printf(file,
"-----------------------------------------\n");
74 for (addr = addrstart, line = 0;
75 addr < addrstart + waysize;
76 addr +=
cache->linesz, line++) {
85 line, data & 2 ?
'U' :
' ',
89 addrstart +=
cache->way_incr;
97 static int cache_debugfs_open(
struct inode *
inode,
struct file *file)
104 .open = cache_debugfs_open,
110 static int __init cache_debugfs_init(
void)
112 struct dentry *dcache_dentry, *icache_dentry;
116 &cache_debugfs_fops);
122 &cache_debugfs_fops);
123 if (!icache_dentry) {