Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S945208AbcJaRvv (ORCPT ); Mon, 31 Oct 2016 13:51:51 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:53934 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S945190AbcJaRvu (ORCPT ); Mon, 31 Oct 2016 13:51:50 -0400 Subject: Re: [PATCH v2 3/3] clocksource: Add clockevent support to NPS400 driver To: Noam Camus , Daniel Lezcano References: <1477224748-25223-1-git-send-email-noamca@mellanox.com> <1477224748-25223-4-git-send-email-noamca@mellanox.com> <20161031105251.GD1506@mai> CC: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "tglx@linutronix.de" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Vineet Gupta Message-ID: <35bde193-8492-83e0-fb03-8385d8afd007@synopsys.com> Date: Mon, 31 Oct 2016 10:51:40 -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: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.40] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1365 Lines: 28 Hi Daniel, On 10/31/2016 10:03 AM, Noam Camus wrote: >> Oops, wait. Here, arch/arc/kernel/time.c should be moved in drivers/clocksource and consolidated with this driver. >> >Very likely, CPUHP_AP_ARC_TIMER_STARTING can be used for all ARC timers. > Indeed the ARC timer driver served as my inspiration but due to HW threads handling they are not the same. > Moving drivers from arch/arc to driver/clocksource is not my call (Vineet Gupta is the maintainer of ARC) > And I think they quiet differ now so consolidation gain is not obvious. Sorry this was on my todo list at low priority. Anyways took a quick look at it now. The problem is timer code overlaps pure driver land and ARC specific code. e.g. CONFIG_ARC_HAS_RTC clocksource needs to check whether hardware exists or not. We currently conveniently check that from cpuinfo populated at boot time. Now either I need to export that info as a function (which should be done anyways) - but then define stub for !ARC. Either that or duplicate the detection code here (orig copy in arc setup.c) So doing this exercise cleanly would mean exporting much of arch/arc/include/asm/{arcregs.h, mcip.h} out of ARC into include/soc/arc/*. Isn't this kind of going back to include/asm-/* days ? Honestly I do want to move the driver in the right place but not sure how to do this cleanly. Thoughts ? -Vineet