* 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context
@ 2003-04-06 22:30 Felipe Alfaro Solana
2003-04-06 22:48 ` Zwane Mwaikambo
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Alfaro Solana @ 2003-04-06 22:30 UTC (permalink / raw)
To: LKML
Hi,
I'm seeing this oops on my P4 box running 2.5.66-bk12 + ACPI when
shutting it down (copied by hand):
Power down.
acpi_power_off called
Debug: sleeping function called from illegal context at
include/asm/semaphore.h: 119
Call Trace:
[<c012088a>] __might_sleep+0x5f/0x75
[<c01ffb10>] acpi_os_wait_semaphore+0xc5/0xea
[<c021440c>] acpi_ut_acquire_mutex+0x51/0x73
[<c020ab4f>] acpi_set_register+0x34/0x15d
[<c020b1f6>] acpi_enter_sleep_state+0x77/0x1ab
[<c0215d7d>] acpi_power_off+0x21/0x23
[<c011a3e5>] machine_power_off+0x10/0x13
[<c0135f7b>] sys_reboot+0x332/0x741
[<c011e010>] schedule+0x210/0x6d7
[<c0130daf>] group_send_sig_info+0x2af/0x6b6
[<c011e50d>] preempt_schedule+0x36/0x50
[<c0131384>] kill_proc_info+0x60/0x62
[<c0134346>] sys_kill+0x4d/0x51
[<c016e76b>] __fput+0xaf/0xfb
[<c016cabc>] filp_close+0x160/0x226
[<c01850cb>] sys_ioctl+0x197/0x3e8
[<c010af29>] sysenter_past_esp+0x52/0x71
This is not 100% reproducible. When using ACPI, the machine is *never*
able to properly shut it off (only APM is able to turn the machine off).
________________________________________________________________________
Linux Registered User #287198
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context
2003-04-06 22:30 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context Felipe Alfaro Solana
@ 2003-04-06 22:48 ` Zwane Mwaikambo
2003-04-07 1:21 ` Andrew Morton
2003-04-07 9:29 ` Felipe Alfaro Solana
0 siblings, 2 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2003-04-06 22:48 UTC (permalink / raw)
To: Felipe Alfaro Solana; +Cc: LKML, Andy Grover
On Sun, 7 Apr 2003, Felipe Alfaro Solana wrote:
> Power down.
> acpi_power_off called
> Debug: sleeping function called from illegal context at
> include/asm/semaphore.h: 119
> Call Trace:
> [<c012088a>] __might_sleep+0x5f/0x75
> [<c01ffb10>] acpi_os_wait_semaphore+0xc5/0xea
> [<c021440c>] acpi_ut_acquire_mutex+0x51/0x73
> [<c020ab4f>] acpi_set_register+0x34/0x15d
> [<c020b1f6>] acpi_enter_sleep_state+0x77/0x1ab
> [<c0215d7d>] acpi_power_off+0x21/0x23
> [<c011a3e5>] machine_power_off+0x10/0x13
> [<c0135f7b>] sys_reboot+0x332/0x741
> [<c011e010>] schedule+0x210/0x6d7
> [<c0130daf>] group_send_sig_info+0x2af/0x6b6
> [<c011e50d>] preempt_schedule+0x36/0x50
> [<c0131384>] kill_proc_info+0x60/0x62
> [<c0134346>] sys_kill+0x4d/0x51
> [<c016e76b>] __fput+0xaf/0xfb
> [<c016cabc>] filp_close+0x160/0x226
> [<c01850cb>] sys_ioctl+0x197/0x3e8
> [<c010af29>] sysenter_past_esp+0x52/0x71
You probably need this;
Index: linux-2.5.66/drivers/acpi/osl.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.66/drivers/acpi/osl.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 osl.c
--- linux-2.5.66/drivers/acpi/osl.c 24 Mar 2003 23:39:26 -0000 1.1.1.1
+++ linux-2.5.66/drivers/acpi/osl.c 6 Apr 2003 22:46:04 -0000
@@ -750,7 +750,7 @@ acpi_os_wait_semaphore(
ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
- if (in_atomic())
+ if (in_atomic() || irqs_disabled())
timeout = 0;
switch (timeout)
--
function.linuxpower.ca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context
2003-04-06 22:48 ` Zwane Mwaikambo
@ 2003-04-07 1:21 ` Andrew Morton
2003-04-07 9:29 ` Felipe Alfaro Solana
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2003-04-07 1:21 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: felipe_alfaro, linux-kernel, andrew.grover
Zwane Mwaikambo <zwane@linuxpower.ca> wrote:
>
> - if (in_atomic())
> + if (in_atomic() || irqs_disabled())
> timeout = 0;
Andy, why does the ACPI code have this test?
Is it to determine whether a caller of this functon is currently holding a
spinlock? If so then it will only work on a preemptible kernel.
A non-preempt kernel will not increment preempt_count() when it takes a
spinlock and ACPI could mistakenly schedule away and cause a system deadlock.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context
2003-04-06 22:48 ` Zwane Mwaikambo
2003-04-07 1:21 ` Andrew Morton
@ 2003-04-07 9:29 ` Felipe Alfaro Solana
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Alfaro Solana @ 2003-04-07 9:29 UTC (permalink / raw)
To: Zwane Mwaikambo; +Cc: LKML, Andy Grover
On Mon, 2003-04-07 at 00:48, Zwane Mwaikambo wrote:
> On Sun, 7 Apr 2003, Felipe Alfaro Solana wrote:
>
> > Power down.
> > acpi_power_off called
> > Debug: sleeping function called from illegal context at
> > include/asm/semaphore.h: 119
> > Call Trace:
> > [<c012088a>] __might_sleep+0x5f/0x75
> > [<c01ffb10>] acpi_os_wait_semaphore+0xc5/0xea
> > [<c021440c>] acpi_ut_acquire_mutex+0x51/0x73
> > [<c020ab4f>] acpi_set_register+0x34/0x15d
> > [<c020b1f6>] acpi_enter_sleep_state+0x77/0x1ab
> > [<c0215d7d>] acpi_power_off+0x21/0x23
> > [<c011a3e5>] machine_power_off+0x10/0x13
> > [<c0135f7b>] sys_reboot+0x332/0x741
> > [<c011e010>] schedule+0x210/0x6d7
> > [<c0130daf>] group_send_sig_info+0x2af/0x6b6
> > [<c011e50d>] preempt_schedule+0x36/0x50
> > [<c0131384>] kill_proc_info+0x60/0x62
> > [<c0134346>] sys_kill+0x4d/0x51
> > [<c016e76b>] __fput+0xaf/0xfb
> > [<c016cabc>] filp_close+0x160/0x226
> > [<c01850cb>] sys_ioctl+0x197/0x3e8
> > [<c010af29>] sysenter_past_esp+0x52/0x71
>
> You probably need this;
>
> Index: linux-2.5.66/drivers/acpi/osl.c
> ===================================================================
> RCS file: /build/cvsroot/linux-2.5.66/drivers/acpi/osl.c,v
> retrieving revision 1.1.1.1
> diff -u -p -B -r1.1.1.1 osl.c
> --- linux-2.5.66/drivers/acpi/osl.c 24 Mar 2003 23:39:26 -0000 1.1.1.1
> +++ linux-2.5.66/drivers/acpi/osl.c 6 Apr 2003 22:46:04 -0000
> @@ -750,7 +750,7 @@ acpi_os_wait_semaphore(
>
> ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
>
> - if (in_atomic())
> + if (in_atomic() || irqs_disabled())
> timeout = 0;
>
> switch (timeout)
OK, now it doesn't cause an oops, but the machine doesn't power off: it
stays powered on showing:
acpi_power_off
and I must manually cycle the power.
This 2.5 ACPI stuff is causing me great deal of pain... I can never get
it to work realiably.
________________________________________________________________________
Linux Registered User #287198
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-04-07 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-06 22:30 2.5.66-bk12: acpi_power_off: sleeping function called from illegal context Felipe Alfaro Solana
2003-04-06 22:48 ` Zwane Mwaikambo
2003-04-07 1:21 ` Andrew Morton
2003-04-07 9:29 ` Felipe Alfaro Solana
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®