]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[IA64] fix a few section mismatch warnings
authorSam Ravnborg <sam@ravnborg.org>
Mon, 30 Jul 2007 20:50:13 +0000 (22:50 +0200)
committerTony Luck <tony.luck@intel.com>
Mon, 30 Jul 2007 23:15:50 +0000 (16:15 -0700)
Fix the following section mismatch warnings:

WARNING: vmlinux.o(.text+0x41902): Section mismatch: reference to .init.text:__alloc_bootmem (between 'ia64_mca_cpu_init' and 'ia64_do_tlb_purge')
WARNING: vmlinux.o(.text+0x49222): Section mismatch: reference to .init.text:__alloc_bootmem (between 'register_intr' and 'iosapic_register_intr')
WARNING: vmlinux.o(.text+0x62beb2): Section mismatch: reference to .init.text:__alloc_bootmem_node (between 'hubdev_init_node' and 'cnodeid_get_geoid')

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c
arch/ia64/kernel/mca.c
arch/ia64/sn/kernel/io_common.c

index 91e6dc1e7baf8d37ddd91c340c0b8c753cfed16d..f4bd285effe6022ae93adf2663959f828f8528a6 100644 (file)
@@ -560,7 +560,7 @@ iosapic_reassign_vector (int irq)
        }
 }
 
-static struct iosapic_rte_info *iosapic_alloc_rte (void)
+static struct iosapic_rte_info * __init_refok iosapic_alloc_rte (void)
 {
        int i;
        struct iosapic_rte_info *rte;
index 4b5daa3cc0feab6723764d67a7c221e74e5b3eb3..ff28620cb992c7eb846f6ab2628b095d2ad41fca 100644 (file)
@@ -1750,8 +1750,17 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
        strncpy(p->comm, type, sizeof(p->comm)-1);
 }
 
-/* Do per-CPU MCA-related initialization.  */
+/* Caller prevents this from being called after init */
+static void * __init_refok mca_bootmem(void)
+{
+       void *p;
 
+       p = alloc_bootmem(sizeof(struct ia64_mca_cpu) * NR_CPUS +
+                         KERNEL_STACK_SIZE);
+       return (void *)ALIGN((unsigned long)p, KERNEL_STACK_SIZE);
+}
+
+/* Do per-CPU MCA-related initialization.  */
 void __cpuinit
 ia64_mca_cpu_init(void *cpu_data)
 {
@@ -1763,11 +1772,7 @@ ia64_mca_cpu_init(void *cpu_data)
                int cpu;
 
                first_time = 0;
-               mca_data = alloc_bootmem(sizeof(struct ia64_mca_cpu)
-                                        * NR_CPUS + KERNEL_STACK_SIZE);
-               mca_data = (void *)(((unsigned long)mca_data +
-                                       KERNEL_STACK_SIZE - 1) &
-                               (-KERNEL_STACK_SIZE));
+               mca_data = mca_bootmem();
                for (cpu = 0; cpu < NR_CPUS; cpu++) {
                        format_mca_init_stack(mca_data,
                                        offsetof(struct ia64_mca_cpu, mca_stack),
index 787ed642dd49a876607fa5e0f34d58bf50ddc281..4594770e685a300dbb2ce3e85ab845829a1cf289 100644 (file)
@@ -391,7 +391,7 @@ void sn_bus_free_sysdata(void)
  * hubdev_init_node() - Creates the HUB data structure and link them to it's
  *                     own NODE specific data area.
  */
-void hubdev_init_node(nodepda_t * npda, cnodeid_t node)
+void __init hubdev_init_node(nodepda_t * npda, cnodeid_t node)
 {
        struct hubdev_info *hubdev_info;
        int size;