From: Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
To: Patrick Mochel <mochel-3NddpPZAyC0@public.gmane.org>
Cc: swsusp-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [ACPI] acpi_bus_register_driver() returns -ENODEV after resume
Date: Wed, 3 Sep 2003 01:22:08 +0200 [thread overview]
Message-ID: <20030902232208.GA17674@hell.org.pl> (raw)
In-Reply-To: <Pine.LNX.4.33.0309021529410.1737-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Thus wrote Patrick Mochel:
> Since it's __initdata, the memory will be freed early in the init process
> (c.f. init/main.c::init() -> free_initmem()). Anything that uses it later
> is touching memory that is either unallocated, or allocated by something
> else. That's a bug.
>
> Also, it doesn't need to be EXPORTed. If it is left as initdata, that's
> another bug, because the two are semantically disjoint. However, even with
> the patch below, I'm not sure why you would want to expose the variable
> (and I've in fact removed that).
Sounds reasonable, but... what about modular ACPI? At least
acpi_bus_register_driver() uses acpi_disabled, so it would seem to me that
every time we're loading an ACPI driver module, acpi_disabled evaluates to
something random, as in the aforementioned case?
Additionally, if acpi_disabled is to be available for modules (i.e. modular
ACPI), it should rather be exported, shouldn't it?
> Tangential question: Do preprocessor conditionals evaluate to a value?
> I.e. instead of doing:
>
> #ifdef CONFIG_ACPI
> int acpi_disabled = 0;
> #else
> int acpi_disabled = 1;
> #endif
>
> Could we do:
>
> int acpi_disabled = (CONFIG_ACPI == 'y');
AFAIK acpi_disabled is independent on CONFIG_ACPI, i.e. CONFIG_ACPI may be
defined, but if acpi=off is passed to the kernel command line,
acpi_disabled evaluates to 1?
Best regards and a 1:20 am CEST disclaimer: I might be talking nonsenses.
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-09-02 23:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-01 22:26 acpi_bus_register_driver() returns -ENODEV after resume Karol Kozimor
[not found] ` <20030901222619.GC27945-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-09-02 22:39 ` [ACPI] " Patrick Mochel
[not found] ` <Pine.LNX.4.33.0309021529410.1737-100000-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-09-02 22:51 ` Patrick Mochel
2003-09-02 23:22 ` Karol Kozimor [this message]
[not found] ` <20030902232208.GA17674-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-09-02 23:23 ` Patrick Mochel
2003-09-03 0:58 ` Matthew Wilcox
2003-09-08 22:07 ` Karol Kozimor
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=20030902232208.GA17674@hell.org.pl \
--to=sziwan-detuoxkzssqrdjvtcaxf/a@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=mochel-3NddpPZAyC0@public.gmane.org \
--cc=swsusp-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox