Skip to contentSkip to conversation

2.4.23-pre2 BUG() - ACPI + sysrq power_off

DISCUSSION Krzysztof Halasa 2 participants 2 messages Sep 12, 2003

lore
Share & tools
lore
#0 lore raw

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?

Signature · 1 line
Krzysztof Halasa, B*FH
#1 lore raw
Quoted 7 lines · Krzysztof Halasa

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.

Quoted 1 line

Not checked with 2.6test yet.

yup, BUG with 2.6.0-test5.

chau,
djgera

Signature · 4 lines
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