aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/common
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-01-14 10:12:00 -0500
committerJohn Crispin <blogic@openwrt.org>2013-02-16 18:15:21 -0500
commit37a7059bc4228613867645be50120aff17a162a1 (patch)
tree2079e8eeecc7947dd804fbe520326dfa72d4ce99 /arch/mips/netlogic/common
parent5a4cbe381122e41749cadf24d59cd63ed84f41c0 (diff)
MIPS: Netlogic: use preset loops per jiffy
Doing calibrate delay on a hardware thread will be inaccurate since it depends on the load on other threads in the core. It will also slow down the boot process when done for 128 hardware threads. Switch to a pre-computed loops per jiffy based on the core frequency. The value is computed based on the core frequency and roughly matches the value calculated by calibrate_delay(). Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/4791/ Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/netlogic/common')
-rw-r--r--arch/mips/netlogic/common/time.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/netlogic/common/time.c b/arch/mips/netlogic/common/time.c
index 20f89bc0507f..5c56555380bb 100644
--- a/arch/mips/netlogic/common/time.c
+++ b/arch/mips/netlogic/common/time.c
@@ -98,6 +98,10 @@ void __init plat_time_init(void)
98{ 98{
99 nlm_init_pic_timer(); 99 nlm_init_pic_timer();
100 mips_hpt_frequency = nlm_get_cpu_frequency(); 100 mips_hpt_frequency = nlm_get_cpu_frequency();
101 if (current_cpu_type() == CPU_XLR)
102 preset_lpj = mips_hpt_frequency / (3 * HZ);
103 else
104 preset_lpj = mips_hpt_frequency / (2 * HZ);
101 pr_info("MIPS counter frequency [%ld]\n", 105 pr_info("MIPS counter frequency [%ld]\n",
102 (unsigned long)mips_hpt_frequency); 106 (unsigned long)mips_hpt_frequency);
103} 107}