From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbdBZOm2 (ORCPT ); Sun, 26 Feb 2017 09:42:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:47483 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752203AbdBZOmY (ORCPT ); Sun, 26 Feb 2017 09:42:24 -0500 Subject: Re: [PATCH v2 04/17] clocksource: Add Owl timer To: Daniel Lezcano References: <20170224034055.18807-1-afaerber@suse.de> <20170224034055.18807-5-afaerber@suse.de> <20170224222921.GA23152@mai> <20170225215941.GA30601@mai> Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org, mp-cs@actions-semi.com, 96boards@ucrobotics.com, support@lemaker.org, linux-kernel@vger.kernel.org, Thomas Gleixner From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Organization: SUSE Linux GmbH Message-ID: Date: Sun, 26 Feb 2017 15:40:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170225215941.GA30601@mai> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 25.02.2017 um 22:59 schrieb Daniel Lezcano: > On Sat, Feb 25, 2017 at 12:25:32AM +0100, Andreas Färber wrote: >> Am 24.02.2017 um 23:29 schrieb Daniel Lezcano: >>> On Fri, Feb 24, 2017 at 04:40:42AM +0100, Andreas Färber wrote: >>>> +static struct clock_event_device owl_clockevent = { >>>> + .name = "owl_tick", >>>> + .rating = 200, >>>> + .features = CLOCK_EVT_FEAT_ONESHOT, >>> >>> Did you consider adding CLOCK_EVT_FEAT_DYNIRQ ? >> >> No, it was not present downstream. Got a good example? > > https://lwn.net/Articles/541000/ Looking at your current Nomadik code, it seems I can literally should just add this flag (done), without needing to implement any new hooks. On a related topic, how do we determine the cpumask? Downstream and some in-tree drivers use cpumask_of(0), others use cpu_possible_mask. >> Do you spot anything functionally wrong in this driver? Despite adding >> this new driver, I am only getting the following additional earlycon output: >> >> [ 0.000029] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps >> every 89478484971ns >> [ 0.007888] clocksource: timer: mask: 0xffffffff max_cycles: >> 0xffffffff, max_idle_ns: 79635851949 ns >> [ 0.017748] Console: colour dummy device 80x30 >> [ 0.022243] Calibrating delay loop... >> [ 0.030895] random: fast init done >> [ 0.231021] random: crng init done >> >> For S900 I'm using the generic timer instead. > > I don't get the issue, can you elaborate ? Found it myself: I forgot to clear the interrupt pending bit in the interrupt handler routine. + writel(OWL_Tx_CTL_PD, owl_timer_base + OWL_T1_CTL); Now it goes past this point, initializes the real serial driver and boots up to not finding the rootfs: [ 0.000032] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.007898] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.017886] Console: colour dummy device 80x30 [ 0.022386] Calibrating delay loop... 405.50 BogoMIPS (lpj=2027520) [ 0.083523] pid_max: default: 32768 minimum: 301 ... Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) From mboxrd@z Thu Jan 1 00:00:00 1970 From: afaerber@suse.de (=?UTF-8?Q?Andreas_F=c3=a4rber?=) Date: Sun, 26 Feb 2017 15:40:49 +0100 Subject: [PATCH v2 04/17] clocksource: Add Owl timer In-Reply-To: <20170225215941.GA30601@mai> References: <20170224034055.18807-1-afaerber@suse.de> <20170224034055.18807-5-afaerber@suse.de> <20170224222921.GA23152@mai> <20170225215941.GA30601@mai> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Am 25.02.2017 um 22:59 schrieb Daniel Lezcano: > On Sat, Feb 25, 2017 at 12:25:32AM +0100, Andreas F?rber wrote: >> Am 24.02.2017 um 23:29 schrieb Daniel Lezcano: >>> On Fri, Feb 24, 2017 at 04:40:42AM +0100, Andreas F?rber wrote: >>>> +static struct clock_event_device owl_clockevent = { >>>> + .name = "owl_tick", >>>> + .rating = 200, >>>> + .features = CLOCK_EVT_FEAT_ONESHOT, >>> >>> Did you consider adding CLOCK_EVT_FEAT_DYNIRQ ? >> >> No, it was not present downstream. Got a good example? > > https://lwn.net/Articles/541000/ Looking at your current Nomadik code, it seems I can literally should just add this flag (done), without needing to implement any new hooks. On a related topic, how do we determine the cpumask? Downstream and some in-tree drivers use cpumask_of(0), others use cpu_possible_mask. >> Do you spot anything functionally wrong in this driver? Despite adding >> this new driver, I am only getting the following additional earlycon output: >> >> [ 0.000029] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps >> every 89478484971ns >> [ 0.007888] clocksource: timer: mask: 0xffffffff max_cycles: >> 0xffffffff, max_idle_ns: 79635851949 ns >> [ 0.017748] Console: colour dummy device 80x30 >> [ 0.022243] Calibrating delay loop... >> [ 0.030895] random: fast init done >> [ 0.231021] random: crng init done >> >> For S900 I'm using the generic timer instead. > > I don't get the issue, can you elaborate ? Found it myself: I forgot to clear the interrupt pending bit in the interrupt handler routine. + writel(OWL_Tx_CTL_PD, owl_timer_base + OWL_T1_CTL); Now it goes past this point, initializes the real serial driver and boots up to not finding the rootfs: [ 0.000032] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.007898] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.017886] Console: colour dummy device 80x30 [ 0.022386] Calibrating delay loop... 405.50 BogoMIPS (lpj=2027520) [ 0.083523] pid_max: default: 32768 minimum: 301 ... Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)