linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jamienstar@163.com (Jamie Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: About the accuracy of delay loop
Date: Wed, 10 Aug 2016 15:24:56 +0800	[thread overview]
Message-ID: <20160810152456.41f6e727@JAMIE> (raw)


Hi, all.
	I have a question about the commit
	d0a533b18235d36206b9b422efadb7cee444dfdb ARM: 7452/1: delay:
allow timer-based delay implementation to be selected.

	Recently, I found the BogoMIPS info of kernel start-up log is
	not correct.The correct info is as follows:

	Calibrating delay loop... 719.25 BogoMIPS (lpj=3596288)

	But, after the patch above, the info changed as follows:

	Calibrating delay loop... 478.41 BogoMIPS (lpj=2392064)

	I find the difference from assembly code.
	Before the patch:
	  __delay(loops_per_jiffy);
             c002bcf0:       e50b3034   str r3, [fp, #-52]  ; 0x34
             c002bcf4:       e50b2030   str r2, [fp, #-48]  ; 0x30
             c002bcf8:       eb06ddd8   bl c01e3460 <__delay>

	After the patch:
          __delay(loops_per_jiffy);
             c04add08:       e5932000   ldr r2, [r3]
             c04add0c:       e50b105c   str r1, [fp, #-92]  ; 0x5c
             c04add10:       e50b3060   str r3, [fp, #-96]  ; 0x60
             c04add14:       e50bc064   str ip, [fp, #-100] ; 0x64
             c04add18:       e12fff32   blx r2

 	There are two additional instructions, and these will
 	influence calibration of delay loop. I also worry that this
 	new implementation will influence the accuracy of udelay. Does
 	any one know this problem?

             reply	other threads:[~2016-08-10  7:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10  7:24 Jamie Huang [this message]
2016-08-10  7:34 ` About the accuracy of delay loop Jisheng Zhang
2016-08-10 14:59   ` Jamie Huang
2016-08-10 15:20     ` Willy Tarreau
2016-08-10 15:43   ` Russell King - ARM Linux

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=20160810152456.41f6e727@JAMIE \
    --to=jamienstar@163.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).