linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
	Ryan Roberts <ryan.roberts@arm.com>,
	"Mike Rapoport (IBM)" <rppt@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] mm: Drop unused set_pte_safe()
Date: Wed, 11 Sep 2024 09:22:59 +0530	[thread overview]
Message-ID: <1340d57f-3f4e-4873-aa66-e93d3a8f3394@arm.com> (raw)
In-Reply-To: <20240910131355.8f56f86045c745cee7a97f85@linux-foundation.org>



On 9/11/24 01:43, Andrew Morton wrote:
> On Tue, 10 Sep 2024 15:40:26 +0530 Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
>> All set_pte_safe() usage have been dropped after the commit eccd906484d1
>> ("x86/mm: Do not use set_{pud, pmd}_safe() when splitting a large page")
>> This just drops now unused helper set_pte_safe().
>>
>> Besides this macro was buggy due to doing direct dereferencing of the pte,
>> and if it were to be kept, it should have been updated to use a single call
>> to ptep_get().
>>
> 
> arch/x86/mm/init_64.c: In function 'set_pte_init':
> arch/x86/mm/init_64.c:83:17: error: implicit declaration of function 'set_pte_safe'; did you mean 'set_pmd_safe'? [-Werror=implicit-function-declaration]
>    83 |                 set_##type1##_safe(arg1, arg2);                 \
>       |                 ^~~~
> arch/x86/mm/init_64.c:91:1: note: in expansion of macro 'DEFINE_ENTRY'
>    91 | DEFINE_ENTRY(pte, pte, init)
>       | ^~~~~~~~~~~~

kernel_physical_mapping_init()
	__kernel_physical_mapping_init(, init = true)
		phys_p4d_init(, init = true)
			phys_pud_init(, init = true)
				phys_pmd_init(, init = true)
					phys_pte_init(, init = true)
						pte_init(, init = true)
							set_pte_safe()

Right, seems like there is a path to set_pte_safe(). Sure, will drop this
patch and convert the direct access into ptep_get() instead.


  reply	other threads:[~2024-09-11  3:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 10:10 Anshuman Khandual
2024-09-10 20:13 ` Andrew Morton
2024-09-11  3:52   ` Anshuman Khandual [this message]
2024-09-13  4:16 ` kernel test robot
2024-09-13  4:37 ` kernel test robot

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=1340d57f-3f4e-4873-aa66-e93d3a8f3394@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    /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