mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Dmitry Nezhevenko <dion@inhex.net>
Cc: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>,
	herton@mandriva.com.br,
	Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.27-rc5 doesn't boot on a Pavilion laptop
Date: Wed, 3 Sep 2008 19:05:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.1.10.0809031857020.3243@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080903164415.GA24442@laptop.local>

On Wed, 3 Sep 2008, Dmitry Nezhevenko wrote:
> On Wed, Sep 03, 2008 at 05:15:40PM +0200, Thomas Gleixner wrote:
> > On Wed, 3 Sep 2008, Thomas Gleixner wrote:
> > > Dont think so. Your dmesg outputs do not show any sign of that
> > > disease.
> > > 
> > > Can you try the patch below please ?
> 
> I'm not original problem reporter. However I'm experiencing possible same
> problem with MSI M673 laptop. Here is link to bugzilla report (with
> dmesgs and other info):
> http://bugzilla.kernel.org/show_bug.cgi?id=11101
> 
> 2.6.27-rc4 on this machine freezes with exactly same messages:
> 
> hpet0: at MMIO 0xfed00000, IRQ 2, 8, 31
> hpet0: 3 32-bit timers, 25000000 Hz
> ACPI: RTC can wake from S4
> 
> This patch do not help me
> 
> > @@ -228,6 +228,8 @@ static void tick_do_broadcast_on_off(voi
> >  	if (!tick_device_is_functional(dev))
> >  		goto out;
> >  
> > +	bc_stoppped = cpus_empty(tick_broadcast_mask);
> 
> btw little type here, should be "bc_stopped"

Yeah, noticed already. Sorry.

Find a debug patch below, which looks at the two functions which might
loop forver under certain conditions. Does one of the checks hit ?

Thanks,

	tglx
---
 kernel/time/tick-broadcast.c |   17 +++++++++++++++--
 kernel/time/tick-oneshot.c   |   13 +++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

Index: linux-2.6/kernel/time/tick-broadcast.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-broadcast.c
+++ linux-2.6/kernel/time/tick-broadcast.c
@@ -373,14 +373,27 @@ static int tick_broadcast_set_event(ktim
 {
 	struct clock_event_device *bc = tick_broadcast_device.evtdev;
 	ktime_t now = ktime_get();
-	int res;
+	static int once = 0;
+	int res, i;
 
-	for(;;) {
+	for(i = 0; ; i++) {
 		res = clockevents_program_event(bc, expires, now);
 		if (!res || !force)
 			return res;
 		now = ktime_get();
 		expires = ktime_add(now, ktime_set(0, bc->min_delta_ns));
+		if (i++ > 4) {
+			if (!once) {
+				printk(KERN_WARNING
+				       "tick_broadcast_set_event is "
+				       "stuck %llx %llx\n",
+				       now.tv64, expires.tv64);
+				WARN_ON(1);
+			}
+			/* Enforce it */
+			now = ktime_get();
+			expires = ktime_add_ns(now, bc->min_delta_ns << i);
+		}
 	}
 }
 
Index: linux-2.6/kernel/time/tick-oneshot.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-oneshot.c
+++ linux-2.6/kernel/time/tick-oneshot.c
@@ -29,6 +29,8 @@ static int __tick_program_event(struct c
 				ktime_t expires, int force)
 {
 	ktime_t now = ktime_get();
+	static int once = 0;
+	int i = 0;
 
 	while (1) {
 		int ret = clockevents_program_event(dev, expires, now);
@@ -37,6 +39,17 @@ static int __tick_program_event(struct c
 			return ret;
 		now = ktime_get();
 		expires = ktime_add(now, ktime_set(0, dev->min_delta_ns));
+		if (i++ > 4) {
+			if (!once) {
+				printk(KERN_WARNING "__tick_program_event is "
+				       "stuck %llx %llx\n",
+				       now.tv64, expires.tv64);
+				WARN_ON(1);
+			}
+			/* Enforce it */
+			now = ktime_get();
+			expires = ktime_add_ns(now, dev->min_delta_ns << i);
+		}
 	}
 }
 

  reply	other threads:[~2008-09-03 17:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 19:35 Luiz Fernando N. Capitulino
2008-09-02 20:18 ` Thomas Gleixner
2008-09-02 20:40   ` Diego Woitasen
2008-09-03 13:38     ` Luiz Fernando N. Capitulino
2008-09-02 20:55   ` Luiz Fernando N. Capitulino
2008-09-03 10:04     ` Thomas Gleixner
2008-09-03 13:41       ` Luiz Fernando N. Capitulino
2008-09-03 14:36         ` Thomas Gleixner
2008-09-03 15:15           ` Thomas Gleixner
2008-09-03 16:40             ` Luiz Fernando N. Capitulino
2008-09-03 16:44             ` Dmitry Nezhevenko
2008-09-03 17:05               ` Thomas Gleixner [this message]
2008-09-03 17:36                 ` Luiz Fernando N. Capitulino
2008-09-03 18:40                   ` Thomas Gleixner
2008-09-03 19:01                     ` Dmitry Nezhevenko
2008-09-03 19:08                       ` Thomas Gleixner
2008-09-03 19:21                         ` Dmitry Nezhevenko
2008-09-03 19:35                           ` Thomas Gleixner
2008-09-03 19:07                     ` Luiz Fernando N. Capitulino
2008-09-03 19:10                       ` Thomas Gleixner
2008-09-03 19:36                         ` Luiz Fernando N. Capitulino
2008-09-03 17:54                 ` Dmitry Nezhevenko
2008-09-03 18:58                   ` Thomas Gleixner
2008-09-03 16:38           ` Luiz Fernando N. Capitulino

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=alpine.LFD.1.10.0809031857020.3243@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=dion@inhex.net \
    --cc=herton@mandriva.com.br \
    --cc=lcapitulino@mandriva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikhail.kshevetskiy@gmail.com \
    /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

all inboxes | Powered by JetHome®