Re: 2.6.27-rc5 doesn't boot on a Pavilion laptop

From: Thomas Gleixner
Date: Wed Sep 03 2008 - 13:06:20 EST


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);
+ }
}
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/