mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will@kernel.org>, Ard Biesheuvel <ardb@kernel.org>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/mm: Re-organize arch_make_huge_pte()
Date: Mon, 4 Nov 2024 10:28:35 +0530	[thread overview]
Message-ID: <1a724b58-d61b-443d-9f3d-aebcd35e9610@arm.com> (raw)
In-Reply-To: <173048223682.1108539.16990086073905192650.b4-ty@arm.com>



On 11/1/24 23:05, Catalin Marinas wrote:
> On Tue, 29 Oct 2024 10:15:29 +0530, Anshuman Khandual wrote:
>> Core HugeTLB defines a fallback definition for arch_make_huge_pte(), which
>> calls platform provided pte_mkhuge(). But if any platform already provides
>> an override for arch_make_huge_pte(), then it does not need to provide the
>> helper pte_mkhuge().
>>
>> arm64 override for arch_make_huge_pte() calls pte_mkhuge() internally, thus
>> creating an impression, that both of these callbacks are being used in core
>> HugeTLB and hence required to be defined. This drops off pte_mkhuge() which
>> was never required to begin with as there could not be any section mappings
>> at the PTE level. Re-organize arch_make_huge_pte() based on requested page
>> size and create the entry for the applicable page table level as needed. It
>> also removes a redundancy of clearing PTE_TABLE_BIT bit followed by setting
>> both PTE_TABLE_BIT and PTE_VALID bits (via PTE_TYPE_MASK) in the pte, while
>> creating CONT_PTE_SIZE size entries.
>>
>> [...]
> 
> Applied to arm64 (for-next/misc), thanks!
> 
> [1/1] arm64/mm: Re-organize arch_make_huge_pte()
>       https://git.kernel.org/arm64/c/f8192813dcbe
> 
> I think we can now get pte_mkcont() to only set PTE_CONT without
> touching PTE_TYPE_PAGE. Previously it wasn't possible because
> pte_mkhuge() was clearing the PTE_TABLE_BIT and we added it back via
> pte_mkcont(). Give it a try and send an additional patch cleaning up
> pte_mkcont() if this works. Thanks.

Yes, it does indeed work. Sent the following patch for the same.

https://lore.kernel.org/all/20241104041617.3804617-1-anshuman.khandual@arm.com/

      reply	other threads:[~2024-11-04  4:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  4:45 Anshuman Khandual
2024-11-01 17:35 ` Catalin Marinas
2024-11-04  4:58   ` Anshuman Khandual [this message]

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=1a724b58-d61b-443d-9f3d-aebcd35e9610@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ryan.roberts@arm.com \
    --cc=will@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

all inboxes | Powered by JetHome®