~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/sh/mm/cache-debugfs.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
        CACHE_TYPE_UNIFIED,
23
23
};
24
24
 
25
 
static int __uses_jump_to_uncached cache_seq_show(struct seq_file *file,
26
 
                                                  void *iter)
 
25
static int cache_seq_show(struct seq_file *file, void *iter)
27
26
{
28
27
        unsigned int cache_type = (unsigned int)file->private;
29
28
        struct cache_info *cache;
37
36
         */
38
37
        jump_to_uncached();
39
38
 
40
 
        ccr = ctrl_inl(CCR);
 
39
        ccr = __raw_readl(CCR);
41
40
        if ((ccr & CCR_CACHE_ENABLE) == 0) {
42
41
                back_to_cached();
43
42
 
90
89
                for (addr = addrstart, line = 0;
91
90
                     addr < addrstart + waysize;
92
91
                     addr += cache->linesz, line++) {
93
 
                        unsigned long data = ctrl_inl(addr);
 
92
                        unsigned long data = __raw_readl(addr);
94
93
 
95
94
                        /* Check the V bit, ignore invalid cachelines */
96
95
                        if ((data & 1) == 0)
127
126
{
128
127
        struct dentry *dcache_dentry, *icache_dentry;
129
128
 
130
 
        dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root,
 
129
        dcache_dentry = debugfs_create_file("dcache", S_IRUSR, arch_debugfs_dir,
131
130
                                            (unsigned int *)CACHE_TYPE_DCACHE,
132
131
                                            &cache_debugfs_fops);
133
132
        if (!dcache_dentry)
134
133
                return -ENOMEM;
135
 
        if (IS_ERR(dcache_dentry))
136
 
                return PTR_ERR(dcache_dentry);
137
134
 
138
 
        icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root,
 
135
        icache_dentry = debugfs_create_file("icache", S_IRUSR, arch_debugfs_dir,
139
136
                                            (unsigned int *)CACHE_TYPE_ICACHE,
140
137
                                            &cache_debugfs_fops);
141
138
        if (!icache_dentry) {
142
139
                debugfs_remove(dcache_dentry);
143
140
                return -ENOMEM;
144
141
        }
145
 
        if (IS_ERR(icache_dentry)) {
146
 
                debugfs_remove(dcache_dentry);
147
 
                return PTR_ERR(icache_dentry);
148
 
        }
149
142
 
150
143
        return 0;
151
144
}