diff options
Diffstat (limited to 'arch/ppc/kernel/ppc_htab.c')
-rw-r--r-- | arch/ppc/kernel/ppc_htab.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c index 2f5c7650274f..75c645043746 100644 --- a/arch/ppc/kernel/ppc_htab.c +++ b/arch/ppc/kernel/ppc_htab.c | |||
@@ -52,7 +52,7 @@ static int ppc_htab_open(struct inode *inode, struct file *file) | |||
52 | return single_open(file, ppc_htab_show, NULL); | 52 | return single_open(file, ppc_htab_show, NULL); |
53 | } | 53 | } |
54 | 54 | ||
55 | struct file_operations ppc_htab_operations = { | 55 | const struct file_operations ppc_htab_operations = { |
56 | .open = ppc_htab_open, | 56 | .open = ppc_htab_open, |
57 | .read = seq_read, | 57 | .read = seq_read, |
58 | .llseek = seq_lseek, | 58 | .llseek = seq_lseek, |
@@ -104,7 +104,7 @@ static char *pmc2_lookup(unsigned long mmcr0) | |||
104 | static int ppc_htab_show(struct seq_file *m, void *v) | 104 | static int ppc_htab_show(struct seq_file *m, void *v) |
105 | { | 105 | { |
106 | unsigned long mmcr0 = 0, pmc1 = 0, pmc2 = 0; | 106 | unsigned long mmcr0 = 0, pmc1 = 0, pmc2 = 0; |
107 | #if defined(CONFIG_PPC_STD_MMU) && !defined(CONFIG_PPC64BRIDGE) | 107 | #if defined(CONFIG_PPC_STD_MMU) |
108 | unsigned int kptes = 0, uptes = 0; | 108 | unsigned int kptes = 0, uptes = 0; |
109 | PTE *ptr; | 109 | PTE *ptr; |
110 | #endif /* CONFIG_PPC_STD_MMU */ | 110 | #endif /* CONFIG_PPC_STD_MMU */ |
@@ -133,7 +133,6 @@ static int ppc_htab_show(struct seq_file *m, void *v) | |||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | #ifndef CONFIG_PPC64BRIDGE | ||
137 | for (ptr = Hash; ptr < Hash_end; ptr++) { | 136 | for (ptr = Hash; ptr < Hash_end; ptr++) { |
138 | unsigned int mctx, vsid; | 137 | unsigned int mctx, vsid; |
139 | 138 | ||
@@ -147,7 +146,6 @@ static int ppc_htab_show(struct seq_file *m, void *v) | |||
147 | else | 146 | else |
148 | uptes++; | 147 | uptes++; |
149 | } | 148 | } |
150 | #endif | ||
151 | 149 | ||
152 | seq_printf(m, | 150 | seq_printf(m, |
153 | "PTE Hash Table Information\n" | 151 | "PTE Hash Table Information\n" |
@@ -155,20 +153,16 @@ static int ppc_htab_show(struct seq_file *m, void *v) | |||
155 | "Buckets\t\t: %lu\n" | 153 | "Buckets\t\t: %lu\n" |
156 | "Address\t\t: %08lx\n" | 154 | "Address\t\t: %08lx\n" |
157 | "Entries\t\t: %lu\n" | 155 | "Entries\t\t: %lu\n" |
158 | #ifndef CONFIG_PPC64BRIDGE | ||
159 | "User ptes\t: %u\n" | 156 | "User ptes\t: %u\n" |
160 | "Kernel ptes\t: %u\n" | 157 | "Kernel ptes\t: %u\n" |
161 | "Percent full\t: %lu%%\n" | 158 | "Percent full\t: %lu%%\n" |
162 | #endif | ||
163 | , (unsigned long)(Hash_size>>10), | 159 | , (unsigned long)(Hash_size>>10), |
164 | (Hash_size/(sizeof(PTE)*8)), | 160 | (Hash_size/(sizeof(PTE)*8)), |
165 | (unsigned long)Hash, | 161 | (unsigned long)Hash, |
166 | Hash_size/sizeof(PTE) | 162 | Hash_size/sizeof(PTE) |
167 | #ifndef CONFIG_PPC64BRIDGE | ||
168 | , uptes, | 163 | , uptes, |
169 | kptes, | 164 | kptes, |
170 | ((kptes+uptes)*100) / (Hash_size/sizeof(PTE)) | 165 | ((kptes+uptes)*100) / (Hash_size/sizeof(PTE)) |
171 | #endif | ||
172 | ); | 166 | ); |
173 | 167 | ||
174 | seq_printf(m, | 168 | seq_printf(m, |