From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757128AbbGGLZ4 (ORCPT ); Tue, 7 Jul 2015 07:25:56 -0400 Received: from foss.arm.com ([217.140.101.70]:35160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757044AbbGGLZr (ORCPT ); Tue, 7 Jul 2015 07:25:47 -0400 Message-ID: <559BB736.4000103@arm.com> Date: Tue, 07 Jul 2015 12:25:42 +0100 From: Sudeep Holla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Thomas Gleixner CC: Sudeep Holla , LKML , Ingo Molnar , Peter Zijlstra , Preeti U Murthy , Suzuki Poulose , Lorenzo Pieralisi , Catalin Marinas , "Rafael J. Wysocki" Subject: Re: [patch 1/2] tick/broadcast: Prevent deep idle states if no broadcast device available References: <20150705205032.103910828@linutronix.de> <20150705205221.724282507@linutronix.de> <559A9A2B.2030705@arm.com> <559AA256.5040305@arm.com> <559AAC73.6010105@arm.com> <559AC1A5.901@arm.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 07/07/15 08:31, Thomas Gleixner wrote: > On Mon, 6 Jul 2015, Thomas Gleixner wrote: > >> On Mon, 6 Jul 2015, Sudeep Holla wrote: >>> This triggered the below crash on boot, looks like it's accessing >>> hrtimer->function which is null in periodic mode IIUC >>> >>> Regards, >>> Sudeep >> >> Gah. I have no idea how that gets queued. /me goes off to tweak x86 to >> emulate that crap. > > So with a less heat damaged brain, I think I was able to decode the > twisted logic behind all this. > > Can you test the patch below please? > Yes I tested this patch for all the combinations I had mentioned in my earlier email. Everything works as expected. Thanks a lot for the patience. Please feel free to add: Tested-by: Sudeep Holla > { > Index: tip/kernel/time/tick-broadcast.c > =================================================================== > --- tip.orig/kernel/time/tick-broadcast.c > +++ tip/kernel/time/tick-broadcast.c > @@ -938,6 +972,16 @@ bool tick_broadcast_oneshot_available(vo > return bc ? bc->features & CLOCK_EVT_FEAT_ONESHOT : false; > } > > +#else > +int __tick_broadcast_oneshot_control(enum tick_broadcast_state state) > +{ > + struct clock_event_device *bc = tick_broadcast_device.evtdev; > + > + if (!bc || (bc->features & CLOCK_EVT_FEAT_HRTIMER) missing ')' at the end in the above statement Regards, Sudeep