summaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/setup.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-07-12 16:15:56 -0700
committerMatt Turner <mattst88@gmail.com>2013-11-16 16:33:13 -0800
commitfddd87d6e135924b92499917bace103e46c22d00 (patch)
tree23bbe6a01a32c0ea88f7c2180dbd1f461d822c76 /arch/alpha/kernel/setup.c
parent994dcf7055df88623d25f3593b931a018a76b502 (diff)
downloadlinux-fddd87d6e135924b92499917bace103e46c22d00.tar.bz2
alpha: Allow HZ to be configured
With the 1024Hz default, we spend 50% of QEMU emulation processing timer interrupts. Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'arch/alpha/kernel/setup.c')
-rw-r--r--arch/alpha/kernel/setup.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index c38d6a1b9066..b20af76f12c1 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -1218,6 +1218,7 @@ show_cpuinfo(struct seq_file *f, void *slot)
char *systype_name;
char *sysvariation_name;
int nr_processors;
+ unsigned long timer_freq;
cpu_index = (unsigned) (cpu->type - 1);
cpu_name = "Unknown";
@@ -1229,6 +1230,12 @@ show_cpuinfo(struct seq_file *f, void *slot)
nr_processors = get_nr_processors(cpu, hwrpb->nr_processors);
+#if CONFIG_HZ == 1024 || CONFIG_HZ == 1200
+ timer_freq = (100UL * hwrpb->intr_freq) / 4096;
+#else
+ timer_freq = 100UL * CONFIG_HZ;
+#endif
+
seq_printf(f, "cpu\t\t\t: Alpha\n"
"cpu model\t\t: %s\n"
"cpu variation\t\t: %ld\n"
@@ -1254,8 +1261,7 @@ show_cpuinfo(struct seq_file *f, void *slot)
(char*)hwrpb->ssn,
est_cycle_freq ? : hwrpb->cycle_freq,
est_cycle_freq ? "est." : "",
- hwrpb->intr_freq / 4096,
- (100 * hwrpb->intr_freq / 4096) % 100,
+ timer_freq / 100, timer_freq % 100,
hwrpb->pagesize,
hwrpb->pa_bits,
hwrpb->max_asn,