From: l.stach@pengutronix.de (Lucas Stach)
To: linux-arm-kernel@lists.infradead.org
Subject: IMX53 on recent 4.4.x kernels
Date: Thu, 20 Jul 2017 17:14:00 +0200 [thread overview]
Message-ID: <1500563640.26680.12.camel@pengutronix.de> (raw)
In-Reply-To: <D24E577EA1E37B4788A3BFBC418F14A7075925A1@wetsrvex01.loepfe.com>
Am Donnerstag, den 20.07.2017, 15:06 +0000 schrieb Vellemans, Noel:
> Hi ,
[...]
>
> ====BEGIN- Test-code=======================================================================================
>
> #include <stdio.h>
> #include<stdlib.h>
> #include<string.h>
> #include<unistd.h>
> #include<fcntl.h>
> #include <time.h>
> #include <sys/times.h>
>
>
>
> #define MS_TICKTIME2 ({\
> struct timespec tp;\
> clock_gettime(4, &tp);\
> (unsigned long)tp.tv_sec*1000+tp.tv_nsec/1000000;})
clock_gettime is one of the things which get optimized into "not a
syscall at all" if your kernel provides a VDSO. Are you sure your new
kernel configuration has CONFIG_VDSO enabled?
Regards,
Lucas
>
>
> int main(int argc, char* argv[])
> {
> unsigned long mainloopcount=20000000;
> unsigned long t2,t1;
> printf("TestCode-1\n");
> printf("Going to loop %ld times.\n",mainloopcount);
> t1=MS_TICKTIME2;
> do{
> /* just do some call to the kernel .. */
> volatile unsigned long t3=MS_TICKTIME2;
> t3++; /* whatever increment this as dummy operation*/
> } while(--mainloopcount);
> t2=MS_TICKTIME2;
> printf("%ld-%ld = >%ld ms \n",t2,t1,((signed long)t2-(signed long)t1));
>
> return 0;
> }
next prev parent reply other threads:[~2017-07-20 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 6:57 IMX53 on recent 4.4.x kernels Vellemans, Noel
2017-07-20 12:39 ` Robert Schwebel
2017-07-20 13:13 ` Vellemans, Noel
2017-07-20 13:19 ` Fabio Estevam
2017-07-20 13:57 ` Vellemans, Noel
[not found] ` <20170720141528.kxrw5r4hpa2hebvd@pengutronix.de>
2017-07-20 15:06 ` Vellemans, Noel
2017-07-20 15:14 ` Lucas Stach [this message]
2017-07-20 15:24 ` Russell King - ARM Linux
2017-07-20 23:53 ` Russell King - ARM Linux
2017-07-21 16:29 ` Fabio Estevam
2017-07-21 16:34 ` Russell King - ARM Linux
2017-07-21 16:37 ` Fabio Estevam
2017-07-21 20:31 ` Vellemans, Noel
2017-08-17 6:47 ` Vellemans, Noel
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=1500563640.26680.12.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--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).