2005-09-09 16:07:25

by Al Viro

[permalink] [raw]
Subject: [PATCH] bogus #if (acpi/blacklist)

Signed-off-by: Al Viro <[email protected]>
----
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
@@ -73,7 +73,7 @@
{""}
};

-#if CONFIG_ACPI_BLACKLIST_YEAR
+#ifdef CONFIG_ACPI_BLACKLIST_YEAR

static int __init blacklist_by_year(void)
{


2005-09-09 16:19:20

by Eric Piel

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

09/09/2005 06:07 PM, [email protected] wrote/a écrit:
> Signed-off-by: Al Viro <[email protected]>
> ----
> 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
> @@ -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

2005-09-09 16:44:01

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

On Fri, Sep 09, 2005 at 06:19:02PM +0200, Eric Piel wrote:
> 09/09/2005 06:07 PM, [email protected] wrote/a ??crit:
> >Signed-off-by: Al Viro <[email protected]>
> >----
> >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
> >@@ -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)

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?

2005-09-09 16:56:04

by Roman Zippel

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

Hi,

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

2005-09-09 17:31:40

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

On Fri, Sep 09, 2005 at 06:55:52PM +0200, Roman Zippel wrote:
> Hi,
>
> 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

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

diff -urN RC13-git8-base/drivers/acpi/Kconfig current/drivers/acpi/Kconfig
--- RC13-git8-base/drivers/acpi/Kconfig 2005-09-08 23:42:49.000000000 -0400
+++ current/drivers/acpi/Kconfig 2005-09-09 12:41:37.000000000 -0400
@@ -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

2005-09-22 03:38:28

by Brown, Len

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

On Fri, 2005-09-09 at 12:55 -0400, Roman Zippel wrote:
> Hi,
>
> 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.

The real bug is that drivers/acpi/blacklist.c (the only place
CONFIG_ACPI_BLACLIST_YEAR is referenced) is compiled for non X86.

-Len


2005-09-22 05:14:28

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

On Thu, 15 Sep 2005 18:05:15 -0400 Len Brown wrote:

> On Fri, 2005-09-09 at 12:55 -0400, Roman Zippel wrote:
> > Hi,
> >
> > 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.
>
> 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).

Signed-off-by: Randy Dunlap <[email protected]>
---

drivers/acpi/Makefile | 2 ++
1 files changed, 2 insertions(+)

diff -Naurp linux-2614-rc2/drivers/acpi/Makefile~blacklist_x86 linux-2614-rc2/drivers/acpi/Makefile
--- linux-2614-rc2/drivers/acpi/Makefile~blacklist_x86 2005-09-21 22:11:23.000000000 -0700
+++ linux-2614-rc2/drivers/acpi/Makefile 2005-09-21 22:11:41.000000000 -0700
@@ -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)

---

2005-09-22 05:16:04

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH] bogus #if (acpi/blacklist)

On Wed, Sep 21, 2005 at 10:14:26PM -0700, Randy.Dunlap wrote:
> obj-y += tables.o
> +ifdef CONFIG_X86
> obj-y += blacklist.o
> +endif

More common form would be

obj-$(CONFIG_X86) += blacklist.o

2005-09-22 05:51:32

by Brown, Len

[permalink] [raw]
Subject: RE: [PATCH] bogus #if (acpi/blacklist)

applied.

thanks,
-Len

>-----Original Message-----
>From: Al Viro [mailto:[email protected]]
>Sent: Thursday, September 22, 2005 1:16 AM
>To: Randy.Dunlap
>Cc: Brown, Len; [email protected];
>[email protected]; [email protected]; [email protected];
>[email protected]
>Subject: Re: [PATCH] bogus #if (acpi/blacklist)
>
>On Wed, Sep 21, 2005 at 10:14:26PM -0700, Randy.Dunlap wrote:
>> obj-y += tables.o
>> +ifdef CONFIG_X86
>> obj-y += blacklist.o
>> +endif
>
>More common form would be
>
>obj-$(CONFIG_X86) += blacklist.o
>