diff options
author | Roland Dreier <rdreier@cisco.com> | 2008-12-30 23:18:00 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-02 15:52:39 -0500 |
commit | 79ff56ebd3edfb16f8badc558cb439b203a3298f (patch) | |
tree | 4d235b9c173f7593ff240930478c987ec3c90bef | |
parent | b840d79631c882786925303c2b0f4fefc31845ed (diff) |
swiotlb: add missing __init annotations
Impact: cleanup, reduce kernel size a bit
The current kernel build warns:
WARNING: vmlinux.o(.text+0x11458): Section mismatch in reference from the function swiotlb_alloc_boot() to the function .init.text:__alloc_bootmem_low()
The function swiotlb_alloc_boot() references
the function __init __alloc_bootmem_low().
This is often because swiotlb_alloc_boot lacks a __init
annotation or the annotation of __alloc_bootmem_low is wrong.
WARNING: vmlinux.o(.text+0x1011f2): Section mismatch in reference from the function swiotlb_late_init_with_default_size() to the function .init.text:__alloc_bootmem_low()
The function swiotlb_late_init_with_default_size() references
the function __init __alloc_bootmem_low().
This is often because swiotlb_late_init_with_default_size lacks a __init
annotation or the annotation of __alloc_bootmem_low is wrong.
and indeed the functions calling __alloc_bootmem_low() can be marked
__init as well.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/pci-swiotlb_64.c | 2 | ||||
-rw-r--r-- | lib/swiotlb.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c index 242c3440687f..8cba3749a511 100644 --- a/arch/x86/kernel/pci-swiotlb_64.c +++ b/arch/x86/kernel/pci-swiotlb_64.c | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | int swiotlb __read_mostly; | 14 | int swiotlb __read_mostly; |
15 | 15 | ||
16 | void *swiotlb_alloc_boot(size_t size, unsigned long nslabs) | 16 | void * __init swiotlb_alloc_boot(size_t size, unsigned long nslabs) |
17 | { | 17 | { |
18 | return alloc_bootmem_low_pages(size); | 18 | return alloc_bootmem_low_pages(size); |
19 | } | 19 | } |
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index fa2dc4e5f9ba..b6d0aae4fd31 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -116,7 +116,7 @@ setup_io_tlb_npages(char *str) | |||
116 | __setup("swiotlb=", setup_io_tlb_npages); | 116 | __setup("swiotlb=", setup_io_tlb_npages); |
117 | /* make io_tlb_overflow tunable too? */ | 117 | /* make io_tlb_overflow tunable too? */ |
118 | 118 | ||
119 | void * __weak swiotlb_alloc_boot(size_t size, unsigned long nslabs) | 119 | void * __weak __init swiotlb_alloc_boot(size_t size, unsigned long nslabs) |
120 | { | 120 | { |
121 | return alloc_bootmem_low_pages(size); | 121 | return alloc_bootmem_low_pages(size); |
122 | } | 122 | } |