Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+10 -9
+6 -5
arch/arm64/include/asm/io.h
··· 264 264 typedef int (*ioremap_prot_hook_t)(phys_addr_t phys_addr, size_t size, 265 265 pgprot_t *prot); 266 266 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); 267 268 268 - #define ioremap_prot ioremap_prot 269 + #define ioremap_prot __ioremap_prot 269 270 270 271 #define _PAGE_IOREMAP PROT_DEVICE_nGnRE 271 272 272 273 #define ioremap_wc(addr, size) \ 273 - ioremap_prot((addr), (size), __pgprot(PROT_NORMAL_NC)) 274 + __ioremap_prot((addr), (size), __pgprot(PROT_NORMAL_NC)) 274 275 #define ioremap_np(addr, size) \ 275 - ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRnE)) 276 + __ioremap_prot((addr), (size), __pgprot(PROT_DEVICE_nGnRnE)) 276 277 277 278 278 279 #define ioremap_encrypted(addr, size) \ 279 - ioremap_prot((addr), (size), PAGE_KERNEL) 280 + __ioremap_prot((addr), (size), PAGE_KERNEL) 280 281 281 282 /* 282 283 * io{read,write}{16,32,64}be() macros ··· 298 297 if (pfn_is_map_memory(__phys_to_pfn(addr))) 299 298 return (void __iomem *)__phys_to_virt(addr); 300 299 301 - return ioremap_prot(addr, size, __pgprot(PROT_NORMAL)); 300 + return __ioremap_prot(addr, size, __pgprot(PROT_NORMAL)); 302 301 } 303 302 304 303 /*
+1 -1
arch/arm64/kernel/acpi.c
··· 377 377 prot = __acpi_get_writethrough_mem_attribute(); 378 378 } 379 379 } 380 - return ioremap_prot(phys, size, prot); 380 + return __ioremap_prot(phys, size, prot); 381 381 } 382 382 383 383 /*
+3 -3
arch/arm64/mm/ioremap.c
··· 14 14 return 0; 15 15 } 16 16 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) 19 19 { 20 20 unsigned long last_addr = phys_addr + size - 1; 21 21 ··· 39 39 40 40 return generic_ioremap_prot(phys_addr, size, pgprot); 41 41 } 42 - EXPORT_SYMBOL(ioremap_prot); 42 + EXPORT_SYMBOL(__ioremap_prot); 43 43 44 44 /* 45 45 * Must be called after early_fixmap_init