public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Zhao Yakui <yakui.zhao@intel.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Alexey Starikovskiy <astarikovskiy@suse.de>,
	Yinghai Lu <yhlu.kernel@gmail.com>
Subject: Re: [PATCH] ACPI: don't walk tables if ACPI was disabled
Date: Fri, 20 Jun 2008 15:00:58 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0806201458500.3027@localhost.localdomain> (raw)
In-Reply-To: <20080620135639.GA5073@damson.getinternet.no>



On Fri, 20 Jun 2008, Vegard Nossum wrote:

> Hi Ingo,
> 
> Can you see if this patch solves your problem? There might be other
> functions that needs this guard as well, though. I wonder if maybe this test
> should just be included at the top of every driver that uses ACPI in some
> way. But I'm pretty sure that this lack of initialization is the root of your
> problem in any case :-)
> 
> (By the way, I don't know why this problem popped up at this time, maybe it
> was just bad timing/bad luck... How far back do your AE_BAD_PARAMETER in the
> logs go?)
> 
> 
> Vegard
> 
> 
> From: Vegard Nossum <vegard.nossum@gmail.com>
> Date: Fri, 20 Jun 2008 15:39:09 +0200
> Subject: [PATCH] ACPI: don't walk tables if ACPI was disabled
> 
> Ingo Molnar wrote:
> > -tip auto-testing started triggering this spinlock corruption message
> > yesterday:
> >
> > [    3.976213] calling  acpi_rtc_init+0x0/0xd3
> > [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
> > [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
> > [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0
> 
> This is apparently because some parts of ACPI, including mutexes, are not
> initialized when acpi=off is passed to the kernel.
> 
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
> ---
>  drivers/acpi/glue.c               |    3 +++
>  drivers/acpi/namespace/nsxfeval.c |    3 +++
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
> index 2808dc6..9b227d4 100644
> --- a/drivers/acpi/glue.c
> +++ b/drivers/acpi/glue.c
> @@ -333,6 +333,9 @@ static int __init acpi_rtc_init(void)
>  {
>  	struct device *dev = get_rtc_dev();
>  
> +	if (acpi_disabled)
> +		return 0;
> +

hmm, i would expect dev to be 0 for acpi=off,
since pnp_match would fail, no?

>  	if (dev) {
>  		rtc_wake_setup();
>  		rtc_info.wake_on = rtc_wake_on;
> diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
> index a8d5491..c274d1d 100644
> --- a/drivers/acpi/namespace/nsxfeval.c
> +++ b/drivers/acpi/namespace/nsxfeval.c
> @@ -391,6 +391,9 @@ acpi_walk_namespace(acpi_object_type type,
>  
>  	ACPI_FUNCTION_TRACE(acpi_walk_namespace);
>  
> +	if (acpi_disabled)
> +		return_ACPI_STATUS(AE_NO_NAMESPACE);
> +

We should probably BUG_ON(acpi_disabled) here,
since it takes a programming bug to hit this case.

-Len

>  	/* Parameter validation */
>  
>  	if ((type > ACPI_TYPE_LOCAL_MAX) || (!max_depth) || (!user_function)) {
> -- 
> 1.5.4.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2008-06-20 19:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20  9:52 [bug, acpi] BUG: spinlock bad magic on CPU#0, swapper/1, ACPI Exception (utmutex-0263): AE_BAD_PARAMETER Ingo Molnar
2008-06-20 13:11 ` Vegard Nossum
2008-06-20 13:56 ` [PATCH] ACPI: don't walk tables if ACPI was disabled Vegard Nossum
2008-06-20 14:22   ` Ingo Molnar
2008-06-25  2:34     ` [PATCH] ACPI: add standard linux WARN() output to ACPI warnings Len Brown
2008-06-25  2:49       ` Arjan van de Ven
2008-06-25  3:10         ` Len Brown
2008-06-26  3:57           ` Len Brown
2008-06-20 19:00   ` Len Brown [this message]
2008-06-20 20:40     ` [PATCH] ACPI: don't walk tables if ACPI was disabled Vegard Nossum
2008-06-20 21:27       ` Vegard Nossum
2008-06-21  8:19         ` Vegard Nossum
2008-06-24 11:41           ` Ingo Molnar
2008-06-24 11:52             ` Vegard Nossum
2008-06-24 15:22               ` Bjorn Helgaas
2008-06-25  1:37               ` Zhao Yakui
2008-06-25 15:08                 ` Bjorn Helgaas
2008-06-26  3:02                   ` Zhao Yakui
2008-06-26 16:44                     ` Bjorn Helgaas
2008-06-25  2:41             ` Len Brown
2008-06-25  7:07               ` Ingo Molnar

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.0806201458500.3027@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=astarikovskiy@suse.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --cc=vegard.nossum@gmail.com \
    --cc=yakui.zhao@intel.com \
    --cc=yhlu.kernel@gmail.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