Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp666303rdb; Thu, 15 Feb 2024 11:21:56 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVfmT0Spq/JcWb0YNGUssABsvoT28VclHIYRyquhkCULwj9Wt5ndGUal29pDUvMsmhyvl0tFEhJzqrE6gS0d3omD+X76woHti+gX7FjQQ== X-Google-Smtp-Source: AGHT+IFaguUbOnxQkSdDE6VeSFIl/i5uagZ33ZfST6oIhlNRBNx7fbBVlwJgrAcpIxz1rEAsa4gF X-Received: by 2002:a17:902:c94e:b0:1db:402c:f098 with SMTP id i14-20020a170902c94e00b001db402cf098mr3655778pla.52.1708024916236; Thu, 15 Feb 2024 11:21:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708024916; cv=pass; d=google.com; s=arc-20160816; b=zGm/qyHGJxET5shPdCslfv8xCDbwsXjlnMBZsJyQMjMJxbmkAkBIXh2TbaWvNirFtn 75YmCCYX6dqJMQsfJFoBTtwdib2WzSL2xJ2zksgtlok2eoWBUIAEyyarghlRAsKF7gdc SzW25KxHd8goO9flYZrJoJtQJRo3/j8vH7BYe0caw/y+KMKjFfV6LDm1XIC0gr9Wbhlu BljWrBIg906Tq0SBbxkhBPQjN3GD47cxVTn/D2S68UcW1swvswUAFNQ+cMPqkak43fHG LFGnMe71By1c+0aZQE0pz7ViwxHAtDmEB/J4EHbwPoXTFuLarVlBFfmV3R11g5cQE6Ot SErQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=aEXWfOskoddJlaVEp+6gKTRnEzzdl8u8/iTdrQ3QtXU=; fh=r8G2JENgcRo/RTe4xvZO7IzPLZ7yvHykzgF2Da/HHrw=; b=QlVf8YG6byqJx1DfIz3EBY0OqJjCrGQm/1bemA+Up/xrQ65qp7yEbC2m3ahURktSzR RVGmCo7eW+p9yAdR+veLYzJYICXySER3UDOjBIuhi5a+1B/iuRRUy+dv4v+iZ10VGn5w cPklRgKZBHcAvEZQ+7lCqTyhIv0SAZn5AkFEI1GP9iJ9MpS8/PgiuloemsdckAk+LkI1 ACwticmyxcbTBTTRWv3KbWoYyg1kLyuehxAC1MyyJzzOBqcfKgUb0DN7dkF3uFSTrPoU YSyAQyQ3sJT5FqJ25VJLVZU0GqQyZTPeLp491mFA/3o/+lBZdNUHr08Njm/riq3zNp0o clHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67566-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s7-20020a170902a50700b001d9588f0723si1482685plq.522.2024.02.15.11.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 11:21:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67566-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67566-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E47F9288D61 for ; Thu, 15 Feb 2024 19:21:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63952139595; Thu, 15 Feb 2024 19:21:21 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E17E0139587 for ; Thu, 15 Feb 2024 19:21:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708024880; cv=none; b=Mjq3f3kTfc4hPhJT+y2FQqwx8toCSH7ir1gyzTmzxkudr3GYcC9nvcjHa5FAR4rFDtrPvtW0aQ62IFrlvxt95QA97mgmmu+fM5N6vKur6WYH9c2EhWpp37qbMG/WYf1L9Ox5xwXAcT98Pd97kuiyG7KE4xhhNm6IdWCpgFXU51A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708024880; c=relaxed/simple; bh=549+N3C6wlmLc9KrTSgg5zXq+E9UR6kzo8DVOvVQFEo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kUjbDtVgSNMttK0I59n1tgmaBB8HhOYJAHACpZao1juisjg2WTpzK79UoyfbEdTiV6whBti+mGpH5UhrNVwfQ4e86HkvPBJoB97vdCNI6vu/IYoHJ83foQXIrPD5iVuizO2IDcGThlra4DGMyHU+q/CTDgdV3WeEBWaWSbfl/No= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 852F2C433F1; Thu, 15 Feb 2024 19:21:15 +0000 (UTC) Date: Thu, 15 Feb 2024 19:21:13 +0000 From: Catalin Marinas To: Ryan Roberts Cc: Will Deacon , Ard Biesheuvel , Marc Zyngier , James Morse , Andrey Ryabinin , Andrew Morton , Matthew Wilcox , Mark Rutland , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 10/18] arm64/mm: New ptep layer to manage contig bit Message-ID: References: <20240215103205.2607016-1-ryan.roberts@arm.com> <20240215103205.2607016-11-ryan.roberts@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240215103205.2607016-11-ryan.roberts@arm.com> On Thu, Feb 15, 2024 at 10:31:57AM +0000, Ryan Roberts wrote: > Create a new layer for the in-table PTE manipulation APIs. For now, The > existing API is prefixed with double underscore to become the > arch-private API and the public API is just a simple wrapper that calls > the private API. > > The public API implementation will subsequently be used to transparently > manipulate the contiguous bit where appropriate. But since there are > already some contig-aware users (e.g. hugetlb, kernel mapper), we must > first ensure those users use the private API directly so that the future > contig-bit manipulations in the public API do not interfere with those > existing uses. > > The following APIs are treated this way: > > - ptep_get > - set_pte > - set_ptes > - pte_clear > - ptep_get_and_clear > - ptep_test_and_clear_young > - ptep_clear_flush_young > - ptep_set_wrprotect > - ptep_set_access_flags > > Tested-by: John Hubbard > Signed-off-by: Ryan Roberts Acked-by: Catalin Marinas