linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@us.ibm.com>
To: Thomas Renninger <trenn@suse.de>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0
Date: Thu, 16 Apr 2009 10:42:18 -0700	[thread overview]
Message-ID: <20090416174217.GY8311@plum> (raw)
In-Reply-To: <200904161201.13409.trenn@suse.de>

On Thu, Apr 16, 2009 at 12:01:11PM +0200, Thomas Renninger wrote:
> Hi,
> 
> be careful, this could break the T60 again.

So long as T60 owners boot with ignore_ppc=1, they should still be fine.

> Can you and Ingo place acpidump of your machines somewhere, please.
> 
> On Thursday 16 April 2009 02:27:12 Darrick J. Wong wrote:
> > Earlier, Ingo Molnar posted a patch to make it so that the kernel would avoid
> > reading _PPC on his broken T60.  Unfortunately, it seems that with Thomas
> > Renninger's patch last July to eliminate _PPC evaluations when the processor
> > driver loads, the kernel never actually reads _PPC at all!
> This is wrong. _PPC is only evaluated when a cpufreq driver got registered.

I put a printk just before the call to acpi_evaluate_integer in
acpi_processor_get_platform_limit.  The printk did not appear unless (a)
I triggered the Notify event to get the kernel to reevaluate _PPC or (b)
I took a CPU offline and online.

An alternate way to describe the situation, I think, is that ignore_ppc
doesn't go from -1 to 0 until acpi_processor_ppc_notifier gets called,
and that only seems to happen during an ACPI Notify event.

> > This is problematic
> > if you happen to boot your non-T60 computer in a state where the BIOS _wants_
> > _PPC to be something other than zero.
> Your machine should suffer from that since Ingo's T60 patch?

Yes, but the particular machine I have didn't exist until a couple of
weeks ago, and before that our BIOSes were written so that _PPC always
returned zero, which masked the problem.

The _PPC method in this (preproduction) machine's BIOS also sets a flag
that enables the sending of _PPC Notify events.  I'm not sure if that's
the proper way to do such things, though it seems logical that if an OS
never reads _PPC then sending Notify events for it is pointless.

> Reading the _PPC part of the ACPI spec again:
> ---
> In order to support dynamic changes of _PPC object, Notify events on
> the processor object. Notify events of type 0x80 will cause OSPM to
> reevaluate any _PPC objects residing under the particular processor object
> notified.
> ---
> The *reevaluate* implies that the _PPC value has been evaluated/initialized
> by the OS already and Ingo's patch would be wrong then.
> I'd like to have a look at the T60's ACPI parts and find out what exactly
> (or if at all) makes _PPC to return sane values, I expect it's _PDC.

I recall that on the T60 BIOS, the _PPC was programmed to read the value
out of some register in the embedded controller, but I'll have to go
find a T60 to see what the latest BIOSes do.  There's nothing in the T60
BIOS update changelogs to indicate that they found and corrected a
problem with _PPC... but that doesn't eliminate the possibility that
they "forgot" to document one.

Though I do recall seeing some weird bug with that T60 where putting the
machine to sleep would confuse it into "1ghz only" mode, though I never
noticed this symptom after a fresh boot.

> Hmm, I could also imagine that Ingo's T60 patch is not needed anymore since
> Yakui's patch (0ac3c571315a53c14d2733564f14ebdb911fe903).
> This one could make sure that _PDC is evaluated first making the internal
> ACPI _PPC state initialize and makes sure _PPC gets only called afterwards.
> 
> If this patch does not break Ingo's T60, I think this should go in.
> Due to Yakui's reordering/cleanup of ACPI function calls, I think also
> the notifier chain I introduced is not needed anymore and I can clean this
> up if I find some time.

> You are more or less reverting Ingo's patch (e4233dec749a3519069d9390561b5636a75c7579):

Yes, but preserving the ignore_ppc=1 override.

--D

  parent reply	other threads:[~2009-04-16 17:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15 22:53 [PATCH] acpi: Fix regression where _PPC is not read at boot even when ignore_ppc=0 Darrick J. Wong
2009-04-16  0:27 ` [PATCH v2] " Darrick J. Wong
2009-04-16 10:01   ` Thomas Renninger
2009-04-16 10:32     ` Ingo Molnar
2009-04-16 17:42     ` Darrick J. Wong [this message]
2009-04-16 18:49       ` Thomas Renninger
2009-04-16 22:45       ` Matthew Garrett
2009-04-20  5:13         ` Len Brown
2009-04-20  9:13           ` Thomas Renninger
2009-04-20 10:45             ` Ingo Molnar
2009-04-29 13:19               ` Thomas Renninger
2009-04-29 14:48                 ` Ingo Molnar
2009-04-29 21:43                 ` Darrick J. Wong
2009-04-30  9:07                   ` Thomas Renninger
2009-04-30  9:17                     ` Ingo Molnar
2009-04-20 22:18             ` Henrique de Moraes Holschuh
2009-04-28 19:33         ` Darrick J. Wong
2009-04-28 19:53           ` Matthew Garrett
2009-04-28 20:24             ` Darrick J. Wong
2009-04-29 21:39             ` Darrick J. Wong
2009-04-29 22:00               ` Matthew Garrett
2009-04-30  7:25                 ` Ingo Molnar
2009-04-30  9:54                   ` Matthew Garrett
2009-04-30 11:10                     ` Ingo Molnar
2009-04-30 11:13                       ` Matthew Garrett
2009-05-15 19:12                         ` Darrick J. Wong
2009-06-02 23:21                           ` Darrick J. Wong
2009-06-07 10:05                             ` Ingo Molnar
2009-07-15  0:32                               ` Darrick J. Wong
2010-02-16 22:07                                 ` Matthew Garrett
2010-02-16 22:26                                   ` Darrick J. Wong
2010-02-18  9:02                                     ` Len Brown
2010-02-18 18:28                                       ` Darrick J. Wong
2010-02-19  6:12                                         ` Len Brown

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=20090416174217.GY8311@plum \
    --to=djwong@us.ibm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=trenn@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).