From: "Jayachandran C" <jchandra@broadcom.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: "Jayachandran C" <jchandra@broadcom.com>
Subject: [PATCH 08/10] MIPS: Netlogic: use preset loops per jiffy
Date: Mon, 14 Jan 2013 21:42:00 +0530 [thread overview]
Message-ID: <1358179922-26663-9-git-send-email-jchandra@broadcom.com> (raw)
In-Reply-To: <1358179922-26663-1-git-send-email-jchandra@broadcom.com>
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>
---
arch/mips/netlogic/common/time.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/netlogic/common/time.c b/arch/mips/netlogic/common/time.c
index 20f89bc..5c56555 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)
{
nlm_init_pic_timer();
mips_hpt_frequency = nlm_get_cpu_frequency();
+ if (current_cpu_type() == CPU_XLR)
+ preset_lpj = mips_hpt_frequency / (3 * HZ);
+ else
+ preset_lpj = mips_hpt_frequency / (2 * HZ);
pr_info("MIPS counter frequency [%ld]\n",
(unsigned long)mips_hpt_frequency);
}
--
1.7.9.5
next prev parent reply other threads:[~2013-01-14 16:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 16:11 [PATCH 00/10] Netlogic: Fixes and updates for 3.9 Jayachandran C
2013-01-14 16:11 ` [PATCH 01/10] MIPS: Netlogic: add XLS6xx to FMN config Jayachandran C
2013-01-14 16:11 ` [PATCH 02/10] MIPS: Netlogic: Optimize EIMR/EIRR accesses in 32-bit Jayachandran C
2013-01-14 16:11 ` [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode Jayachandran C
2013-01-14 17:48 ` Sergei Shtylyov
2013-01-15 6:19 ` Jayachandran C
2013-01-15 11:58 ` Sergei Shtylyov
2013-01-15 12:16 ` Florian Fainelli
2013-01-14 16:11 ` [PATCH 04/10] MIPS: Netlogic: Split XLP L1 i-cache among threads Jayachandran C
2013-01-15 18:04 ` Ralf Baechle
2013-01-14 16:11 ` [PATCH 05/10] MIPS: Netlogic: Use PIC timer as a clocksource Jayachandran C
2013-01-14 16:11 ` [PATCH 06/10] MIPS: PCI: Prevent hang on XLP reg read Jayachandran C
2013-01-14 16:11 ` [PATCH 07/10] MIPS: Netlogic: No hazards needed for XLR/XLS Jayachandran C
2013-01-14 16:12 ` Jayachandran C [this message]
2013-01-14 16:12 ` [PATCH 09/10] MIPS: Netlogic: Fix for quad-XLP boot Jayachandran C
2013-01-14 16:12 ` [PATCH 10/10] MIPS: PCI: Multi-node PCI support for Netlogic XLP Jayachandran C
2013-01-15 6:20 ` Jayachandran C
2013-01-15 6:38 ` Jayachandran C
2013-01-15 6:38 ` [PATCH 03/10] MIPS: PCI: Byteswap not needed in little-endian mode Jayachandran C
2013-01-16 12:12 ` Jayachandran C
2013-01-16 12:12 ` [PATCH 10/10] MIPS: PCI: Multi-node PCI support for Netlogic XLP Jayachandran C
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358179922-26663-9-git-send-email-jchandra@broadcom.com \
--to=jchandra@broadcom.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox