bogus #if (acpi/blacklist)
PATCH 1/1 bogus #if (acpi/blacklist)
----
drivers/acpi/blacklist.c +1 -1
@@ -73,7 +73,7 @@ {""} }; -#if CONFIG_ACPI_BLACKLIST_YEAR +#ifdef CONFIG_ACPI_BLACKLIST_YEAR static int __init blacklist_by_year (void ) {
Quoted 6 lines · 09/09/2005 06:07 PM, [email protected] wrote/a écrit:
Signed-off-by Al Viro <[email protected]>----
diff -urNRC13-git8-base/drivers/acpi/blacklist.ccurrent/drivers/acpi/blacklist.c
drivers/acpi/blacklist.c line 79
Quoted 8 lines
drivers/acpi/blacklist.c +1
-1@@ -73,7 +73,7 @@ {""} }; -#if CONFIG_ACPI_BLACKLIST_YEAR +#ifdef CONFIG_ACPI_BLACKLIST_YEAR static int __init blacklist_by_year (void ) {
Are you sure about this? IIRC, CONFIG_ACPI_BLACKLIST_YEAR is defined to 0 when it should not be blacklisted. In drivers/acpi/Kconfig :
Enter 0 to disable this mechanism and allow ACPI to
run by default no matter what the year. (default)
Eric
Quoted 15 lines · Eric Piel
09/09/2005 06:07 PM, [email protected] wrote/a ??crit:
Quoted 14 lines
Signed-off-by Al Viro <[email protected]>----
diff -urNRC13-git8-base/drivers/acpi/blacklist.ccurrent/drivers/acpi/blacklist.c
---RC13-git8-base/drivers/acpi/blacklist.c2005-09-08
23:42:49.000000000 -0400
+++current/drivers/acpi/blacklist.c2005-09-09 11:28:44.000000000 -0400drivers/acpi/blacklist.c +1
-1@@ -73,7 +73,7 @@ {""} }; -#if CONFIG_ACPI_BLACKLIST_YEAR +#ifdef CONFIG_ACPI_BLACKLIST_YEAR
Quoted 7 lines
drivers/acpi/blacklist.c line 79
Quoted 2 lines
drivers/acpi/blacklist.c +0
-0static int __init blacklist_by_year (void ) {Are you sure about this? IIRC,
CONFIG_ACPI_BLACKLIST_YEARis defined to 0 when it should not be blacklisted. Indrivers/acpi/Kconfig:
Enter 0 to disable this mechanism and allow ACPI to
run by default no matter what the year. (default)
Hmm.... Oh, lovely - so we have that non-zero if set, 0 if it's i386 or amd64 and not set and not defined if it's ia64 and not set.
Sigh... It should be left as #if, of course, but I suspect that cleaner way to deal with that would be (in Kconfig)
config ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86 default 0
Roman?
Hi,
Quoted 6 lines · On Fri, 9 Sep 2005 [email protected] wrote:
Sigh... It should be left as #if, of course, but I suspect that cleaner way to deal with that would be (in
Kconfig)config
ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86 default 0
That would be indeed the better fix.
bye, Roman
Quoted 7 lines · Roman Zippel
Hi,
Quoted 3 lines · On Fri, 9 Sep 2005 [email protected] wrote:
Sigh... It should be left as #if, of course, but I suspect that cleaner way to deal with that would be (in
Kconfig)
Quoted 7 lines
Quoted 3 lines
config
ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if X86 default 0That would be indeed the better fix.
bye, Roman
There we go, then (replacement for original variant, _not_ an incremental):
drivers/acpi/Kconfig +1 -2
@@ -250,8 +250,7 @@ Enter the full path name to the file wich includes the AmlCode declaration. config ACPI_BLACKLIST_YEAR - int "Disable ACPI for systems before Jan 1st this year" - depends on X86 + int "Disable ACPI for systems before Jan 1st this year" if X86 default 0 help enter a 4-digit year, eg. 2001 to disable ACPI by default
Quoted 6 lines · Roman Zippel
Hi,
Quoted 1 line · On Fri, 9 Sep 2005 [email protected] wrote:
Sigh... It should be left as #if, of course, but I suspect that
cleaner way to
Quoted 8 lines
Quoted 4 lines
deal with that would be (in
Kconfig)config
ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" ifX86
Quoted 1 line
default 0
That would be indeed the better fix.
The real bug is that drivers/acpi/blacklist.c (the only place CONFIG_ACPI_BLACLIST_YEAR is referenced) is compiled for non X86.
-Len
Quoted 11 lines · On Thu, 15 Sep 2005 18:05:15 -0400 Len Brown wrote:
Quoted 10 lines · Roman Zippel
Hi,
Quoted 1 line · On Fri, 9 Sep 2005 [email protected] wrote:
Sigh... It should be left as #if, of course, but I suspect that
cleaner way to
Quoted 4 lines
deal with that would be (in
Kconfig)config
ACPI_BLACKLIST_YEAR
int "Disable ACPI for systems before Jan 1st this year" if
Quoted 7 lines
Quoted 4 lines
X86
Quoted 1 line
default 0
That would be indeed the better fix.
The real bug is that
drivers/acpi/blacklist.c(the only placeCONFIG_ACPI_BLACLIST_YEARis referenced) is compiled for non X86.
You want this then?
---
From: Randy Dunlap <[email protected]>
Only build drivers/acpi/blacklist.o on X86 (includes X86_64).
---
drivers/acpi/Makefile | 2 ++ 1 files changed, 2 insertions(+)
drivers/acpi/Makefile renamed from drivers/acpi/Makefile~blacklist_x86 +2 -0
@@ -16,7 +16,9 @@ EXTRA_CFLAGS += $(ACPI_CFLAGS) # ACPI Boot-Time Table Parsing # obj-y += tables.o +ifdef CONFIG_X86 obj-y += blacklist.o +endif # # ACPI Core Subsystem (Interpreter)
---
drivers/acpi/Makefile EXTRA_CFLAGS += $(ACPI_CFLAGS) · line 21
Quoted 4 lines · Randy.Dunlap
obj-y += tables.o
drivers/acpi/Makefile renamed from drivers/acpi/Makefile~blacklist_x86 +2
-0+ifdef CONFIG_X86 obj-y += blacklist.o +endif
More common form would be
obj-$(CONFIG_X86) += blacklist.o