Commit d538aadc authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

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: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b4f03a68ee8e68773c8973d74ec35f9c82c72871.1568295907.git.christophe.leroy@c-s.fr
parent 265c3491
...@@ -68,6 +68,7 @@ __ioremap_caller(phys_addr_t addr, unsigned long size, pgprot_t prot, void *call ...@@ -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 * 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); err = early_ioremap_range(ioremap_bot - size, p, size, prot);
if (err) if (err)
......
...@@ -81,6 +81,8 @@ void __iomem *__ioremap_caller(phys_addr_t addr, unsigned long size, ...@@ -81,6 +81,8 @@ void __iomem *__ioremap_caller(phys_addr_t addr, unsigned long size,
if (slab_is_available()) if (slab_is_available())
return do_ioremap(paligned, offset, size, prot, caller); 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); err = early_ioremap_range(ioremap_bot, paligned, size, prot);
if (err) if (err)
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment