From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com. [209.85.216.174]) by gmr-mx.google.com with ESMTPS id i4si52323ywf.6.2016.06.26.21.49.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Jun 2016 21:49:11 -0700 (PDT) Received: by mail-qt0-f174.google.com with SMTP id c34so17059240qte.0 for ; Sun, 26 Jun 2016 21:49:11 -0700 (PDT) Date: Mon, 27 Jun 2016 10:19:07 +0530 From: Pratyush Anand To: mingo@kernel.org, alexandre.belloni@free-electrons.com, Thomas Gleixner Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, prarit@redhat.com Subject: [rtc-linux] Re: [PATCH RFC 0/2] rtc-cmos: Workaround unwanted interrupt generation Message-ID: <20160627044907.GA29870@dhcppc9> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 In-Reply-To: Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 21/06/2016:10:25:34 AM, Pratyush Anand wrote: > We have observed on few machines with rtc-cmos device that > hpet_rtc_interrupt() is called before cmos_do_probe() could call > hpet_rtc_timer_init(). It has not been observed during normal boot/reboot > of machines. It *sometime* happens when system is booted with kdump > secondary kernel. So, neither hpet_default_delta nor hpet_t1_cmp is > initialized by the time interrupt is raised in the given situation. > Therefore while loop of hpet_cnt_ahead() in hpet_rtc_timer_reinit() never > completes. This leads to "NMI watchdog: Watchdog detected hard LOCKUP on > cpu 0". > > I am still clueless, how can an interrupt be raised before RTC is enabled. > But i do not have any idea about this device, so I am putting this patch as > RFC to get feedback from hpet/rtc-cmos developer. I am sure there would be > some better solution than this. Do you think that if I improve commit log of patches as pointed by Thomas and send a formal version of these patches, then they should acceptable to upstream? Thanks ~Pratyush > > > > Pratyush Anand (2): > rtc/hpet: Factorize hpet_rtc_timer_init() > rtc/rtc-cmos: Initialize software counters before irq is registered > > arch/x86/include/asm/hpet.h | 2 ++ > arch/x86/kernel/hpet.c | 41 +++++++++++++++++++++++++++++++++++------ > drivers/rtc/rtc-cmos.c | 13 ++++++++++++- > 3 files changed, 49 insertions(+), 7 deletions(-) > > -- > 2.5.5 -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbcF0EzZ (ORCPT ); Mon, 27 Jun 2016 00:55:25 -0400 Received: from mail-qt0-f173.google.com ([209.85.216.173]:35253 "EHLO mail-qt0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbcF0EzY (ORCPT ); Mon, 27 Jun 2016 00:55:24 -0400 X-Greylist: delayed 372 seconds by postgrey-1.27 at vger.kernel.org; Mon, 27 Jun 2016 00:55:24 EDT Date: Mon, 27 Jun 2016 10:19:07 +0530 From: Pratyush Anand To: mingo@kernel.org, alexandre.belloni@free-electrons.com, Thomas Gleixner Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, prarit@redhat.com Subject: Re: [PATCH RFC 0/2] rtc-cmos: Workaround unwanted interrupt generation Message-ID: <20160627044907.GA29870@dhcppc9> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/06/2016:10:25:34 AM, Pratyush Anand wrote: > We have observed on few machines with rtc-cmos device that > hpet_rtc_interrupt() is called before cmos_do_probe() could call > hpet_rtc_timer_init(). It has not been observed during normal boot/reboot > of machines. It *sometime* happens when system is booted with kdump > secondary kernel. So, neither hpet_default_delta nor hpet_t1_cmp is > initialized by the time interrupt is raised in the given situation. > Therefore while loop of hpet_cnt_ahead() in hpet_rtc_timer_reinit() never > completes. This leads to "NMI watchdog: Watchdog detected hard LOCKUP on > cpu 0". > > I am still clueless, how can an interrupt be raised before RTC is enabled. > But i do not have any idea about this device, so I am putting this patch as > RFC to get feedback from hpet/rtc-cmos developer. I am sure there would be > some better solution than this. Do you think that if I improve commit log of patches as pointed by Thomas and send a formal version of these patches, then they should acceptable to upstream? Thanks ~Pratyush > > > > Pratyush Anand (2): > rtc/hpet: Factorize hpet_rtc_timer_init() > rtc/rtc-cmos: Initialize software counters before irq is registered > > arch/x86/include/asm/hpet.h | 2 ++ > arch/x86/kernel/hpet.c | 41 +++++++++++++++++++++++++++++++++++------ > drivers/rtc/rtc-cmos.c | 13 ++++++++++++- > 3 files changed, 49 insertions(+), 7 deletions(-) > > -- > 2.5.5