Skip to contentSkip to conversation

bogus #if (acpi/blacklist)

PATCH In review [email protected] 6 participants 8 messages Sep 9, 2005 – Sep 22, 2005 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bogus #if (acpi/blacklist)

----

drivers/acpi/blacklist.c +1 -1
diff -urN RC13-git8-base/drivers/acpi/blacklist.c current/drivers/acpi/blacklist.c
@@ -73,7 +73,7 @@
 	{""}
 };
 
-#if	CONFIG_ACPI_BLACKLIST_YEAR
+#ifdef	CONFIG_ACPI_BLACKLIST_YEAR
 
 static int __init blacklist_by_year(void)
 {
#1 lore raw
Quoted 6 lines · 09/09/2005 06:07 PM, [email protected] wrote/a écrit:

----
diff -urN RC13-git8-base/drivers/acpi/blacklist.c current/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

#2 lore raw
Quoted 15 lines · Eric Piel

09/09/2005 06:07 PM, [email protected] wrote/a ??crit:

Quoted 14 lines

----
diff -urN RC13-git8-base/drivers/acpi/blacklist.c
current/drivers/acpi/blacklist.c
--- RC13-git8-base/drivers/acpi/blacklist.c 2005-09-08
23:42:49.000000000 -0400
+++ current/drivers/acpi/blacklist.c 2005-09-09 11:28:44.000000000 -0400

drivers/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 -0
 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)

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?

#3 lore raw

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

#4 lore raw
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 0

That would be indeed the better fix.

bye, Roman

There we go, then (replacement for original variant, _not_ an incremental):

drivers/acpi/Kconfig +1 -2
diff -urN RC13-git8-base/drivers/acpi/Kconfig current/drivers/acpi/Kconfig
@@ -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
#5 lore raw
In reply to Roman Zippel
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" if

X86

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

#6 lore raw
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 place CONFIG_ACPI_BLACLIST_YEAR is 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
diff -Naurp linux-2614-rc2/drivers/acpi/Makefile~blacklist_x86 linux-2614-rc2/drivers/acpi/Makefile
@@ -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)

---

#7 lore raw

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