public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: Len Brown <lenb@kernel.org>
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>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>
Subject: Re: [PATCH] ACPI: don't walk tables if ACPI was disabled
Date: Fri, 20 Jun 2008 23:27:25 +0200	[thread overview]
Message-ID: <19f34abd0806201427h740ca3e7gc2f01c7e34616fd4@mail.gmail.com> (raw)
In-Reply-To: <19f34abd0806201340t502ce471n578dd2498a5f1992@mail.gmail.com>

On Fri, Jun 20, 2008 at 10:40 PM, Vegard Nossum <vegard.nossum@gmail.com> wrote:
> On Fri, Jun 20, 2008 at 9:00 PM, Len Brown <lenb@kernel.org> wrote:
>>> @@ -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?
>
> Obviously not. Because Ingo is booting with acpi=off and he still gets
> a warning about some mutex operation that originates from this very
> initcall:
>
> [    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]
>
>

Aha. The device in question (PNP0b00) is discovered while doing
pnpbios_init(), NOT pnpacpi_init:

[    1.712032] initcall pnpacpi_init+0x0/0x80 returned 0 after 3 msecs
[    1.716032] calling  pnpbios_init+0x0/0x322
[    1.720032] PnPBIOS: Scanning system for PnP BIOS support...
[    1.724032] PnPBIOS: Found PnP BIOS installation structure at 0xc00fc550
[    1.728032] PnPBIOS: PnP BIOS version 1.0, entry 0xf0000:0xc580, dseg 0xf0000
...
[    1.876032] pnp 00:03: parse allocated resources
[    1.880032] pnp 00:03:   add irq 8 flags 0x0
[    1.884032] pnp 00:03:   add io  0x70-0x71 flags 0x0
[    1.888032] pnp 00:03: parse resource options
[    1.892032] pnp 00:03: new independent option
[    1.896032] device: '00:03': device_add
[    1.900032] bus: 'pnp': add device 00:03
[    1.904032] PM: Adding info for pnp:00:03
[    1.908032] pnp 00:03: Plug and Play BIOS device, IDs PNP0b00 (active)

So I guess this function, pnpbios_init() needs the check as well. In
fact, it has this:

#ifdef CONFIG_PNPACPI
        if (!acpi_disabled && !pnpacpi_disabled) {
                pnpbios_disabled = 1;
                printk(KERN_INFO "PnPBIOS: Disabled by ACPI PNP\n");
                return -ENODEV;
        }
#endif                          /* CONFIG_ACPI */

...I guess that should be changed to say if (acpi_disabled ||
pnpacpi_disabled)? Or... I don't understand the purpose of the
original test. But it seems to be there since the beginning of time
(or, well, v2.6.12-rc2).


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

  reply	other threads:[~2008-06-20 21:27 UTC|newest]

Thread overview: 26+ 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   ` [PATCH] ACPI: don't walk tables if ACPI was disabled Len Brown
2008-06-20 20:40     ` Vegard Nossum
2008-06-20 21:27       ` Vegard Nossum [this message]
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
2008-06-25  3:07   ` Len Brown
2008-06-25  3:07   ` [PATCH 1/4] ACPI: add standard linux WARN() output to ACPI warnings Len Brown
2008-06-25  3:07     ` [PATCH 2/4] ACPI: add WARN_ON(acpi_disabled) Len Brown
2008-06-25  3:07     ` [PATCH 3/4] dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled Len Brown
2008-06-25  3:07     ` [PATCH 4/4] ACPI: don't walk tables if ACPI was disabled 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=19f34abd0806201427h740ca3e7gc2f01c7e34616fd4@mail.gmail.com \
    --to=vegard.nossum@gmail.com \
    --cc=astarikovskiy@suse.de \
    --cc=bjorn.helgaas@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rjw@sisk.pl \
    --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