aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/ioremap.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r--arch/x86/mm/ioremap.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index d176b23110cc..804de18abcc2 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -117,8 +117,8 @@ int ioremap_change_attr(unsigned long vaddr, unsigned long size,
117 * have to convert them into an offset in a page-aligned mapping, but the 117 * have to convert them into an offset in a page-aligned mapping, but the
118 * caller shouldn't need to know that small detail. 118 * caller shouldn't need to know that small detail.
119 */ 119 */
120static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size, 120static void __iomem *__ioremap_caller(resource_size_t phys_addr,
121 unsigned long prot_val) 121 unsigned long size, unsigned long prot_val, void *caller)
122{ 122{
123 unsigned long pfn, offset, vaddr; 123 unsigned long pfn, offset, vaddr;
124 resource_size_t last_addr; 124 resource_size_t last_addr;
@@ -212,7 +212,7 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
212 /* 212 /*
213 * Ok, go for it.. 213 * Ok, go for it..
214 */ 214 */
215 area = get_vm_area(size, VM_IOREMAP); 215 area = get_vm_area_caller(size, VM_IOREMAP, caller);
216 if (!area) 216 if (!area)
217 return NULL; 217 return NULL;
218 area->phys_addr = phys_addr; 218 area->phys_addr = phys_addr;
@@ -255,7 +255,8 @@ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
255 */ 255 */
256void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size) 256void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
257{ 257{
258 return __ioremap(phys_addr, size, _PAGE_CACHE_UC); 258 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_UC,
259 __builtin_return_address(0));
259} 260}
260EXPORT_SYMBOL(ioremap_nocache); 261EXPORT_SYMBOL(ioremap_nocache);
261 262
@@ -272,7 +273,8 @@ EXPORT_SYMBOL(ioremap_nocache);
272void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size) 273void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size)
273{ 274{
274 if (pat_wc_enabled) 275 if (pat_wc_enabled)
275 return __ioremap(phys_addr, size, _PAGE_CACHE_WC); 276 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WC,
277 __builtin_return_address(0));
276 else 278 else
277 return ioremap_nocache(phys_addr, size); 279 return ioremap_nocache(phys_addr, size);
278} 280}
@@ -280,7 +282,8 @@ EXPORT_SYMBOL(ioremap_wc);
280 282
281void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size) 283void __iomem *ioremap_cache(resource_size_t phys_addr, unsigned long size)
282{ 284{
283 return __ioremap(phys_addr, size, _PAGE_CACHE_WB); 285 return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WB,
286 __builtin_return_address(0));
284} 287}
285EXPORT_SYMBOL(ioremap_cache); 288EXPORT_SYMBOL(ioremap_cache);
286 289