public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang@hp.com>
To: Lin Ming <ming.m.lin@intel.com>
Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 01/11] ACPI: processor: call _PDC early
Date: Sun, 20 Dec 2009 19:19:57 -0700	[thread overview]
Message-ID: <20091221021957.GB7127@ldl.fc.hp.com> (raw)
In-Reply-To: <1261359292.10432.97.camel@minggr.sh.intel.com>

* Lin Ming <ming.m.lin@intel.com>:
> On Mon, 2009-12-21 at 03:30 +0800, Alex Chiang wrote:
> > We discovered that at least one machine (HP Envy), methods in the DSDT
> > attempt to call external methods defined in a dynamically loaded SSDT.
> > 
> > Unfortunately, the DSDT methods we are trying to call are part of the
> > EC initialization, which happens very early, and the the dynamic SSDT
> > is only loaded when a processor _PDC method runs much later.
> > 
> > This results in namespace lookup errors for the (as of yet) undefined
> > methods.
> > 
> > Since Windows doesn't have any issues with this machine, we take it
> > as a hint that they must be evaluating _PDC much earlier than we are.
> > 
> > Thus, the proper thing for Linux to do should be to match the Windows
> > implementation more closely.
> > 
> > Provide a mechanism to call _PDC before we enable the EC. Doing so loads
> > the dynamic tables, and allows the EC to be enabled correctly.
> > 
> > The ACPI processor driver will still evaluate _PDC in its .add() method
> > to cover the hotplug case.
> > 
> > Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=14824
> > 
> > diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> > @@ -888,6 +888,8 @@ static int __init acpi_bus_init(void)
> >  		goto error1;
> >  	}
> >  
> > +	acpi_early_processor_set_pdc();
> 
> acpi_bus_init(...) {
> 	acpi_ec_ecdt_probe();
> 
> 	acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
> 
> 	acpi_early_processor_set_pdc();
> 
> 	acpi_boot_ec_enable();
> }
> 
> EC space handler may be installed in acpi_ec_ecdt_probe or
> acpi_boot_ec_enable.  In your machine(HP Envy), EC space
> handler is installed in acpi_boot_ec_enable.

Correct.

> It seems that this patch does not fix the problem if EC space
> hanlder is installed in acpi_ec_ecdt_probe, right?

Also correct.

But this patch is a reaction to reported behavior of a machine in
the field, with a shipping BIOS, and the problem was that we
only installed the handler in acpi_boot_ec_enable().

> But clearly, we can not put acpi_early_processor_set_pdc before
> acpi_ec_ecdt_probe because ACPI namespace objects have not been
> initialized yet at that time.
> 
> Looks like a "chicken or the egg" problem.
> Which came first, the chicken or the egg?

I understand the point you are making, but in this case, we do
know which came first (the chicken ;).

Maybe in the future, we'll be surprised again and discover that
we need to evaluate _PDC even earlier, but I prefer to fix that
problem later, if it ever occurs, than to worry about it now.

This patch fixes a real issue, so I prefer to focus on that
instead of worrying about a theoretical issue.

Thanks,
/ac, unless Len tells me I'm wrong


  reply	other threads:[~2009-12-21  2:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-20 19:30 [PATCH v2 00/11] ACPI: early _PDC eval and unify x86/ia64 Alex Chiang
2009-12-20 19:30 ` [PATCH v2 01/11] ACPI: processor: call _PDC early Alex Chiang
2009-12-21  1:34   ` Lin Ming
2009-12-21  2:19     ` Alex Chiang [this message]
2009-12-20 19:30 ` [PATCH v2 02/11] ACPI: processor: introduce arch_has_acpi_pdc Alex Chiang
2009-12-20 19:30 ` [PATCH v2 03/11] ACPI: processor: unify arch_acpi_processor_init_pdc Alex Chiang
2009-12-20 19:30 ` [PATCH v2 04/11] ACPI: processor: factor out common _PDC settings Alex Chiang
2009-12-20 19:30 ` [PATCH v2 05/11] ACPI: processor: finish unifying arch_acpi_processor_init_pdc() Alex Chiang
2009-12-20 19:30 ` [PATCH v2 06/11] ACPI: processor: unify arch_acpi_processor_cleanup_pdc Alex Chiang
2009-12-20 19:30 ` [PATCH v2 07/11] ACPI: processor: introduce acpi_processor_alloc_pdc() Alex Chiang
2009-12-20 19:31 ` [PATCH v2 08/11] ACPI: processor: change acpi_processor_eval_pdc interface Alex Chiang
2009-12-20 19:31 ` [PATCH v2 09/11] ACPI: processor: open code acpi_processor_cleanup_pdc Alex Chiang
2009-12-20 19:31 ` [PATCH v2 10/11] ACPI: processor: change acpi_processor_set_pdc() interface Alex Chiang
2009-12-20 19:31 ` [PATCH v2 11/11] ACPI: processor: remove _PDC object list from struct acpi_processor Alex Chiang

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=20091221021957.GB7127@ldl.fc.hp.com \
    --to=achiang@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --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