mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: georgn@somanetworks.com, linux-kernel@vger.kernel.org
Subject: Re: Dell I8000, 2.4.8-ac5 and APM
Date: Thu, 16 Aug 2001 22:56:46 +0200 (MET DST)	[thread overview]
Message-ID: <200108162056.WAA18756@harpo.it.uu.se> (raw)

On 15 Aug 2001 15:57:22 -0400, Georg Nikodym wrote:

>> On my Dell I8000, when running 2.48-ac5 pulling the AC plug out (or
>> plugging it back) causes the box to hang for a while prior to shutting
>> itself off.
>> 
>> I first reported this in 2.4.5-ac13 but didn't have the time to poke
>> around.
>
>Looking at apm.c, there's not enough difference to account for this
>regression so I started looking more broadly.  I found that in the -ac
>tree there's a bunch of power management code that's been added to
>arch/i386/kernel/apic.c (by Mikael Petterson).

The PM code in apic.c is _required_ if you want power management to
work at all with a local APIC enabled kernel.
The problem is that on most UP boxes, the BIOS boots the OS with the
local APIC disabled, and it expects the local APIC to stay disabled,
especially at suspend when the BIOS SMM is activated. Failure of the
OS to disable the local APIC before suspend can cause the machine to
hang hard. The PM code in apic.c and nmi.c is there to prevent this.

Concerning your problem with pulling the AC plug on your Dell I8000,
my suspicion is that either (a) the BIOS isn't notifying apm.c of the
event, or (b) apm.c fails to propagate the event to its PM clients.

(Case (b) is known to cause problems for "apm --standby" since apm.c
[for whatever reason] doesn't propagate STANDBY events to PM clients.
See the "2.4.5-ac8 hardlocks when going to standby" thread from early
June this year.)

>Disabling APIC solves my immediate problem, so personally I'm happy.
>
>Obviously, that not The Right Thing (tm) so Mikael, if you want a
>debugging guinea pig, feel free to contact me.

Try the patch below and configure with CONFIG_X86_UP_APIC disabled.
Reboot. Pull the AC plug. What debug output did apm.c dump in the
kernel log? If it said something about send_event() ignoring some
event, then that's a prime suspect.

/Mikael

--- linux-2.4.8-ac5/arch/i386/kernel/apm.c.~1~	Thu Aug 16 21:32:36 2001
+++ linux-2.4.8-ac5/arch/i386/kernel/apm.c	Thu Aug 16 21:58:40 2001
@@ -347,7 +347,7 @@
 static long			clock_cmos_diff;
 static int			got_clock_diff;
 #endif
-static int			debug;
+static int			debug = 1;
 static int			apm_disabled = -1;
 #ifdef CONFIG_SMP
 static int			power_off;
@@ -947,6 +947,13 @@
 		/* map all resumes to ACPI D0 */
 		(void) pm_send_all(PM_RESUME, (void *)0);
 		break;
+	default:
+		if (debug)
+			printk(KERN_DEBUG "apm: send_event() ignored event 0x%02x (%s)\n",
+			       event,
+			       (event > NR_APM_EVENT_NAME)
+			       ? "unknown"
+			       : apm_event_name[event - 1]);
 	}
 
 	return 1;

             reply	other threads:[~2001-08-16 20:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-16 20:56 Mikael Pettersson [this message]
2001-08-16 21:30 ` Georg Nikodym
2001-08-17 10:14 ` David Woodhouse
2001-08-20 10:21 ` Mikael Pettersson
  -- strict thread matches above, loose matches on Subject: below --
2001-08-15 18:55 Georg Nikodym
2001-08-15 19:57 ` Georg Nikodym
2001-08-15 21:09 ` David Woodhouse
2001-08-15 21:29   ` arjan
2001-08-15 21:42   ` David Woodhouse
2001-08-15 21:57     ` Andrew Morton
2001-08-15 22:07       ` arjan
2001-08-15 23:04       ` Wichert Akkerman
2001-08-15 23:23         ` Alex Romosan
2001-08-15 21:31 ` Georg Nikodym

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=200108162056.WAA18756@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=georgn@somanetworks.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®