2003-09-12 09:59:17

by Krzysztof Halasa

[permalink] [raw]
Subject: 2.4.23-pre2 BUG() - ACPI + sysrq power_off

Hi,

With 2.4.23-pre2 (and with some older kernels as well) I get BUG()
after pressing sysrq+Off (power off) with ACPI.

kernel/pm.c (line 159):

int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data)
{
int status = 0;
int prev_state, next_state;

if (in_interrupt())
BUG(); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

switch (rqst) {
case PM_SUSPEND:
case PM_RESUME:
prev_state = dev->state;
next_state = (unsigned long) data;
if (prev_state != next_state) {
if (dev->callback)
status = (*dev->callback)(dev, rqst, data);
if (!status) {
dev->state = next_state;
dev->prev_state = prev_state;
}
}
else {
dev->prev_state = prev_state;
}
break;
default:
if (dev->callback)
status = (*dev->callback)(dev, rqst, data);
break;
}
return status;
}

It seems sysrq-O routine (acpi_sysrq_power_off() -> acpi_power_off() ->
acpi_suspend(ACPI_STATE_S5)) calls pm_send() from keyboard interrupt,
which isn't exactly what pm_send() like.

Details available on request, if needed.
Not checked with 2.6test yet.


Another thing: on my notebook, /sbin/poweroff doesn't power the machine
off with 2.4 (it worked with older 2.4 kernels). echo 5 > /proc/acpi/sleep
does the job. Any ideas?
--
Krzysztof Halasa, B*FH


2003-09-12 10:35:49

by Gerardo Exequiel Pozzi

[permalink] [raw]
Subject: Re: 2.4.23-pre2 BUG() - ACPI + sysrq power_off

On 12 Sep 2003 11:47:05 +0200, Krzysztof Halasa wrote:
>Hi,
>
>With 2.4.23-pre2 (and with some older kernels as well) I get BUG()
>after pressing sysrq+Off (power off) with ACPI.
>
>kernel/pm.c (line 159):
>

I cheked and i have the same problem with 2.4.22-ac2.

>Not checked with 2.6test yet.

yup, BUG with 2.6.0-test5.

chau,
djgera


--
Gerardo Exequiel Pozzi ( djgera )
http://www.vmlinuz.com.ar http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D