Thread (36 messages) 36 messages, 6 authors, 2019-02-20

Re: [PATCH 01/13] arm64: mm: Add p?d_large() definitions

From: Mark Rutland <mark.rutland@arm.com>
Date: 2019-02-18 17:05:10
Also in: linux-mm, lkml

On Mon, Feb 18, 2019 at 03:30:38PM +0000, Steven Price wrote:
On 18/02/2019 15:06, Peter Zijlstra wrote:
quoted
On Mon, Feb 18, 2019 at 02:29:52PM +0000, Mark Rutland wrote:
quoted
I think that Peter means p?d_huge(x) should imply p?d_large(x), e.g.

#define pmd_large(x) \
	(pmd_sect(x) || pmd_huge(x) || pmd_trans_huge(x))

... which should work regardless of CONFIG_HUGETLB_PAGE.
Yep, that.
I'm not aware of a situation where pmd_huge(x) is true but pmd_sect(x)
isn't. Equally for pmd_huge(x) and pmd_trans_huge(x).

What am I missing?
Having dug for a bit, I think you're right in asserting that pmd_sect()
should cover those.

I had worried that wouldn't cater for contiguous pmd entries, but those
have to be contiguous section entries, so they get picked up.

That said, do we have any special handling for contiguous PTEs? We use
those in kernel mappings regardless of hugetlb support, and I didn't
spot a pte_large() helper.

Thanks,
Mark.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help