aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-03-16 16:07:36 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-03-16 16:07:36 -0400
commit43999d9e4e3133bfe0a55589037796386b012a68 (patch)
tree1cb434329b2fcd2feb961f2baf2100547af5305f
parent302cf930cbcc6ca24d7e00cffde3d93534ea5405 (diff)
[PATCH] x86-64: fix section mismatch warnings
Fix the following section mismatch warnings on x86_64: (build using defconfig) WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:mtrr_bp_init from .text between 'identify_cpu' (at offset 0x65eb) and 'IRQ0x20_interrupt' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'finish_e820_parsing' (at offset 0x7dc2) and 'early_panic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:e820_print_map from .text between 'finish_e820_parsing' (at offset 0x7de1) and 'early_panic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'acpi_unmap_lsapic' (at offset 0xc88f) and 'acpi_register_ioapic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:disabled_cpus from .text between 'MP_processor_info' (at offset 0x11f35) and 'mp_register_lapic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f6e) and 'mp_register_lapic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f93) and 'mp_register_lapic' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x15517) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x1552c) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x1553d) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15552) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15561) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15577) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_force from .text between 'gart_parse_options' (at offset 0x1558a) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_order from .text between 'gart_parse_options' (at offset 0x155bf) and 'iommu_full' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16344) and 'via_bugs' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16356) and 'via_bugs' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'via_bugs' (at offset 0x16380) and 'nvidia_bugs' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_disabled from .text between 'via_bugs' (at offset 0x16397) and 'nvidia_bugs' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_use_timer_override from .text between 'nvidia_bugs' (at offset 0x163a7) and 'arch_unregister_cpu' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:nvidia_hpet_check from .text between 'nvidia_bugs' (at offset 0x163b1) and 'arch_unregister_cpu' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163be) and 'arch_unregister_cpu' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163d1) and 'arch_unregister_cpu' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_skip_timer_override from .text between 'nvidia_bugs' (at offset 0x163e1) and 'arch_unregister_cpu' WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:quirk_intel_irqbalance from .text between 'intel_bugs' (at offset 0x1633c) and 'ati_bugs' But adds: WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:get_mtrr_state from .text between 'mtrr_bp_init' (at offset 0xb887) and 'ipi_handler' The warnings does not show up during a normal build due to kbuild failing to check for section mismatch in vmlinux. To see these warnings run: scripts/mod/modpost arch/x86_64/kernel/built-in.o kbuild will be fixed but the 'noise-level' had to be decresed first. There remains a few section mismatch warnigns for x86_64 for areas where I did not feel confident. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r--arch/x86_64/kernel/e820.c2
-rw-r--r--arch/x86_64/kernel/early-quirks.c8
-rw-r--r--arch/x86_64/kernel/mpparse.c4
-rw-r--r--arch/x86_64/kernel/pci-gart.c2
-rw-r--r--include/asm-x86_64/proto.h2
-rw-r--r--include/asm-x86_64/smp.h3
6 files changed, 11 insertions, 10 deletions
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 4651fd22b213..a490fabfcf47 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -662,7 +662,7 @@ static int __init parse_memmap_opt(char *p)
662} 662}
663early_param("memmap", parse_memmap_opt); 663early_param("memmap", parse_memmap_opt);
664 664
665void finish_e820_parsing(void) 665void __init finish_e820_parsing(void)
666{ 666{
667 if (userdef) { 667 if (userdef) {
668 printk(KERN_INFO "user-defined physical RAM map:\n"); 668 printk(KERN_INFO "user-defined physical RAM map:\n");
diff --git a/arch/x86_64/kernel/early-quirks.c b/arch/x86_64/kernel/early-quirks.c
index dec587b293bf..148c6bcf5bb4 100644
--- a/arch/x86_64/kernel/early-quirks.c
+++ b/arch/x86_64/kernel/early-quirks.c
@@ -16,7 +16,7 @@
16#include <asm/proto.h> 16#include <asm/proto.h>
17#include <asm/dma.h> 17#include <asm/dma.h>
18 18
19static void via_bugs(void) 19static void __init via_bugs(void)
20{ 20{
21#ifdef CONFIG_IOMMU 21#ifdef CONFIG_IOMMU
22 if ((end_pfn > MAX_DMA32_PFN || force_iommu) && 22 if ((end_pfn > MAX_DMA32_PFN || force_iommu) &&
@@ -36,7 +36,7 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header)
36} 36}
37#endif 37#endif
38 38
39static void nvidia_bugs(void) 39static void __init nvidia_bugs(void)
40{ 40{
41#ifdef CONFIG_ACPI 41#ifdef CONFIG_ACPI
42 /* 42 /*
@@ -62,7 +62,7 @@ static void nvidia_bugs(void)
62 62
63} 63}
64 64
65static void ati_bugs(void) 65static void __init ati_bugs(void)
66{ 66{
67 if (timer_over_8254 == 1) { 67 if (timer_over_8254 == 1) {
68 timer_over_8254 = 0; 68 timer_over_8254 = 0;
@@ -88,7 +88,7 @@ struct chipset {
88 void (*f)(void); 88 void (*f)(void);
89}; 89};
90 90
91static struct chipset early_qrk[] = { 91static struct __initdata chipset early_qrk[] = {
92 { PCI_VENDOR_ID_NVIDIA, nvidia_bugs }, 92 { PCI_VENDOR_ID_NVIDIA, nvidia_bugs },
93 { PCI_VENDOR_ID_VIA, via_bugs }, 93 { PCI_VENDOR_ID_VIA, via_bugs },
94 { PCI_VENDOR_ID_ATI, ati_bugs }, 94 { PCI_VENDOR_ID_ATI, ati_bugs },
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 50dd8bef850e..455aa0b932f0 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -60,9 +60,9 @@ unsigned long mp_lapic_addr = 0;
60/* Processor that is doing the boot up */ 60/* Processor that is doing the boot up */
61unsigned int boot_cpu_id = -1U; 61unsigned int boot_cpu_id = -1U;
62/* Internal processor count */ 62/* Internal processor count */
63unsigned int num_processors __initdata = 0; 63unsigned int num_processors __cpuinitdata = 0;
64 64
65unsigned disabled_cpus __initdata; 65unsigned disabled_cpus __cpuinitdata;
66 66
67/* Bitmask of physically existing CPUs */ 67/* Bitmask of physically existing CPUs */
68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; 68physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE;
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 030eb3753358..2bac8c60ad61 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -675,7 +675,7 @@ void __init gart_iommu_init(void)
675 dma_ops = &gart_dma_ops; 675 dma_ops = &gart_dma_ops;
676} 676}
677 677
678void gart_parse_options(char *p) 678void __init gart_parse_options(char *p)
679{ 679{
680 int arg; 680 int arg;
681 681
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h
index f54f3abf93ce..b6e65a699f2a 100644
--- a/include/asm-x86_64/proto.h
+++ b/include/asm-x86_64/proto.h
@@ -99,7 +99,7 @@ extern int force_iommu, no_iommu;
99extern int iommu_detected; 99extern int iommu_detected;
100#ifdef CONFIG_IOMMU 100#ifdef CONFIG_IOMMU
101extern void gart_iommu_init(void); 101extern void gart_iommu_init(void);
102extern void gart_parse_options(char *); 102extern void __init gart_parse_options(char *);
103extern void iommu_hole_init(void); 103extern void iommu_hole_init(void);
104extern int fallback_aper_order; 104extern int fallback_aper_order;
105extern int fallback_aper_force; 105extern int fallback_aper_force;
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index e17b9ec42e98..de592a408c07 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -7,6 +7,7 @@
7#include <linux/threads.h> 7#include <linux/threads.h>
8#include <linux/cpumask.h> 8#include <linux/cpumask.h>
9#include <linux/bitops.h> 9#include <linux/bitops.h>
10#include <linux/init.h>
10extern int disable_apic; 11extern int disable_apic;
11 12
12#include <asm/fixmap.h> 13#include <asm/fixmap.h>
@@ -68,7 +69,7 @@ extern int __cpu_disable(void);
68extern void __cpu_die(unsigned int cpu); 69extern void __cpu_die(unsigned int cpu);
69extern void prefill_possible_map(void); 70extern void prefill_possible_map(void);
70extern unsigned num_processors; 71extern unsigned num_processors;
71extern unsigned disabled_cpus; 72extern unsigned __cpuinitdata disabled_cpus;
72 73
73#define NO_PROC_ID 0xFF /* No processor magic marker */ 74#define NO_PROC_ID 0xFF /* No processor magic marker */
74 75