mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	powerpc/ioremap: warn on early use of ioremap()
Powerpc now has EARLY_IOREMAP. Next step is to convert all early users of ioremap() to early_ioremap(). Add a warning to help locate those users. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/b4f03a68ee8e68773c8973d74ec35f9c82c72871.1568295907.git.christophe.leroy@c-s.fr
This commit is contained in:
		
							parent
							
								
									265c3491c4
								
							
						
					
					
						commit
						d538aadc27
					
				
					 2 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -68,6 +68,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, pgprot_t prot, void *call
 | 
			
		|||
	/*
 | 
			
		||||
	 * Should check if it is a candidate for a BAT mapping
 | 
			
		||||
	 */
 | 
			
		||||
	pr_warn("ioremap() called early from %pS. Use early_ioremap() instead\n", caller);
 | 
			
		||||
 | 
			
		||||
	err = early_ioremap_range(ioremap_bot - size, p, size, prot);
 | 
			
		||||
	if (err)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -81,6 +81,8 @@ void __iomem *__ioremap_caller(phys_addr_t addr, unsigned long size,
 | 
			
		|||
	if (slab_is_available())
 | 
			
		||||
		return do_ioremap(paligned, offset, size, prot, caller);
 | 
			
		||||
 | 
			
		||||
	pr_warn("ioremap() called early from %pS. Use early_ioremap() instead\n", caller);
 | 
			
		||||
 | 
			
		||||
	err = early_ioremap_range(ioremap_bot, paligned, size, prot);
 | 
			
		||||
	if (err)
 | 
			
		||||
		return NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue