* Re: [Fastboot] Fw: Problems with reboot/poweroff on SMP machine
[not found] ` <m1oe8qf4er.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
@ 2005-07-26 7:22 ` Andrew Morton
[not found] ` <20050726002258.1591de62.akpm-3NddpPZAyC0@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-07-26 7:22 UTC (permalink / raw)
To: Eric W. Biederman, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
Brown, Len
Cc: mmokrejs-FKSC99mem8wheYDy1lqhK0JFmxxWawaa,
sjordet-Re5JQEeQqe8AvxtiuMwx3w, fastboot-qjLDD68F18O7TbgM5vRIOg,
zlatko.calusic-2lF7rBilFQQ, linux-kernel-xyiX3/p4JzBDPfheJLI6IQ
(Added acpi people)
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) wrote:
>
> ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) writes:
>
> > Martin MOKREJ___ <mmokrejs-FKSC99mem8wheYDy1lqhK0JFmxxWawaa@public.gmane.org> writes:
> >
> >> Hi Eric,
> >> I don't know if I was epxected to test this right away, but
> >> I just tried over acpi patched sources on my i686:
> >
> > Thanks. That is my bug.
> >
> > I knew the code wasn't quite right but I missed how off it
> > was :)
> >
> > Just remove the BUG_ON(!shutdown_prepared) line and it should
> > compile. I don't know why I though I could read a static
> > variable in another function...
>
> I am now officially confused. My patch might clean up a corner
> case or two but it really should not help, because the issue
> I was worried about is mostly fixed.
>
> All of the pieces are there for the acpi power off case to work
> correctly so is beginning to look like a completely different bug
> then what I am suspecting. Anyone who can testing of my patch
> would be a help.
>
> The only other interesting data point I can think of at the moment
> is the attached patch below.
>
> I want to know if acpi_power_off is having problems because interrupts
> get disabled.
I have a vague feeling that adding local_irq_disable() to acpi_power_off()
is illegal.
void acpi_power_off(void)
{
printk("%s called\n", __FUNCTION__);
local_irq_disable();
acpi_enter_sleep_state(ACPI_STATE_S5);
}
Can an ACPI person please comment?
> Eric
>
> diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
> --- a/arch/i386/kernel/i8259.c
> +++ b/arch/i386/kernel/i8259.c
> @@ -283,7 +283,7 @@ static struct sysdev_class i8259_sysdev_
> set_kset_name("i8259"),
> .suspend = i8259A_suspend,
> .resume = i8259A_resume,
> - .shutdown = i8259A_shutdown,
> +// .shutdown = i8259A_shutdown,
> };
>
> static struct sys_device device_i8259A = {
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Fastboot] Fw: Problems with reboot/poweroff on SMP machine
[not found] ` <20050726002258.1591de62.akpm-3NddpPZAyC0@public.gmane.org>
@ 2005-07-26 7:44 ` Eric W. Biederman
2005-07-26 9:13 ` Martin MOKREJŠ
1 sibling, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2005-07-26 7:44 UTC (permalink / raw)
To: Andrew Morton
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Brown, Len,
mmokrejs-FKSC99mem8wheYDy1lqhK0JFmxxWawaa,
sjordet-Re5JQEeQqe8AvxtiuMwx3w, fastboot-qjLDD68F18O7TbgM5vRIOg,
zlatko.calusic-2lF7rBilFQQ, linux-kernel-xyiX3/p4JzBDPfheJLI6IQ
Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org> writes:
> (Added acpi people)
>
> I have a vague feeling that adding local_irq_disable() to acpi_power_off()
> is illegal.
I didn't my preliminary patch just fat fingered that line.
All I was really doing was removing acpi_sleep_prepare(),
to be certain we weren't calling it at the wrong time.
> void acpi_power_off(void)
> {
> printk("%s called\n", __FUNCTION__);
> local_irq_disable();
> acpi_enter_sleep_state(ACPI_STATE_S5);
> }
>
> Can an ACPI person please comment?
>From drivers/acpi/hwsleep.c
> /*******************************************************************************
> *
> * FUNCTION: acpi_enter_sleep_state
> *
> * PARAMETERS: sleep_state - Which sleep state to enter
> *
> * RETURN: Status
> *
> * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
> * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
> *
> ******************************************************************************/
>
> acpi_status asmlinkage
> acpi_enter_sleep_state (
So at least according to the comments it would be an error
to call that function with interrupts enabled.
So either there is some weird control flow going on that gets
acpi_sleep_prepare called with interrupts disabled. Or there
is an entirely different problem showing up with acpi_power_off.
My current hunch is some very weird control flow possibly the system
devices not being shutdown in the expected order but I don't know
at the moment.
I have one bug report that remove the i8259A shutdown fixes
the problem in 2.6.13-rc2. What I am having a very hard time
seeing is how it could possibly make a difference.
Eric
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Fastboot] Fw: Problems with reboot/poweroff on SMP machine
[not found] ` <20050726002258.1591de62.akpm-3NddpPZAyC0@public.gmane.org>
2005-07-26 7:44 ` Eric W. Biederman
@ 2005-07-26 9:13 ` Martin MOKREJŠ
1 sibling, 0 replies; 3+ messages in thread
From: Martin MOKREJŠ @ 2005-07-26 9:13 UTC (permalink / raw)
To: Andrew Morton
Cc: Eric W. Biederman, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
Brown, Len, sjordet-Re5JQEeQqe8AvxtiuMwx3w,
fastboot-qjLDD68F18O7TbgM5vRIOg, zlatko.calusic-2lF7rBilFQQ,
linux-kernel-xyiX3/p4JzBDPfheJLI6IQ
The patch below really doesn't help of ASUS P4C800E-Deluxe when
applied to plain 2.6.13-rc3-git7. The machines turns the power immediately
again.
Martin
Andrew Morton wrote:
> (Added acpi people)
>
> ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) wrote:
>
>>ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) writes:
>>
>>
>>>Martin MOKREJ___ <mmokrejs-FKSC99mem8wheYDy1lqhK0JFmxxWawaa@public.gmane.org> writes:
>>>
>>>
>>>>Hi Eric,
>>>> I don't know if I was epxected to test this right away, but
>>>>I just tried over acpi patched sources on my i686:
>>>
>>>Thanks. That is my bug.
>>>
>>>I knew the code wasn't quite right but I missed how off it
>>>was :)
>>>
>>>Just remove the BUG_ON(!shutdown_prepared) line and it should
>>>compile. I don't know why I though I could read a static
>>>variable in another function...
>>
>>I am now officially confused. My patch might clean up a corner
>>case or two but it really should not help, because the issue
>>I was worried about is mostly fixed.
>>
>>All of the pieces are there for the acpi power off case to work
>>correctly so is beginning to look like a completely different bug
>>then what I am suspecting. Anyone who can testing of my patch
>>would be a help.
>>
>>The only other interesting data point I can think of at the moment
>>is the attached patch below.
>>
>>I want to know if acpi_power_off is having problems because interrupts
>>get disabled.
>
>
> I have a vague feeling that adding local_irq_disable() to acpi_power_off()
> is illegal.
>
> void acpi_power_off(void)
> {
> printk("%s called\n", __FUNCTION__);
> local_irq_disable();
> acpi_enter_sleep_state(ACPI_STATE_S5);
> }
>
> Can an ACPI person please comment?
>
>
>>Eric
>>
>>diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
>>--- a/arch/i386/kernel/i8259.c
>>+++ b/arch/i386/kernel/i8259.c
>>@@ -283,7 +283,7 @@ static struct sysdev_class i8259_sysdev_
>> set_kset_name("i8259"),
>> .suspend = i8259A_suspend,
>> .resume = i8259A_resume,
>>- .shutdown = i8259A_shutdown,
>>+// .shutdown = i8259A_shutdown,
>> };
>>
>> static struct sys_device device_i8259A = {
>
>
>
--
Martin Mokrejs
Email: 'bW9rcmVqc21Acmlib3NvbWUubmF0dXIuY3VuaS5jeg==\n'.decode('base64')
GPG key is at http://www.natur.cuni.cz/~mmokrejs
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-26 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050725142951.6d47ca32.akpm@osdl.org>
[not found] ` <m1ackah4r3.fsf@ebiederm.dsl.xmission.com>
[not found] ` <42E5B533.60107@ribosome.natur.cuni.cz>
[not found] ` <m1sly2fbw0.fsf@ebiederm.dsl.xmission.com>
[not found] ` <m1oe8qf4er.fsf@ebiederm.dsl.xmission.com>
[not found] ` <m1oe8qf4er.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2005-07-26 7:22 ` [Fastboot] Fw: Problems with reboot/poweroff on SMP machine Andrew Morton
[not found] ` <20050726002258.1591de62.akpm-3NddpPZAyC0@public.gmane.org>
2005-07-26 7:44 ` Eric W. Biederman
2005-07-26 9:13 ` Martin MOKREJŠ
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox