Messages in this thread | | | Subject | Re: [PATCH v2 3/3] clocksource: Add clockevent support to NPS400 driver | From | Vineet Gupta <> | Date | Mon, 31 Oct 2016 10:51:40 -0700 |
| |
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-<arch>/* days ?
Honestly I do want to move the driver in the right place but not sure how to do this cleanly.
Thoughts ?
-Vineet
| |