All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zdeněk OGAR Skalák" <skalak-Bh/+Xfn7orxQjibfaplwYw@public.gmane.org>
To: "Grover, Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: acpi=off & /proc entries
Date: Mon, 12 May 2003 17:18:40 +0200	[thread overview]
Message-ID: <3EBFBB50.F65430FD@monetplus.cz> (raw)
In-Reply-To: F760B14C9561B941B89469F59BA3A847E96E61@orsmsx401.jf.intel.com

Hi,

	I'm using kernel 2.4.20 with ACPI version 20021205 (with additional patch as:
custom corrected DSDT, DSDT in initrd, \_OS override, .....). I find out a small
bug:
	if you boot with acpi=off argument, acpi isn't activated (as you would expect),
but proc-entries in /proc/acpi (as battery & so on), appears just below /proc
:-{

cat /var/log/dmesg:
...
ACPI: Subsystem revision 20021205
ACPI: Disabled via command line (acpi=off)
...
acpi_button-0466 [0001] [02] acpi_button_init      : ----Entry
acpi_bus-1247 [0001] [03] acpi_bus_register_driv: ----Entry
acpi_bus-1259 [0001] [03] acpi_bus_register_driv: ----Exit- 0000000000000000
acpi_button-0478 [0001] [02] acpi_button_init      : ----Exit- 0000000000000000
...

Reason:
	there's global struct proc_dir_entry *acpi_root_dir in bus.c 
	if you boot with acpi=off, it has it's implicit value of NULL
	all drivers (ex. button) has their init functions with this sequence:
		acpi_xxx_dir = proc_mkdir(ACPI_xxx_CLASS, acpi_root_dir); 
		// this success, (but acpi_root_dir==NULL :-{
		result = acpi_bus_register_driver(&acpi_xxx_driver);	
		// this returns 0, should it ?
		if (result<0){
			// we don't get here
			remove_proc_entry(ACPI_xxx_CLASS, acpi_root_dir);
			return_VALUE(-ENODEV);
		}
		return_VALUE(0);

	I think, we should (in each such driver) test the acpi_disabled variable & if
it's on, don't even bother with mkdir, register_bus_driver  .... Or don't allow
acpi_bus_register_driver to return success if acpi==off (test of acpi_disabled
there :-)

	Sorry, but don't have time (and even not the correct kernel tree & correct acpi
version) to make patch ...

	Bye
		Zdenek OGAR Skalak

-- 
Ing. Zdeněk OGAR Skalák
Monet+ a.s.
Zámecká 365
763 14 Zlín - Štípa, CZ
Tel: +420 / 577 110 411,  Fax: +420 / 577 914 557


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

  reply	other threads:[~2003-05-12 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08 16:26 FW: kernel 2.4 and bugzilla Grover, Andrew
2003-05-12 15:18 ` Zdeněk OGAR Skalák [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-14  8:07 acpi=off & /proc entries Yu, Luming
2003-05-16  9:19 ` Zdeněk OGAR Skalák
2003-05-16 17:49 Grover, Andrew
2003-05-16 20:33 Grover, Andrew

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=3EBFBB50.F65430FD@monetplus.cz \
    --to=skalak-bh/+xfn7orxqjibfaplwyw@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.