diff options
Diffstat (limited to 'arch/alpha/kernel/setup.c')
| -rw-r--r-- | arch/alpha/kernel/setup.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index 9e3107cc5ebb..b20af76f12c1 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
| @@ -115,10 +115,17 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE; | |||
| 115 | 115 | ||
| 116 | #ifdef CONFIG_ALPHA_GENERIC | 116 | #ifdef CONFIG_ALPHA_GENERIC |
| 117 | struct alpha_machine_vector alpha_mv; | 117 | struct alpha_machine_vector alpha_mv; |
| 118 | #endif | ||
| 119 | |||
| 120 | #ifndef alpha_using_srm | ||
| 118 | int alpha_using_srm; | 121 | int alpha_using_srm; |
| 119 | EXPORT_SYMBOL(alpha_using_srm); | 122 | EXPORT_SYMBOL(alpha_using_srm); |
| 120 | #endif | 123 | #endif |
| 121 | 124 | ||
| 125 | #ifndef alpha_using_qemu | ||
| 126 | int alpha_using_qemu; | ||
| 127 | #endif | ||
| 128 | |||
| 122 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, | 129 | static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, |
| 123 | unsigned long); | 130 | unsigned long); |
| 124 | static struct alpha_machine_vector *get_sysvec_byname(const char *); | 131 | static struct alpha_machine_vector *get_sysvec_byname(const char *); |
| @@ -529,11 +536,15 @@ setup_arch(char **cmdline_p) | |||
| 529 | atomic_notifier_chain_register(&panic_notifier_list, | 536 | atomic_notifier_chain_register(&panic_notifier_list, |
| 530 | &alpha_panic_block); | 537 | &alpha_panic_block); |
| 531 | 538 | ||
| 532 | #ifdef CONFIG_ALPHA_GENERIC | 539 | #ifndef alpha_using_srm |
| 533 | /* Assume that we've booted from SRM if we haven't booted from MILO. | 540 | /* Assume that we've booted from SRM if we haven't booted from MILO. |
| 534 | Detect the later by looking for "MILO" in the system serial nr. */ | 541 | Detect the later by looking for "MILO" in the system serial nr. */ |
| 535 | alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; | 542 | alpha_using_srm = strncmp((const char *)hwrpb->ssn, "MILO", 4) != 0; |
| 536 | #endif | 543 | #endif |
| 544 | #ifndef alpha_using_qemu | ||
| 545 | /* Similarly, look for QEMU. */ | ||
| 546 | alpha_using_qemu = strstr((const char *)hwrpb->ssn, "QEMU") != 0; | ||
| 547 | #endif | ||
| 537 | 548 | ||
| 538 | /* If we are using SRM, we want to allow callbacks | 549 | /* If we are using SRM, we want to allow callbacks |
| 539 | as early as possible, so do this NOW, and then | 550 | as early as possible, so do this NOW, and then |
| @@ -1207,6 +1218,7 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1207 | char *systype_name; | 1218 | char *systype_name; |
| 1208 | char *sysvariation_name; | 1219 | char *sysvariation_name; |
| 1209 | int nr_processors; | 1220 | int nr_processors; |
| 1221 | unsigned long timer_freq; | ||
| 1210 | 1222 | ||
| 1211 | cpu_index = (unsigned) (cpu->type - 1); | 1223 | cpu_index = (unsigned) (cpu->type - 1); |
| 1212 | cpu_name = "Unknown"; | 1224 | cpu_name = "Unknown"; |
| @@ -1218,6 +1230,12 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1218 | 1230 | ||
| 1219 | nr_processors = get_nr_processors(cpu, hwrpb->nr_processors); | 1231 | nr_processors = get_nr_processors(cpu, hwrpb->nr_processors); |
| 1220 | 1232 | ||
| 1233 | #if CONFIG_HZ == 1024 || CONFIG_HZ == 1200 | ||
| 1234 | timer_freq = (100UL * hwrpb->intr_freq) / 4096; | ||
| 1235 | #else | ||
| 1236 | timer_freq = 100UL * CONFIG_HZ; | ||
| 1237 | #endif | ||
| 1238 | |||
| 1221 | seq_printf(f, "cpu\t\t\t: Alpha\n" | 1239 | seq_printf(f, "cpu\t\t\t: Alpha\n" |
| 1222 | "cpu model\t\t: %s\n" | 1240 | "cpu model\t\t: %s\n" |
| 1223 | "cpu variation\t\t: %ld\n" | 1241 | "cpu variation\t\t: %ld\n" |
| @@ -1243,8 +1261,7 @@ show_cpuinfo(struct seq_file *f, void *slot) | |||
| 1243 | (char*)hwrpb->ssn, | 1261 | (char*)hwrpb->ssn, |
| 1244 | est_cycle_freq ? : hwrpb->cycle_freq, | 1262 | est_cycle_freq ? : hwrpb->cycle_freq, |
| 1245 | est_cycle_freq ? "est." : "", | 1263 | est_cycle_freq ? "est." : "", |
| 1246 | hwrpb->intr_freq / 4096, | 1264 | timer_freq / 100, timer_freq % 100, |
| 1247 | (100 * hwrpb->intr_freq / 4096) % 100, | ||
| 1248 | hwrpb->pagesize, | 1265 | hwrpb->pagesize, |
| 1249 | hwrpb->pa_bits, | 1266 | hwrpb->pa_bits, |
| 1250 | hwrpb->max_asn, | 1267 | hwrpb->max_asn, |
