Re: Some section mismatch in acpi_processor_power_init on ia64 build

From: Luck, Tony
Date: Tue Mar 28 2006 - 20:09:46 EST


On Wed, Mar 29, 2006 at 02:00:55AM +0200, Andi Kleen wrote:
> > WARNING: drivers/acpi/processor.o - Section mismatch: reference to
> > .init.data: from .text between 'acpi_processor_power_init' (at offset
> > 0x5040) and 'acpi_processor_power_exit'
> > WARNING: drivers/acpi/processor.o - Section mismatch: reference to
> > .init.data: from .text between 'acpi_processor_power_init' (at offset
> > 0x5050) and 'acpi_processor_power_exit'
>
> These functions need to be marked __cpuinit I guess. I doubt they
> run without new CPUs.

Marking acpi_processor_power_init() as __cpuinit produced a complaint about
a section mismatch in acpi_processor_start(). Marking that __cpuinit fixed
things for me (patch at end of this e-mail, only compile tested on one ia64
config).
> > /* Actually this shouldn't be __cpuinitdata, would be better to fix the
> > callers to only run once -AK */
>
> Yes that's me. What is cryptic?

Perhaps it wasn't the comment that was baffling me, I was just generally
confused at this point.


diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 713b763..2dedc59 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -533,7 +533,7 @@ #endif

static void *processor_device_array[NR_CPUS];

-static int acpi_processor_start(struct acpi_device *device)
+static int __cpuinit acpi_processor_start(struct acpi_device *device)
{
int result = 0;
acpi_status status = AE_OK;
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 80fa434..106d6f3 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1077,7 +1077,7 @@ static struct file_operations acpi_proce
.release = single_release,
};

-int acpi_processor_power_init(struct acpi_processor *pr,
+int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
struct acpi_device *device)
{
acpi_status status = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/