From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84B1217A305 for ; Fri, 10 Apr 2026 04:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775793752; cv=none; b=MlKxIM8M2PA2Aa+3WW/OnHIW21aEJg+KZfLkG+ntXuJc745wo7VOEW4wnItDPX+oIuR675MTsx9fOPGJsP15fDeUMpGS5N6WwsHSKfmHonWV0XJvPhKZU2s/XZzzm3d6QyyCJ0TD53D1hh8NUQXQlwGCR6TRwsaGT65BdrDcF5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775793752; c=relaxed/simple; bh=SRztj8vW9IVfsNnDlWMXIQNZpY38AX6pQu/yOpn9X3Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Iqs9t4/9szGHYFiFpqsFF66uR/kLJ61IewSZPX2GJdGp4bpeGdALSXEZx2MzSjehWRjb7/eP2PONPugzxMh8Aea51tIvnsGMiDmk9bzIE5mypLYB9sMO94MlbYHlncO5lHhA4Y5ajC3+s762/IzZfiOROEbkc1MGMKlNsW3ppVQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=dBYFArVv; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="dBYFArVv" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 49A711D13; Thu, 9 Apr 2026 21:02:24 -0700 (PDT) Received: from [10.163.181.174] (unknown [10.163.181.174]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 114033F641; Thu, 9 Apr 2026 21:02:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1775793750; bh=SRztj8vW9IVfsNnDlWMXIQNZpY38AX6pQu/yOpn9X3Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dBYFArVv8DgQwTOhXcFrq5eacok3vrOckMgsfIeMP9E8+Tx8IlH/rbYfzpCQF7qxn PrRVggjNP3h4nPwyft1ja8QH3WU2XnQJAXZWL+PfFMYFvgb7y6FMa2zRPKmMBCidc7 YW34P13UUVFhVmphad8ixLXOBqfVXQfHTsdBxjKA= Message-ID: Date: Fri, 10 Apr 2026 09:32:22 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC V1 11/16] arm64/mm: Route all pgtable atomics to central helpers To: "David Hildenbrand (Arm)" , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , Ryan Roberts , Mark Rutland , Lorenzo Stoakes , Andrew Morton , Mike Rapoport , Linu Cherian , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20260224051153.3150613-1-anshuman.khandual@arm.com> <20260224051153.3150613-12-anshuman.khandual@arm.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 08/04/26 5:58 PM, David Hildenbrand (Arm) wrote: > On 2/24/26 06:11, Anshuman Khandual wrote: >> Route all cmpxchg() operations performed on various page table entries to a >> new ptdesc_cmpxchg_relaxed() helper. Similarly route all xchg() operations >> performed on page table entries to a new ptdesc_xchg_relaxed() helper. >> >> Currently these helpers just forward to the same APIs that were previously >> called direct, but in future we will change the routing for D128 which is >> too long to use the standard APIs. >> >> Cc: Catalin Marinas >> Cc: Will Deacon >> Cc: Ryan Roberts >> Cc: Mark Rutland >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual >> --- >> arch/arm64/include/asm/pgtable.h | 23 +++++++++++++++++------ >> arch/arm64/mm/fault.c | 2 +- >> 2 files changed, 18 insertions(+), 7 deletions(-) >> >> diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h >> index 42124d2f323d..cf69ce68f951 100644 >> --- a/arch/arm64/include/asm/pgtable.h >> +++ b/arch/arm64/include/asm/pgtable.h >> @@ -87,6 +87,17 @@ static inline void arch_leave_lazy_mmu_mode(void) >> #define ptdesc_get(x) READ_ONCE(x) >> #define ptdesc_set(x, val) WRITE_ONCE(x, val) >> >> +static inline ptdesc_t ptdesc_cmpxchg_relaxed(ptdesc_t *ptep, ptdesc_t old, >> + ptdesc_t new) >> +{ >> + return cmpxchg_relaxed(ptep, old, new); >> +} >> + >> +static inline ptdesc_t ptdesc_xchg_relaxed(ptdesc_t *ptep, ptdesc_t new) >> +{ >> + return xchg_relaxed(ptep, new); >> +} >> + > > We really want the rename of ptdesc_t before this change. > Planning to rename ptdesc_t as ptent_t in a pre-requisite patch early in the series.