From: Thomas Gleixner <tglx@linutronix.de>
To: Andi Kleen <andi@firstfloor.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Venkatesch Pallipadi <venkatesh.pallipadi@intel.com>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH] ACPI/CPUIDLE: prevent setting pm_idle to NULL
Date: Mon, 28 Jul 2008 23:51:45 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.1.10.0807282340590.14925@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080728195324.GE30344@one.firstfloor.org>
On Mon, 28 Jul 2008, Andi Kleen wrote:
> > The problem here is that the acpi/cpuidle code can be in a state where
> > the _save/old variables _ARE_ NULL because they had not been
> > initialized with the original pm_idle before the module is removed or
> > the cst state changes. So all we have to do is to prevent pm_idle to
> > be set to NULL.
>
> It still seems wrong to me to fall back to the cpuidle idle function
> instead of the earlier idle function just because cpuidle was loaded
> in a weird way.
WTF are you talking about ?
pm_idle_save is initialized with pm_idle (the original idle function
selected by the arch code).
When CST changes or the acpi/cpuidle modules are removed we need to
restore the original pm_idle function from pm_idle_save.
When pm_idle_save was not initialized, which can happen, then we wrote
NULL to pm_idle, which is obviously wrong. We simply want to avoid
that we write NULL into pm_idle.
That's all what the patch does. Nothing else.
This problem was hidden by the magic
if (!pm_idle)
pm_idle = default_idle;
in the arch/x86 code which was removed when I refactored the pm_idle
initialization code.
Just get it. That "if (!pm_idle)" check in the arch code was just
papering over the fact that the acpi code set pm_idle to NULL under
certain conditions.
Thanks,
tglx
next prev parent reply other threads:[~2008-07-28 21:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-27 21:47 Thomas Gleixner
2008-07-28 17:46 ` Andi Kleen
2008-07-28 19:38 ` Thomas Gleixner
2008-07-28 19:53 ` Andi Kleen
2008-07-28 21:51 ` Thomas Gleixner [this message]
2008-07-28 22:05 ` Pallipadi, Venkatesh
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=alpine.LFD.1.10.0807282340590.14925@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=dhaval@linux.vnet.ibm.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
--cc=venkatesh.pallipadi@intel.com \
/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®