From mboxrd@z Thu Jan 1 00:00:00 1970 From: l.stach@pengutronix.de (Lucas Stach) Date: Thu, 20 Jul 2017 17:14:00 +0200 Subject: IMX53 on recent 4.4.x kernels In-Reply-To: References: <20170720123933.rioxhsthaaby4cnl@pengutronix.de> <20170720141528.kxrw5r4hpa2hebvd@pengutronix.de> Message-ID: <1500563640.26680.12.camel@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Am Donnerstag, den 20.07.2017, 15:06 +0000 schrieb Vellemans, Noel: > Hi , [...] > > ====BEGIN- Test-code======================================================================================= > > #include > #include > #include > #include > #include > #include > #include > > > > #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; > }