Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075AbcKAU5S (ORCPT ); Tue, 1 Nov 2016 16:57:18 -0400 Received: from smtprelay4.synopsys.com ([198.182.47.9]:47445 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752897AbcKAU5R (ORCPT ); Tue, 1 Nov 2016 16:57:17 -0400 Subject: Re: [PATCH 9/9] clocksource: import ARC timer driver To: Daniel Lezcano References: <35bde193-8492-83e0-fb03-8385d8afd007@synopsys.com> <1477954096-770-1-git-send-email-vgupta@synopsys.com> <1477954096-770-10-git-send-email-vgupta@synopsys.com> <20161101204257.GG1506@mai> CC: , , , Noam Camus , Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc From: Vineet Gupta Message-ID: <188a2912-3369-19a3-86af-cbb154ff7e44@synopsys.com> Date: Tue, 1 Nov 2016 13:57:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161101204257.GG1506@mai> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.43] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1633 Lines: 43 Hi Daniel, On 11/01/2016 01:42 PM, Daniel Lezcano wrote: > Please stay consistent with the rest of the Kconfig. > > config ARC_TIMER_RTC > bool "64-bit cycle counter in HS38 cores" if COMPILE_TEST > select CLKSRC_OF > help > This counter provides 64-bit resolution vs. the 32-bit TIMER1. > It is implemented inside the core thus can't be used in SMP systems. > > config ARC_TIMER_GFRC > bool "64-bit cycle counter in ARConnect block in HS38x cores" if COMPILE_TEST > select CLKSRC_OF > help > This counter can be used as clocksource in SMP HS38 SoCs. > It sits outside the core thus can be used in SMP systems > Yes I did so already :-) Although I also added a default y if ARC to both, but as you say that is better done in ARC Kconfig. > Then in the ARC's Kconfig you select ARC_TIMER_RTC or ARC_TIMER_GFRC depending > it is SMP or not. > > One question: > > Why ARC_TIMER_RTC can't be used in a SMP system ? Doesn't have each core its > own clocksource ? It seems you are assuming a clocksource can be used on SMP > only if the clocksource is unique and shared across the cores. Thats what I thought so far. Thing is, the individual core's counters could get out of sync, simply because non masters cores were halted to begin with and came up at different points in real time. so a gtod might return different value depending on what core it landed on. Does clocksource also does ticks broadcasts and such to keep things in sync ? Because of the git mv you, diff didn't include bulk of driver code which would make for bulk of review anyways. So perhaps in v2 I don't do the git mv. OK ? Thx, -Vineet