Re: 2.6.25-rc2-mm1 (x64 thermal build failure)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Petazzoni
Date: Monday, February 18, 2008 - 3:15 am

Hi,

Le Sat, 16 Feb 2008 21:44:10 -0800,
Andrew Morton <akpm@linux-foundation.org> a =C3=A9crit :


Thanks for your report. The issue is that some DMI fixup tables and
callbacks are defined inside #ifdef CONFIG_DMI, some others are not. We
need to normalize that to fix the build issue in all situations.

I've thought about it, and I see two options, but I can't decide which
one is the best, so I request your opinion on that.

 1) Remove the #ifdef CONFIG_DMI around DMI fixup tables and callbacks
    definition, so that everything exists and gcc is happy. gcc is able
    to optimize out the DMI fixup table (it is not present in the binary
    when compiling with DMI=3Dn), but gcc doesn't seem to be able to
    optimize out the DMI fixup callbacks (they are still present in the
    binary). So this would leave some unused code in the binary, which
    is not completely satisfying.

 2) Define macros such as DECLARE_DMI_FIXUP_TABLE and
    DECLARE_DMI_FIXUP_CALLBACK, which could then be used like this:

DECLARE_DMI_FIXUP_CALLBACK(set_bios_reboot, __init, d, {
	if (reboot_type !=3D BOOT_BIOS) {
		reboot_type =3D BOOT_BIOS;
		printk(KERN_INFO "%s series board detected. Selecting BIOS-method for reb=
oots.\n", d->ident);
	}
	return 0;
});

DECLARE_DMI_FIXUP_TABLE(reboot_dmi_table, __initdata, {
	{	/* Handle problems with rebooting on Dell E520's */
		.callback =3D set_bios_reboot,
		.ident =3D "Dell E520",
		.matches =3D {
			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "Dell DM061"),
		},
	}
});

     And use them everywhere, so that DMI fixup tables and callbacks
     are properly compiled out when DMI=3Dn. Here are the macro definition:

#ifdef CONFIG_DMI

#define DECLARE_DMI_FIXUP_TABLE(name, opts, contents...) \
	static struct dmi_system_id opts name [] =3D contents

#define DECLARE_DMI_FIXUP_CALLBACK(name, opts, id, contents...) \
	static int opts name(const struct dmi_system_id *id) contents

#else

#define DECLARE_DMI_FIXUP_TABLE(name, opts, contents...)

#define DECLARE_DMI_FIXUP_CALLBACK(name, opts, contents...)

#endif

     The issue I have with this option is that there are sometimes
     "driver_data" associated to DMI callbacks (see
     drivers/input/misc/wistron_btns.c for example) and I don't exactly
      see how to create a similar DECLARE_DMI_FIXUP_CALLBACK_DATA macro.

Thanks for your insights,

Thomas
--=20
Thomas Petazzoni, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc2-mm1, Andrew Morton, (Sat Feb 16, 1:25 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Marcin Slusarz, (Sat Feb 16, 3:59 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Andrew Morton, (Sat Feb 16, 4:09 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Marcin Slusarz, (Sat Feb 16, 4:37 am)
[BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x, Kamalesh Babulal, (Sat Feb 16, 9:15 am)
Re: 2.6.25-rc2-mm1, Randy Dunlap, (Sat Feb 16, 10:21 am)
[PATCH]2.6.25-rc2-mm1 - Build Failure at security/keys/com ..., Kamalesh Babulal, (Sat Feb 16, 10:31 am)
Re: 2.6.25-rc2-mm1 (wakeup), Randy Dunlap, (Sat Feb 16, 10:48 am)
[BUILD_FAILURE] 2.6.25-rc2-mm1 - Build Failure at acpi_os, Kamalesh Babulal, (Sat Feb 16, 12:47 pm)
Re: [BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x, Thomas Gleixner, (Sat Feb 16, 12:49 pm)
Re: [BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x, Thomas Gleixner, (Sat Feb 16, 12:50 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Laurent Riffard, (Sat Feb 16, 2:27 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Sat Feb 16, 2:52 pm)
Re: 2.6.25-rc2-mm1: build failure (x86), Rafael J. Wysocki, (Sat Feb 16, 5:22 pm)
Re: 2.6.25-rc2-mm1 (wakeup), Rafael J. Wysocki, (Sat Feb 16, 6:18 pm)
Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sat Feb 16, 6:22 pm)
Re: 2.6.25-rc2-mm1: build failure (x86), Rafael J. Wysocki, (Sat Feb 16, 6:37 pm)
Re: 2.6.25-rc2-mm1 (wakeup), Randy Dunlap, (Sat Feb 16, 7:19 pm)
Re: [BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x, Kamalesh Babulal, (Sat Feb 16, 8:40 pm)
Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sat Feb 16, 8:58 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sat Feb 16, 9:35 pm)
[PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Randy Dunlap, (Sat Feb 16, 9:38 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Randy Dunlap, (Sat Feb 16, 9:47 pm)
Re: [BUG] 2.6.25-rc2-mm1 - Kernel panic while bootup cause ..., Kamalesh Babulal, (Sat Feb 16, 10:02 pm)
Re: 2.6.25-rc2-mm1, Kamalesh Babulal, (Sat Feb 16, 10:08 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Randy Dunlap, (Sat Feb 16, 10:16 pm)
Re: 2.6.25-rc2-mm1, Andrew Morton, (Sat Feb 16, 10:24 pm)
Re: 2.6.25-rc2-mm1 (build failure), Randy Dunlap, (Sat Feb 16, 10:32 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Andrew Morton, (Sat Feb 16, 10:44 pm)
Re: 2.6.25-rc2-mm1 (build failure), Andrew Morton, (Sat Feb 16, 10:46 pm)
Re: 2.6.25-rc2-mm1, Joel Becker, (Sat Feb 16, 11:25 pm)
Re: 2.6.25-rc2-mm1, Joel Becker, (Sat Feb 16, 11:32 pm)
Re: 2.6.25-rc2-mm1, Andrew Morton, (Sat Feb 16, 11:51 pm)
Re: 2.6.25-rc2-mm1, Kamalesh Babulal, (Sun Feb 17, 12:36 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Marcin Slusarz, (Sun Feb 17, 2:54 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Marcin Slusarz, (Sun Feb 17, 2:56 am)
2.6.25-rc2-mm1: new create_proc_entry() users, Alexey Dobriyan, (Sun Feb 17, 3:50 am)
Re: 2.6.25-rc2-mm1 (build failure), Rafael J. Wysocki, (Sun Feb 17, 4:23 am)
Re: 2.6.25-rc2-mm1 (build failure), Randy Dunlap, (Sun Feb 17, 10:54 am)
Re: 2.6.25-rc2-mm1 (build failure), Pavel Machek, (Sun Feb 17, 12:52 pm)
Re: 2.6.25-rc2-mm1 (build failure), Rafael J. Wysocki, (Sun Feb 17, 1:12 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Rafael J. Wysocki, (Sun Feb 17, 1:40 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Sam Ravnborg, (Sun Feb 17, 2:07 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sun Feb 17, 2:20 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sun Feb 17, 2:21 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Sam Ravnborg, (Sun Feb 17, 2:28 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), H. Peter Anvin, (Sun Feb 17, 2:31 pm)
Re: [PATCH v2] Re: 2.6.25-rc2-mm1 (wakeup), Sam Ravnborg, (Sun Feb 17, 2:46 pm)
Re: 2.6.25-rc2-mm1 (cifs build errs), Randy Dunlap, (Sun Feb 17, 5:14 pm)
Re: 2.6.25-rc2-mm1, Randy Dunlap, (Sun Feb 17, 5:16 pm)
Re: 2.6.25-rc2-mm1 (cifs build errs), Steve French, (Sun Feb 17, 9:10 pm)
Re: 2.6.25-rc2-mm1 (x86 MCE build error), Randy Dunlap, (Sun Feb 17, 10:17 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Sun Feb 17, 10:18 pm)
Re: 2.6.25-rc2-mm1 (x86 MCE build error), Yinghai Lu, (Sun Feb 17, 11:03 pm)
Re: 2.6.25-rc2-mm1, Andrew Morton, (Mon Feb 18, 2:34 am)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Thomas Petazzoni, (Mon Feb 18, 3:15 am)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Andrew Morton, (Mon Feb 18, 5:13 am)
Re: 2.6.25-rc2-mm1: new create_proc_entry() users, Andrew Morton, (Mon Feb 18, 6:01 am)
Re: 2.6.25-rc2-mm1 (x86 MCE build error), Adrian Bunk, (Mon Feb 18, 6:31 am)
Re: [BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x, Kamalesh Babulal, (Mon Feb 18, 7:08 am)
Re: 2.6.25-rc2-mm1: new create_proc_entry() users, Daniel Walker, (Mon Feb 18, 9:13 am)
Re: 2.6.25-rc2-mm1 (cciss build error), Randy Dunlap, (Mon Feb 18, 10:13 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Mon Feb 18, 12:35 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Laurent Riffard, (Mon Feb 18, 2:05 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Mon Feb 18, 2:12 pm)
Re: 2.6.25-rc2-mm1, Kevin Winchester, (Mon Feb 18, 5:08 pm)
Re: 2.6.25-rc2-mm1, Andrew Morton, (Mon Feb 18, 5:15 pm)
Re: 2.6.25-rc2-mm1, Steven Rostedt, (Mon Feb 18, 5:22 pm)
Re: 2.6.25-rc2-mm1, Kevin Winchester, (Mon Feb 18, 6:15 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Thomas Petazzoni, (Tue Feb 19, 8:55 am)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Randy Dunlap, (Tue Feb 19, 10:41 am)
Re: 2.6.25-rc2-mm1: build failure (x86), Russell Leidich, (Tue Feb 19, 11:51 am)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Thomas Petazzoni, (Tue Feb 19, 3:00 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Randy Dunlap, (Tue Feb 19, 3:05 pm)
RE: 2.6.25-rc2-mm1: new create_proc_entry() users, Miller, Mike (OS Dev), (Tue Feb 19, 3:25 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Andrew Morton, (Tue Feb 19, 4:21 pm)
Re: 2.6.25-rc2-mm1: new create_proc_entry() users, Andrew Morton, (Tue Feb 19, 4:59 pm)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Thomas Petazzoni, (Wed Feb 20, 12:21 am)
Re: 2.6.25-rc2-mm1 (x64 thermal build failure), Andrew Morton, (Wed Feb 20, 2:55 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Tilman Schmidt, (Wed Feb 20, 2:14 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Patrick McHardy, (Wed Feb 20, 2:50 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Patrick McHardy, (Thu Feb 21, 4:28 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Andrew Morton, (Thu Feb 21, 5:38 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Stephen Hemminger, (Thu Feb 21, 9:32 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Patrick McHardy, (Thu Feb 21, 9:34 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Christoph Hellwig, (Thu Feb 21, 9:46 am)
Re: [BUILD_FAILURE] 2.6.25-rc2-mm1 - Build Failure at acpi_os, Nish Aravamudan, (Thu Feb 21, 11:54 am)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Dave Hansen, (Thu Feb 21, 12:36 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Tilman Schmidt, (Thu Feb 21, 5:10 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Tilman Schmidt, (Thu Feb 21, 5:40 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Tilman Schmidt, (Thu Feb 21, 5:52 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Paul E. McKenney, (Fri Feb 22, 10:09 am)
Re: [BUILD_FAILURE] 2.6.25-rc2-mm1 - Build Failure at acpi_os, Nish Aravamudan, (Fri Feb 22, 11:12 am)
Re: [BUILD_FAILURE] 2.6.25-rc2-mm1 - Build Failure at acpi_os, Nish Aravamudan, (Fri Feb 22, 11:21 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Sat Feb 23, 7:50 pm)
Re: 2.6.25-rc2-mm1 - several bugs and a crash, Tilman Schmidt, (Mon Feb 25, 1:54 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Mon Feb 25, 3:44 pm)
Re: nf_conntrack fix smp_processor_id() in preemptible code, Patrick McHardy, (Wed Feb 27, 9:47 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Mirco Tischler, (Sat Mar 1, 8:40 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Fabio Checconi, (Sun Mar 2, 8:53 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Arjan van de Ven, (Sun Mar 2, 9:58 am)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Laurent Riffard, (Sun Mar 2, 1:40 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Mirco Tischler, (Sun Mar 2, 4:35 pm)
Re: 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129, Fabio Checconi, (Mon Mar 3, 3:21 am)