Detecting section mismatches in vmlinux
Until 2.6.16 or so, we had reference_init.pl and reference_discarded.pl to check section mismatches in vmlinux.
Are there any alternatives of this in recent kernel?
Now "modpost vmlinux" is executed during normal build, but it seems the pass can not detect these mismatches.
For example:
$ ../build-i386/scripts/mod/modpost ../build-i386/mm/built-in.o WARNING: ../build-i386/mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x18382) and '__kmem_cache_destroy'
set_up_list3s() in slab.c is not marked as __init and it references initkmem_list3[] which is marked as __initdata. So it is not false positive. But "modpost vmlinux" does not report it.
---
Atsushi Nemoto
Quoted 6 lines · Atsushi Nemoto
$ ../build-i386/scripts/mod/modpost ../build-i386/mm/built-in.o WARNING: ../build-i386/mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x18382) and '__kmem_cache_destroy'
set_up_list3s()inslab.cis not marked as__initand it references initkmem_list3[] which is marked as__initdata. So it is not false positive. But "modpost vmlinux" does not report it.
For this set_up_list3s() case, it is not a fatal since it is only called during early bootstrap phase. But anyway I think we should detect these case at compile time.
I found refenrence_*.pl was removed on these commits at 2.6.17:
Quoted 11 lines
commit
eae0f536f640bb95f2ad437a57c40c7d5683d1acAuthor: Sam Ravnborg <[email protected]> Date: Tue Mar 21 07:28:24 2006 +0100kbuild: remove obsoleted
scripts/reference_*filescommit
b39927cf4cc5a9123d2b157ffd396884cb8156ebAuthor: Sam Ravnborg <[email protected]> Date: Fri Feb 17 22:42:02 2006 +0100kbuild: check for section mismatch during modpost stage
Reviving these perl scripts looks overkill for me.
This is a dirty hack to check all built-in.o just after linking vmlinux. But this can not detect mismatches in libs.a files, and modpost fails with "... is truncated" message on empty built-in.o files.
Maybe checking at each $(LD) invocation should detect all mismatches, but I'm not familer with kbuild to do it by myself. Could someone make perfect solution?
Makefile +1 -0
@@ -738,6 +738,7 @@ ifdef CONFIG_HEADERS_CHECK endif $(call if_changed_rule,vmlinux__) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@ + -scripts/mod/modpost $(filter-out $(libs-y1),$(vmlinux-init) $(vmlinux-main)) $(Q)rm -f .old_version # The actual objects are generated when descending,
---
Atsushi Nemoto
Quoted 9 lines · Atsushi Nemoto
This is a dirty hack to check all built-in.o just after linking vmlinux. But this can not detect mismatches in libs.a files, and modpost fails with "... is truncated" message on empty built-in.o files.
Maybe checking at each $(LD) invocation should detect all mismatches, but I'm not familer with kbuild to do it by myself. Could someone make perfect solution?
I would prefer to find out why it fails when running the check on full vmlinux.
Your suggestion is like papering over the real bug - and only if something prevent us from detecting this in full vmlinux should we do it for each LD invocation.
Sam
Hi Atsushi-san
Quoted 7 lines · Atsushi Nemoto
Quoted 6 lines · Atsushi Nemoto
$ ../build-i386/scripts/mod/modpost ../build-i386/mm/built-in.o WARNING: ../build-i386/mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x18382) and '__kmem_cache_destroy'
set_up_list3s()inslab.cis not marked as__initand it references initkmem_list3[] which is marked as__initdata. So it is not false positive. But "modpost vmlinux" does not report it.
Correct- modpost vmlinux lacks relocation infomration info in vmlinux so it will not report these errors.
Quoted 3 lines
Maybe checking at each $(LD) invocation should detect all mismatches, but I'm not familer with kbuild to do it by myself. Could someone make perfect solution?
Attached patch does:
1) Do not check vmlinux but check all .o files that is used to create vmlinux
2) Teach modpost to skip non-elf files (.a files and empty .o files etc)
With this change we get proper check of vmlinux (or files used to create vmlinux)
This gives following errors in a x86_64 defconfig build:
WARNING: init/built-in.o - Section mismatch: reference to .init.text:init from .text between 'rest_init' (at offset 0xe) and 'run_init_process'
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.text:stop_timer_interrupt from .text between 'setup_APIC_timer' (at offset 0xfcbc) and 'setup_secondary_APIC_clock'
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'
WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x1e6fb) and 'slab_get_obj'
WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x1e71c) and 'slab_get_obj'
WARNING: lib/built-in.o - Section mismatch: reference to .init.text:swiotlb_init from __ksymtab between '__ksymtab_swiotlb_init' (at offset 0x3a0) and '__ksymtab_swiotlb_map_single'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:quirk_ide_samemode from .pci_fixup_early between '__pci_fixup_PCI_VENDOR_ID_INTELPCI_DEVICE_ID_INTEL_82801CA_10quirk_ide_samemode' (at offset 0x18) and '__pci_fixup_PCI_VENDOR_ID_JMICRONPCI_ANY_IDquirk_jmicron_dualfn'
Before pushing this patch the above list needs to be smaller :-( I have not yet looked into the list.
Sam
Makefile +1 -0
@@ -603,6 +603,7 @@ vmlinux-init := $(head-y) $(init-y) vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) vmlinux-all := $(vmlinux-init) $(vmlinux-main) vmlinux-lds := arch/$(ARCH)/kernel/vmlinux.lds +export KBUILD_VMLINUX_OBJS := $(vmlinux-all) # Rule to link vmlinux - also used during CONFIG_KALLSYMS # May be overridden by arch/$(ARCH)/Makefile
scripts/Makefile.modpost +3 -4
@@ -63,15 +63,14 @@ quiet_cmd_modpost = MODPOST $(words $(fi $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ - $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \ - $(wildcard vmlinux) $(filter-out FORCE,$^) + $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) PHONY += __modpost __modpost: $(modules:.ko=.o) FORCE - $(call cmd,modpost) + $(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^) quiet_cmd_kernel-mod = MODPOST $@ - cmd_kernel-mod = $(cmd_modpost) + cmd_kernel-mod = $(cmd_modpost) $(KBUILD_VMLINUX_OBJS) vmlinux: FORCE $(call cmd,kernel-mod)
scripts/mod/modpost.c +22 -11
@@ -333,10 +333,10 @@ void release_file(void *file, unsigned lmunmap (file, size); } -static void parse_elf (struct elf_info *info,const char *filename) +static int parse_elf (struct elf_info *info,const char *filename) {unsigned int i; -Elf_Ehdr *hdr = info->hdr; +Elf_Ehdr *hdr;Elf_Shdr *sechdrs;Elf_Sym *sym;
@@ -346,8 +346,19 @@ static void parse_elf(struct elf_info *iexit (1 ); } info->hdr = hdr; -if (info->size <sizeof (*hdr)) - goto truncated; +/* Is this a valid ELF file? */ +if ((hdr->e_ident[EI_MAG0 ] !=ELFMAG0 ) || + (hdr->e_ident[EI_MAG1 ] !=ELFMAG1 ) || + (hdr->e_ident[EI_MAG2 ] !=ELFMAG2 ) || + (hdr->e_ident[EI_MAG3 ] !=ELFMAG3 )) { +/* Not an ELF file - silently ignore it */ +return 0 ; + } + +if (info->size <sizeof (*hdr)) { +/* file too small, assume this is an empty .o file */ +return 0 ; + }/* Fix endianness in ELF header */ hdr->e_shoff =TO_NATIVE (hdr->e_shoff);
@@ -371,8 +382,10 @@ static void parse_elf(struct elf_info *i = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;const char *secname; -if (sechdrs[i].sh_offset > info->size) - goto truncated; +if (sechdrs[i].sh_offset > info->size) { +fatal ("%s is truncated. sechdrs[i].sh_offset=%u > sizeof(*hrd)=%ul\n" , filename, (unsigned int )sechdrs[i].sh_offset,sizeof (*hdr)); +return 0 ; + } secname = secstrings + sechdrs[i].sh_name;if (strcmp (secname,".modinfo" ) ==0 ) { info->modinfo = (void *)hdr + sechdrs[i].sh_offset;
@@ -407,10 +420,7 @@ static void parse_elf(struct elf_info *i sym->st_value =TO_NATIVE (sym->st_value); sym->st_size =TO_NATIVE (sym->st_size); } -return ; - - truncated: -fatal ("%s is truncated.\n" , filename); +return 1 ; }static void parse_elf_finish (struct elf_info *info)
@@ -1088,7 +1098,8 @@ static void read_symbols(char *modname)struct elf_info info = { };Elf_Sym *sym; -parse_elf (&info, modname); +if (!parse_elf (&info, modname)) +return ; mod =new_module (modname);
Quoted 5 lines · Sam Ravnborg
Attached patch does:
1) Do not check vmlinux but check all .o files that is used to create vmlinux
2) Teach modpost to skip non-elf files (.a files and empty .o files etc)With this change we get proper check of vmlinux (or files used to create vmlinux)
Thanks! It works fine for me too.
Quoted 3 lines
This gives following errors in a
x86_64defconfig build:WARNING:
init/built-in.o- Section mismatch: reference to .init.text:init from .text between 'rest_init' (at offset0xe) and 'run_init_process'
This is because rest_init() (non __init) references 'init' (__init) as an argument of kernel_thread(). No idea how to avoid this warning...
Quoted 2 lines
WARNING:
mm/built-in.o- Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset0x1e6fb) and 'slab_get_obj'
WARNING:mm/built-in.o- Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset0x1e71c) and 'slab_get_obj'
This is because set_up_list3s() (non __init) references initkmem_list3[] (__initdata). The set_up_list3s() is only used on early stage so can be __init, but it cause an another mismatch --- setup_cpu_cache() (non __init) calls __init function. Some trick using a function pointer might solve this issue, but I wonder it is a right thing to do...
Or we need another whitelist for vmlinux?
---
Atsushi Nemoto
PATCH 1/1 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.
---
I only recently got my new dev machine running and has not yet installed cross-compile tools etc. so I do not know the status of other architectures.
Fro the mtrr changes I felt less confident then the rest and did not fix up the introduced warning for the same reason. Let me know if you have any hints.
Any easy way to get cross-compile tools on ubuntu other than using Dan Kegel's toolset or Linux Foundation precompield versions?
Sam
arch/i386/kernel/cpu/mtrr/main.c +1 -1
@@ -639,7 +639,7 @@ static struct sysdev_driver mtrr_sysdev_driver = {* initialized (i.e. before smp_init()). * */ -void __init mtrr_bp_init (void ) +void __cpuinit mtrr_bp_init (void ) {init_ifs ();
arch/x86_64/kernel/e820.c +1 -1
@@ -662,7 +662,7 @@ static int __init parse_memmap_opt(char *p) }early_param ("memmap" , parse_memmap_opt); -void finish_e820_parsing (void ) +void __init finish_e820_parsing (void ) {if (userdef) {printk (KERN_INFO "user-defined physical RAM map:\n" );
arch/x86_64/kernel/early-quirks.c +5 -5
@@ -16,7 +16,7 @@#include <asm/proto.h> #include <asm/dma.h> -static void via_bugs (void ) +static void __init via_bugs (void ) {#ifdef CONFIG_IOMMU if ((end_pfn > MAX_DMA32_PFN || force_iommu) &&
@@ -39,7 +39,7 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header) }#endif -static void nvidia_bugs (void ) +static void __init nvidia_bugs (void ) {#ifdef CONFIG_ACPI /*
@@ -69,7 +69,7 @@ static void nvidia_bugs(void) } -static void ati_bugs (void ) +static void __init ati_bugs (void ) {if (timer_over_8254 ==1 ) { timer_over_8254 =0 ;
@@ -78,7 +78,7 @@ static void ati_bugs(void) } } -static void intel_bugs (void ) +static void __init intel_bugs (void ) {u16 device =read_pci_config_16 (0 ,0 ,0 ,PCI_DEVICE_ID );
@@ -95,7 +95,7 @@ struct chipset {void (*f)(void ); }; -static struct chipset early_qrk[] = { +static struct __initdata chipset early_qrk[] = { {PCI_VENDOR_ID_NVIDIA , nvidia_bugs }, {PCI_VENDOR_ID_VIA , via_bugs }, {PCI_VENDOR_ID_ATI , ati_bugs },
arch/x86_64/kernel/mpparse.c +2 -2
@@ -60,9 +60,9 @@ unsigned long mp_lapic_addr = 0;/* Processor that is doing the boot up */ unsigned int boot_cpu_id =-1U ;/* Internal processor count */ -unsigned int num_processors__initdata =0 ; +unsigned int num_processors__cpuinitdata =0 ; -unsigned disabled_cpus__initdata ; +unsigned disabled_cpus__cpuinitdata ;/* Bitmask of physically existing CPUs */ physid_mask_t phys_cpu_present_map =PHYSID_MASK_NONE ;
arch/x86_64/kernel/pci-gart.c +1 -1
@@ -675,7 +675,7 @@ void __init gart_iommu_init(void) dma_ops = &gart_dma_ops; } -void gart_parse_options (char *p) +void __init gart_parse_options (char *p) {int arg;
include/asm-x86_64/proto.h +1 -1
@@ -99,7 +99,7 @@ extern int force_iommu, no_iommu;extern int iommu_detected;#ifdef CONFIG_IOMMU extern void gart_iommu_init (void ); -extern void gart_parse_options (char *); +extern void __init gart_parse_options (char *);extern void iommu_hole_init (void );extern int fallback_aper_order;extern int fallback_aper_force;
include/asm-x86_64/smp.h +2 -1
@@ -7,6 +7,7 @@#include <linux/threads.h> #include <linux/cpumask.h> #include <linux/bitops.h> +#include <linux/init.h> extern int disable_apic;#include <asm/fixmap.h>
@@ -68,7 +69,7 @@ extern int __cpu_disable(void);extern void __cpu_die (unsigned int cpu);extern void prefill_possible_map (void );extern unsigned num_processors; -extern unsigned disabled_cpus; +extern unsigned __cpuinitdata disabled_cpus;#define NO_PROC_ID 0xFF/* No processor magic marker */
Re: [PATCH] x86_64: fix section mismatch warnings
Quoted 3 lines · On Sun, 25 Feb 2007 21:53:02 +0100 Sam Ravnborg <[email protected]> wrote:
Any easy way to get cross-compile tools on ubuntu other than using Dan Kegel's toolset or Linux Foundation precompield versions?
Not that I know of - it's all rather non-trivial.
I have uploaded a bunch of precompiled cross-compilers for redhatty systems to http://userweb.kernel.org/~akpm/cross-compilers whcih give decent coverage.
(URL might be inaccurate: am typing offline)