diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sfi/sfi_core.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c index d3b496800477..251da2298b69 100644 --- a/drivers/sfi/sfi_core.c +++ b/drivers/sfi/sfi_core.c | |||
@@ -90,7 +90,11 @@ static struct sfi_table_simple *syst_va __read_mostly; | |||
90 | */ | 90 | */ |
91 | static u32 sfi_use_ioremap __read_mostly; | 91 | static u32 sfi_use_ioremap __read_mostly; |
92 | 92 | ||
93 | static void __iomem *sfi_map_memory(u64 phys, u32 size) | 93 | /* |
94 | * sfi_un/map_memory calls early_ioremap/iounmap which is a __init function | ||
95 | * and introduces section mismatch. So use __ref to make it calm. | ||
96 | */ | ||
97 | static void __iomem * __ref sfi_map_memory(u64 phys, u32 size) | ||
94 | { | 98 | { |
95 | if (!phys || !size) | 99 | if (!phys || !size) |
96 | return NULL; | 100 | return NULL; |
@@ -101,7 +105,7 @@ static void __iomem *sfi_map_memory(u64 phys, u32 size) | |||
101 | return early_ioremap(phys, size); | 105 | return early_ioremap(phys, size); |
102 | } | 106 | } |
103 | 107 | ||
104 | static void sfi_unmap_memory(void __iomem *virt, u32 size) | 108 | static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) |
105 | { | 109 | { |
106 | if (!virt || !size) | 110 | if (!virt || !size) |
107 | return; | 111 | return; |
@@ -213,12 +217,17 @@ static int sfi_table_check_key(struct sfi_table_header *th, | |||
213 | * the mapped virt address will be returned, and the virt space | 217 | * the mapped virt address will be returned, and the virt space |
214 | * will be released by call sfi_put_table() later | 218 | * will be released by call sfi_put_table() later |
215 | * | 219 | * |
220 | * This two cases are from two different functions with two different | ||
221 | * sections and causes section mismatch warning. So use __ref to tell | ||
222 | * modpost not to make any noise. | ||
223 | * | ||
216 | * Return value: | 224 | * Return value: |
217 | * NULL: when can't find a table matching the key | 225 | * NULL: when can't find a table matching the key |
218 | * ERR_PTR(error): error value | 226 | * ERR_PTR(error): error value |
219 | * virt table address: when a matched table is found | 227 | * virt table address: when a matched table is found |
220 | */ | 228 | */ |
221 | struct sfi_table_header *sfi_check_table(u64 pa, struct sfi_table_key *key) | 229 | struct sfi_table_header * |
230 | __ref sfi_check_table(u64 pa, struct sfi_table_key *key) | ||
222 | { | 231 | { |
223 | struct sfi_table_header *th; | 232 | struct sfi_table_header *th; |
224 | void *ret = NULL; | 233 | void *ret = NULL; |