Skip to contentSkip to conversation

acpi: eliminate section mismatch warning

PATCH New Stephen Hemminger 1 participant 1 message Apr 4, 2006 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: eliminate section mismatch warning

Fix the linker warning (noise) from section mismatch in ACPI caused because the function acpi_processor_power_init's references can't be evaluated at compile time. It uses "first_run" flag and therefore changes behaviour after first use, and compiler/linker can't see that.

This does cost slightly more dead data.

drivers/acpi/processor_idle.c +5 -3
@@ -94,9 +94,11 @@ static int set_max_cstate(struct dmi_sys
 	return 0;
 }
 
-/* Actually this shouldn't be __cpuinitdata, would be better to fix the
-   callers to only run once -AK */
-static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
+/* This used to be __cpuinitdata but then linker would complain about
+   section mismatch because of the first_run flag;
+   would be better to fix thecallers to only run once
+ */
+static struct dmi_system_id processor_power_dmi_table[] = {
 	{ set_max_cstate, "IBM ThinkPad R40e", {
 	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
 	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1},