[POWERPC] Fix section mismatch in PCI code
Create a helper function (alloc_maybe_bootmem) that is marked __init_refok to limit the chances of mistakenly referring to other __init routines. WARNING: vmlinux.o(.text+0x2a9c4): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.update_dn_pci_info' and '.pci_dn_reconfig_notifier') WARNING: vmlinux.o(.text+0x36430): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.mpic_msi_init_allocator' and '.find_ht_magic_addr') WARNING: vmlinux.o(.text+0x5e804): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config') WARNING: vmlinux.o(.text+0x5e8e8): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config') WARNING: vmlinux.o(.text+0x5e968): Section mismatch: reference to .init.text:.__alloc_bootmem (between '.celleb_setup_phb' and '.celleb_fake_pci_write_config') Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Esse commit está contido em:

commit de
Paul Mackerras

pai
ee983079ce
commit
7b2c3c5b1d
@@ -7,7 +7,7 @@ EXTRA_CFLAGS += -mno-minimal-toc
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PPC_MERGE),y)
|
||||
obj-y := string.o
|
||||
obj-y := string.o alloc.o
|
||||
obj-$(CONFIG_PPC32) += div64.o copy_32.o checksum_32.o
|
||||
endif
|
||||
|
||||
|
14
arch/powerpc/lib/alloc.c
Arquivo normal
14
arch/powerpc/lib/alloc.c
Arquivo normal
@@ -0,0 +1,14 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/bootmem.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
|
||||
void * __init_refok alloc_maybe_bootmem(size_t size, gfp_t mask)
|
||||
{
|
||||
if (mem_init_done)
|
||||
return kmalloc(size, mask);
|
||||
else
|
||||
return alloc_bootmem(size);
|
||||
}
|
Referência em uma nova issue
Block a user