public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Zhao Yakui <yakui.zhao@intel.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Len Brown <lenb@kernel.org>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	"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: Wed, 25 Jun 2008 09:08:58 -0600	[thread overview]
Message-ID: <200806250908.59315.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <1214357857.9800.20.camel@yakui_zhao.sh.intel.com>

On Tuesday 24 June 2008 07:37:37 pm Zhao Yakui wrote:
> On Tue, 2008-06-24 at 13:52 +0200, Vegard Nossum wrote:
> > On 6/24/08, Ingo Molnar <mingo@elte.hu> wrote:
> > > i havent seen the warning reappear with your fix after thousands of
> > > bootups - so i guess we can consider it fixed.
> > >
> > > Len, please consider the patch below. (it's in tip/out-of-tree)
> > 
> > No, please don't :-)
> > 
> > It fixes your particular case (the acpi_rtc_init() hunk of the patch),
> > but the acpi_walk_namespace() part should be changed to a WARN(). But
> > that is likely to cause a lot of "spurious" reports, so the other acpi
> > drivers should be fixed as well.
> In fact this issue is related with the following factors:
>    a. when acpi is disabled, OS won't initialize the ACPI mutex, which
> is accessed by many ACPI interface functions. For example:
> acpi_walk_namespace, acpi_install_fixed_event_handler.
>    b. When acpi is disabled, some drivers will call the ACPI interface
> functions. For example: The acpi_walk_namespace is called in
> dock_init/bay_init.

I think most current uses of acpi_walk_namespace() are indications
that the ACPI or PNP core is missing something.

In dock_init() and bay_init(), it's used to bind a driver to a
device.  I think it would be better if we could figure out how to
use the usual acpi_bus_register_driver() interface.  Actually, it
looks like this is already 90% done: acpi_dock_match() does the
same thing as is_dock(), so it looks like dock_init() could easily
be converted to register as a driver for ACPI_DOCK_HID.

bay_init() looks similar, with acpi_bay_match(), is_ejectable_bay(),
ACPI_BAY_HID, etc.

Other users of acpi_walk_namespace() are often to install notify
handlers to deal with add/remove events.  I think these are telling
us that we need to implement the "TBD: Handle device insertion/removal"
pieces in acpi_bus_check_device().

> The acpi_install_fixed_event_handler is called in 
> the acpi_rtc_init.

Yes (via rtc_wake_setup()).  I think this should be moved into the
RTC driver itself.  I have some ideas on how to do this; I'll post
a patch in a few days.  But for 2.6.26, I think the minimal fix of
checking acpi_disabled in acpi_rtc_init() is better.

Bjorn



  reply	other threads:[~2008-06-25 15:09 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
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 [this message]
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=200806250908.59315.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=astarikovskiy@suse.de \
    --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=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