Skip to content

Commit f6bf47a

Browse files
committed
arm64: io: Rename ioremap_prot() to __ioremap_prot()
Rename our ioremap_prot() implementation to __ioremap_prot() and convert all arch-internal callers over to the new function. ioremap_prot() remains as a #define to __ioremap_prot() for generic_access_phys() and will be subsequently extended to handle user permissions in 'prot'. Cc: Zeng Heng <zengheng4@huawei.com> Cc: Jinjiang Tu <tujinjiang@huawei.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 6de23f8 commit f6bf47a

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

arch/arm64/include/asm/io.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,19 +264,20 @@ __iowrite64_copy(void __iomem *to, const void *from, size_t count)
264264
typedef int (*ioremap_prot_hook_t)(phys_addr_t phys_addr, size_t size,
265265
pgprot_t *prot);
266266
int arm64_ioremap_prot_hook_register(const ioremap_prot_hook_t hook);
267+
void __iomem *__ioremap_prot(phys_addr_t phys, size_t size, pgprot_t prot);
267268

268-
#define ioremap_prot ioremap_prot
269+
#define ioremap_prot __ioremap_prot
269270

270271
#define _PAGE_IOREMAP PROT_DEVICE_nGnRE
271272

272273
#define ioremap_wc(addr, size) \
273-
ioremap_prot((addr), (size), __pgprot(PROT_NORMAL_NC))
274+
__ioremap_prot((addr), (size), __pgprot(PROT_NORMAL_NC))
274275
#define ioremap_np(addr, size) \
275-
ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRnE))
276+
__ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRnE))
276277

277278

278279
#define ioremap_encrypted(addr, size) \
279-
ioremap_prot((addr), (size), PAGE_KERNEL)
280+
__ioremap_prot((addr), (size), PAGE_KERNEL)
280281

281282
/*
282283
* io{read,write}{16,32,64}be() macros
@@ -297,7 +298,7 @@ static inline void __iomem *ioremap_cache(phys_addr_t addr, size_t size)
297298
if (pfn_is_map_memory(__phys_to_pfn(addr)))
298299
return (void __iomem *)__phys_to_virt(addr);
299300

300-
return ioremap_prot(addr, size, __pgprot(PROT_NORMAL));
301+
return __ioremap_prot(addr, size, __pgprot(PROT_NORMAL));
301302
}
302303

303304
/*

arch/arm64/kernel/acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
377377
prot = __acpi_get_writethrough_mem_attribute();
378378
}
379379
}
380-
return ioremap_prot(phys, size, prot);
380+
return __ioremap_prot(phys, size, prot);
381381
}
382382

383383
/*

arch/arm64/mm/ioremap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ int arm64_ioremap_prot_hook_register(ioremap_prot_hook_t hook)
1414
return 0;
1515
}
1616

17-
void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
18-
pgprot_t pgprot)
17+
void __iomem *__ioremap_prot(phys_addr_t phys_addr, size_t size,
18+
pgprot_t pgprot)
1919
{
2020
unsigned long last_addr = phys_addr + size - 1;
2121

@@ -39,7 +39,7 @@ void __iomem *ioremap_prot(phys_addr_t phys_addr, size_t size,
3939

4040
return generic_ioremap_prot(phys_addr, size, pgprot);
4141
}
42-
EXPORT_SYMBOL(ioremap_prot);
42+
EXPORT_SYMBOL(__ioremap_prot);
4343

4444
/*
4545
* Must be called after early_fixmap_init

0 commit comments

Comments
 (0)