Skip to contentSkip to conversation

ia64-acpi section mismatch

PATCH In review Randy Dunlap 4 participants 5 messages May 24, 2007 – May 31, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64-acpi section mismatch

From: Randy Dunlap <[email protected]>

On 2.6.22-rc2-git5:
WARNING: arch/ia64/kernel/built-in.o(.text+0x12): Section mismatch: reference to .init.text:acpi_find_rsdp (between 'acpi_get_sysname' and 'acpi_request_vector')

Looks like acpi_get_sysname() can be marked __init...

---
 arch/ia64/kernel/acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/kernel/acpi.c +1 -1
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(pm_power_off);
 unsigned int acpi_cpei_override;
 unsigned int acpi_cpei_phys_cpuid;
 
-const char *acpi_get_sysname(void)
+const char * __init acpi_get_sysname(void)
 {
 #ifdef CONFIG_IA64_GENERIC
 	unsigned long rsdp_phys;
#1 lore raw
Quoted 1 line

Looks like acpi_get_sysname() can be marked __init...

Agreed ... in fact I checked that into my local tree about 20 minutes ago. Haven't pushed it out yet.

The "Section mismatch" whack-a-mole game is almost over. With this change applied the only one I have left is:

Section mismatch: reference to .init.text:acpi_map_pxm_to_node (between 'acpi_get_node' and 'acpi_lock_ac_dir')

for which the answer *appears* to be to drop the __cpuinit attribute on acpi_map_pxm_to_node()

-Tony

#2 lore raw

PATCH 1/1 Section mismatch ... acpi_map_pxm_to_node

Last of the "Section mismatch" errors from ia64 builds! acpi_map_pxm_to_node() is defined with attribute __cpuinit, but is called by "normal" kernel functions acpi_getnode() and acpi_map_cpu2node().

Commit f363d16fbb9374c0bd7f2757d412c287169094c9 moved the data structures on which this routine operates from __cpuinitdata to regular memory, so this routine can also move out of init space.

---

drivers/acpi/numa.c +1 -1
index a2efae8..0c9f15c 100644
@@ -59,7 +59,7 @@ int node_to_pxm(int node)
 	return node_to_pxm_map[node];
 }
 
-int __cpuinit acpi_map_pxm_to_node(int pxm)
+int acpi_map_pxm_to_node(int pxm)
 {
 	int node = pxm_to_node_map[pxm];
 
include/acpi/acpi_numa.h +1 -1
index b62cd36..e2fcee2 100644
@@ -13,7 +13,7 @@
 
 extern int pxm_to_node(int);
 extern int node_to_pxm(int);
-extern int __cpuinit acpi_map_pxm_to_node(int);
+extern int acpi_map_pxm_to_node(int);
 extern void __cpuinit acpi_unmap_pxm_to_node(int);
 
 #endif				/* CONFIG_ACPI_NUMA */
reviewer Applied
#3 lore raw

Re: [PATCH] Section mismatch ... acpi_map_pxm_to_node

Applied.

thanks,
-Len

Quoted 43 lines · Tony

Last of the "Section mismatch" errors from ia64 builds! acpi_map_pxm_to_node() is defined with attribute __cpuinit, but is called by "normal" kernel functions acpi_getnode() and acpi_map_cpu2node().

Commit f363d16fbb9374c0bd7f2757d412c287169094c9 moved the data structures on which this routine operates from __cpuinitdata to regular memory, so this routine can also move out of init space.

---

drivers/acpi/numa.c +1 -1
index a2efae8..0c9f15c 100644
@@ -59,7 +59,7 @@ int node_to_pxm(int node)
 	return node_to_pxm_map[node];
 }
 
-int __cpuinit acpi_map_pxm_to_node(int pxm)
+int acpi_map_pxm_to_node(int pxm)
 {
 	int node = pxm_to_node_map[pxm];
 
include/acpi/acpi_numa.h +1 -2
index b62cd36..e2fcee2 100644
@@ -13,7 +13,7 @@
 
 extern int pxm_to_node(int);
 extern int node_to_pxm(int);
-extern int __cpuinit acpi_map_pxm_to_node(int);
+extern int acpi_map_pxm_to_node(int);
 extern void __cpuinit acpi_unmap_pxm_to_node(int);
 
 #endif				/* CONFIG_ACPI_NUMA */
-

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to Randy Dunlap
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

On 2.6.22-rc2-git5:
WARNING: arch/ia64/kernel/built-in.o(.text+0x12): Section mismatch: reference to .init.text:acpi_find_rsdp (between 'acpi_get_sysname' and 'acpi_request_vector')

Looks like acpi_get_sysname() can be marked __init...

It seems like Tony has put the same fix in.
In any case, no warnings over here on
Linus' 1c1ee4c3e7e16d23166a624a132889df3c540a18

Signature · 3 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/