Re: [PATCH V2] mm/ioremap: Probe platform for p4d huge map support

From
Stephen Rothwell <hidden>
Date
2019-07-12 08:42:02
Also in
linux-arm-kernel, linux-mm
Reply to
Michael Ellerman, 2019-07-12
Hi all,

On Fri, 12 Jul 2019 17:07:48 +1000 Michael Ellerman [off-list ref] wrote:
The return value of arch_ioremap_p4d_supported() is stored in the
variable ioremap_p4d_capable which is then returned by
ioremap_p4d_enabled().

That is used by ioremap_try_huge_p4d() called from ioremap_p4d_range()
from ioremap_page_range().
When I first saw this, I wondered if we expect
arch_ioremap_p4d_supported() to ever return something that is not
computable at compile time.  If not, why do we have this level of
redirection?  Why not just make it a static inline functions defined in
an arch specific include file (or even just a CONFIG_ option)?

In particular, ioremap_p4d_enabled() either returns ioremap_p4d_capable
or 0 and is static to one file and has one call site ...  The same is
true of ioremap_pud_enabled() and ioremap_pmd_enabled().
-- 
Cheers,
Stephen Rothwell

Attachments

Thread (6 messages) 6 messages, 4 authors, last reply 2019-07-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help