public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Some section mismatch in acpi_processor_power_init on ia64 build
@ 2006-03-28 23:09 Luck, Tony
  2006-03-29  0:00 ` Andi Kleen
  2006-03-29  0:16 ` Ashok Raj
  0 siblings, 2 replies; 4+ messages in thread
From: Luck, Tony @ 2006-03-28 23:09 UTC (permalink / raw)
  To: Raj, Ashok; +Cc: Andi Kleen, linux-kernel

I've only just noticed these warnings when building ia64 !SMP or
!HOTPLUG_CPU
kernels:

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'

According to git bisect, they began with Matt Domsch's "ia64: use i386
dmi_scan.c"
patch (commit 3ed3bce8), but it appears that the real issue may be
further back when
Ashok Raj marked processor_power_dmi_table as __cpuinitdata in 7ded5689
with a
cryptic comment by AK (Andi Kleen?):
  /* Actually this shouldn't be __cpuinitdata, would be better to fix
the
     callers to only run once -AK */

-Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Some section mismatch in acpi_processor_power_init on ia64 build
  2006-03-28 23:09 Some section mismatch in acpi_processor_power_init on ia64 build Luck, Tony
@ 2006-03-29  0:00 ` Andi Kleen
  2006-03-29  0:58   ` Luck, Tony
  2006-03-29  0:16 ` Ashok Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2006-03-29  0:00 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Raj, Ashok, linux-kernel

On Wednesday 29 March 2006 01:09, Luck, Tony wrote:
> I've only just noticed these warnings when building ia64 !SMP or
> !HOTPLUG_CPU
> kernels:
> 
> 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.

> 
> According to git bisect, they began with Matt Domsch's "ia64: use i386
> dmi_scan.c"
> patch (commit 3ed3bce8), but it appears that the real issue may be
> further back when
> Ashok Raj marked processor_power_dmi_table as __cpuinitdata in 7ded5689
> with a
> cryptic comment by AK (Andi Kleen?):
>   /* 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?

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Some section mismatch in acpi_processor_power_init on ia64 build
  2006-03-28 23:09 Some section mismatch in acpi_processor_power_init on ia64 build Luck, Tony
  2006-03-29  0:00 ` Andi Kleen
@ 2006-03-29  0:16 ` Ashok Raj
  1 sibling, 0 replies; 4+ messages in thread
From: Ashok Raj @ 2006-03-29  0:16 UTC (permalink / raw)
  To: Luck, Tony; +Cc: Raj, Ashok, Andi Kleen, linux-kernel

On Tue, Mar 28, 2006 at 03:09:36PM -0800, Luck, Tony wrote:
> I've only just noticed these warnings when building ia64 !SMP or
> !HOTPLUG_CPU
> kernels:
> 
> 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'
> 
> According to git bisect, they began with Matt Domsch's "ia64: use i386
> dmi_scan.c"
> patch (commit 3ed3bce8), but it appears that the real issue may be
> further back when
> Ashok Raj marked processor_power_dmi_table as __cpuinitdata in 7ded5689
> with a
> cryptic comment by AK (Andi Kleen?):
>   /* Actually this shouldn't be __cpuinitdata, would be better to fix
> the
>      callers to only run once -AK */
> 
> -Tony

Humm.. originally they were marked as __initdata, but for CPU hotplug we call it
when processor gets hot plugged. So i changed it to __cpuinitdata so that when we use
cpu hotplug they stay resident.

the only reference is to that table is from acpi_processor_power_init(), that gets called 
currently only from acpi_processor_start().

the code is either compiled in kernel (which means it will be all thrown after free
init mem if !HOTPLUG_CPU) or if this is a module code, then __initdata/cpuinit doesnt 
make a difference.

possibly acpi_processor_start(), acpi_processor_power_init() etc should also be
__cpuinit, which would make the warning go away. 

Are there any others i missed Andi? maybe this is a general watch out comment, but 
he knows better.

-- 
Cheers,
Ashok Raj
- Open Source Technology Center

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Some section mismatch in acpi_processor_power_init on ia64 build
  2006-03-29  0:00 ` Andi Kleen
@ 2006-03-29  0:58   ` Luck, Tony
  0 siblings, 0 replies; 4+ messages in thread
From: Luck, Tony @ 2006-03-29  0:58 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Raj, Ashok, linux-kernel

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-29  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28 23:09 Some section mismatch in acpi_processor_power_init on ia64 build Luck, Tony
2006-03-29  0:00 ` Andi Kleen
2006-03-29  0:58   ` Luck, Tony
2006-03-29  0:16 ` Ashok Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox