From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: x86@kernel.org, Anshuman Khandual <anshuman.khandual@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>,
linux-arm-kernel@lists.infradead.org,
Andy Lutomirski <luto@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org,
Thomas Gleixner <tglx@linutronix.de>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH V2] mm/ioremap: Probe platform for p4d huge map support
Date: Fri, 12 Jul 2019 18:40:55 +1000 [thread overview]
Message-ID: <20190712184055.47a7a54b@canb.auug.org.au> (raw)
In-Reply-To: <87tvbrennf.fsf@concordia.ellerman.id.au>
[-- Attachment #1: Type: text/plain, Size: 913 bytes --]
Hi all,
On Fri, 12 Jul 2019 17:07:48 +1000 Michael Ellerman <mpe@ellerman.id.au> 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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-12 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 5:20 [PATCH V2] mm/ioremap: Probe platform for p4d huge map support Anshuman Khandual
2019-07-02 23:06 ` Andrew Morton
2019-07-04 15:26 ` Anshuman Khandual
2019-07-12 7:07 ` Michael Ellerman
2019-07-12 8:40 ` Stephen Rothwell [this message]
2019-07-12 9:58 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190712184055.47a7a54b@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).