aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel/devices.c')
-rw-r--r--arch/sparc64/kernel/devices.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c
index 817132826e09..71eee392e141 100644
--- a/arch/sparc64/kernel/devices.c
+++ b/arch/sparc64/kernel/devices.c
@@ -200,7 +200,8 @@ void __init device_scan(void)
200 200
201#ifndef CONFIG_SMP 201#ifndef CONFIG_SMP
202 { 202 {
203 int err, cpu_node; 203 int err, cpu_node, def;
204
204 err = cpu_find_by_instance(0, &cpu_node, NULL); 205 err = cpu_find_by_instance(0, &cpu_node, NULL);
205 if (err) { 206 if (err) {
206 prom_printf("No cpu nodes, cannot continue\n"); 207 prom_printf("No cpu nodes, cannot continue\n");
@@ -209,21 +210,40 @@ void __init device_scan(void)
209 cpu_data(0).clock_tick = prom_getintdefault(cpu_node, 210 cpu_data(0).clock_tick = prom_getintdefault(cpu_node,
210 "clock-frequency", 211 "clock-frequency",
211 0); 212 0);
213
214 def = ((tlb_type == hypervisor) ?
215 (8 * 1024) :
216 (16 * 1024));
212 cpu_data(0).dcache_size = prom_getintdefault(cpu_node, 217 cpu_data(0).dcache_size = prom_getintdefault(cpu_node,
213 "dcache-size", 218 "dcache-size",
214 16 * 1024); 219 def);
220
221 def = 32;
215 cpu_data(0).dcache_line_size = 222 cpu_data(0).dcache_line_size =
216 prom_getintdefault(cpu_node, "dcache-line-size", 32); 223 prom_getintdefault(cpu_node, "dcache-line-size",
224 def);
225
226 def = 16 * 1024;
217 cpu_data(0).icache_size = prom_getintdefault(cpu_node, 227 cpu_data(0).icache_size = prom_getintdefault(cpu_node,
218 "icache-size", 228 "icache-size",
219 16 * 1024); 229 def);
230
231 def = 32;
220 cpu_data(0).icache_line_size = 232 cpu_data(0).icache_line_size =
221 prom_getintdefault(cpu_node, "icache-line-size", 32); 233 prom_getintdefault(cpu_node, "icache-line-size",
234 def);
235
236 def = ((tlb_type == hypervisor) ?
237 (3 * 1024 * 1024) :
238 (4 * 1024 * 1024));
222 cpu_data(0).ecache_size = prom_getintdefault(cpu_node, 239 cpu_data(0).ecache_size = prom_getintdefault(cpu_node,
223 "ecache-size", 240 "ecache-size",
224 4 * 1024 * 1024); 241 def);
242
243 def = 64;
225 cpu_data(0).ecache_line_size = 244 cpu_data(0).ecache_line_size =
226 prom_getintdefault(cpu_node, "ecache-line-size", 64); 245 prom_getintdefault(cpu_node, "ecache-line-size",
246 def);
227 printk("CPU[0]: Caches " 247 printk("CPU[0]: Caches "
228 "D[sz(%d):line_sz(%d)] " 248 "D[sz(%d):line_sz(%d)] "
229 "I[sz(%d):line_sz(%d)] " 249 "I[sz(%d):line_sz(%d)] "