From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758268AbbJWBlh (ORCPT ); Thu, 22 Oct 2015 21:41:37 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:55449 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757427AbbJWBlf (ORCPT ); Thu, 22 Oct 2015 21:41:35 -0400 Message-ID: <5629904A.2070400@imgtec.com> Date: Thu, 22 Oct 2015 18:41:30 -0700 From: Leonid Yegoshin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Markos Chandras , CC: Alex Smith , Subject: Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime() References: <1445417864-31453-1-git-send-email-markos.chandras@imgtec.com> In-Reply-To: <1445417864-31453-1-git-send-email-markos.chandras@imgtec.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.20.3.92] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You can not use R4K CP0_count in SMP (multicore) without core-specific adjustment. After first power-saving with core clock off or core down the values in CP0_count in different cores are absolutely different. Until you include in system a patch like http://patchwork.linux-mips.org/patch/10871/ "MIPS: Setup an instruction emulation in VDSO protected page instead of user stack" which creates a per-thread memory and put into that memory an adjustment value (which can be changed during re-schedule to another core), the use of R4K counter is incorrect in SMP environment. Note: It is also possible to setup and maintain a per-core page with that value too as an alternative variant for adjustment.