public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pratyush Anand <panand@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: mingo@kernel.org, alexandre.belloni@free-electrons.com,
	hpa@zytor.com, x86@kernel.org, rtc-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, prarit@redhat.com,
	dzickus@redhat.com, dyoung@redhat.com, a.zummo@towertech.it
Subject: Re: [PATCH V3 2/2] rtc/rtc-cmos: Initialize software counters before irq is registered
Date: Tue, 6 Sep 2016 16:10:11 +0530	[thread overview]
Message-ID: <20160906104011.GE24688@localhost.localdomain> (raw)
In-Reply-To: <alpine.DEB.2.20.1609061155390.5647@nanos>

Hi Thomas,

On 06/09/2016:11:58:08 AM, Thomas Gleixner wrote:
> On Tue, 16 Aug 2016, Pratyush Anand wrote:
> 
> That's a lot of churn to fix that simple problem. The two liner below
> should fix that as well, right?

Thanks a lot for your reply.

Yes, that should fix. I was n't sure if "setting HPET_TN_ENABLE before IRQ is
registered" would be a right step.
I can give it a try, however it is pretty obvious that these two liners should
be able to solve the issue. So, if this solution will not have any side effect
then, it is fine for me as well.

~Pratyush

> 
> Thanks,
> 
> 	tglx
> 
> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> index 43745cac0141..cb8dfc3ee012 100644
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -707,6 +707,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
>  		goto cleanup1;
>  	}
>  
> +	hpet_rtc_timer_init();
>  	if (is_valid_irq(rtc_irq)) {
>  		irq_handler_t rtc_cmos_int_handler;
>  
> @@ -714,6 +715,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
>  			rtc_cmos_int_handler = hpet_rtc_interrupt;
>  			retval = hpet_register_irq_handler(cmos_interrupt);
>  			if (retval) {
> +				hpet_mask_rtc_irq_bit(RTC_IRQMASK);
>  				dev_warn(dev, "hpet_register_irq_handler "
>  						" failed in rtc_init().");
>  				goto cleanup1;
> @@ -729,7 +731,6 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
>  			goto cleanup1;
>  		}
>  	}
> -	hpet_rtc_timer_init();
>  
>  	/* export at least the first block of NVRAM */
>  	nvram.size = address_space - NVRAM_OFFSET;
> 

      reply	other threads:[~2016-09-06 10:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16  3:25 [PATCH V3 0/2] rtc-cmos: Workaround unwanted interrupt generation Pratyush Anand
2016-08-16  3:25 ` [PATCH V3 1/2] rtc/hpet: Factorize hpet_rtc_timer_init() Pratyush Anand
2016-08-16  3:25 ` [PATCH V3 2/2] rtc/rtc-cmos: Initialize software counters before irq is registered Pratyush Anand
2016-08-30  8:22   ` Dave Young
2016-08-30  8:38     ` Dave Young
2016-08-30  9:10       ` Dave Young
2016-08-30  9:54     ` Pratyush Anand
2016-08-31  4:56       ` Dave Young
2016-08-31  6:44         ` Alexandre Belloni
2016-09-06  9:58   ` Thomas Gleixner
2016-09-06 10:40     ` Pratyush Anand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160906104011.GE24688@localhost.localdomain \
    --to=panand@redhat.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=dyoung@redhat.com \
    --cc=dzickus@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=prarit@redhat.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox