From patchwork Wed Apr 17 07:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungchul Park X-Patchwork-Id: 13632928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 086BAC4345F for ; Wed, 17 Apr 2024 07:19:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 503EB6B0089; Wed, 17 Apr 2024 03:19:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 47FEA6B008C; Wed, 17 Apr 2024 03:19:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 320AD6B0092; Wed, 17 Apr 2024 03:19:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 126356B008A for ; Wed, 17 Apr 2024 03:19:07 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 93300C0D63 for ; Wed, 17 Apr 2024 07:19:06 +0000 (UTC) X-FDA: 82018172292.01.F879733 Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf12.hostedemail.com (Postfix) with ESMTP id 7893D4000B for ; Wed, 17 Apr 2024 07:19:02 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713338345; a=rsa-sha256; cv=none; b=1c+XCnHTTQR84E/Z985QOj2HsCTmSOwm3C+9isywHw/Dh1FFCyeoDyHi4giq9dmumVPrN6 kI5Ml6i0a6sER1unlQcVbVYLRl1vxUPs1vREBNMbclGtiG69HMlPqisC+9Z9toQ/1KMKXz i8F/a1B0hM39c15OHEtdesFSLOnMpdw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713338345; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=eDUW415py3pPAUpCiAjaCiXtii+H6gPxXgOFoaHlo/k=; b=JPIMr3LmJVCPyoB0XmehBc0f6TyspvmRuWrfpUSBSzAdJk4HOrOiy84BaLFyxgslu8Pgcc lpHOQ5c2RwgIkDclUtAfn0qOCZKIRqNpz5BCShiyHvIWFMQcHscoQdNCEejyt21rEqL83W e9VVbWNGonUH9dugaAcmDOqLshvgs7c= X-AuditID: a67dfc5b-d6dff70000001748-97-661f77e263d8 From: Byungchul Park To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: kernel_team@skhynix.com, akpm@linux-foundation.org, ying.huang@intel.com, vernhao@tencent.com, mgorman@techsingularity.net, hughd@google.com, willy@infradead.org, david@redhat.com, peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, rjgolo@gmail.com Subject: [PATCH v9 2/8] arm64: tlbflush: add APIs manipulating tlb batch's arch data Date: Wed, 17 Apr 2024 16:18:41 +0900 Message-Id: <20240417071847.29584-3-byungchul@sk.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240417071847.29584-1-byungchul@sk.com> References: <20240417071847.29584-1-byungchul@sk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGLMWR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n2D1OzPjN4jHvZKDH+31X2TwWv/jA5LH1l51H49RrbB6fN8kF8Edx2aSk 5mSWpRbp2yVwZSzs2MxasIerYv/PQ4wNjDc5uhg5OSQETCSeXD7ADmKzCahL3LjxkxnEFhEw kzjY+gcszixwl0niQD8biC0sECLxd0cbK4jNIqAqMefvNLAaXgFTiT3zbzBBzJSXWL3hANgc TqA5m5vXgPUKAdV8P/GRbQIj1wJGhlWMIpl5ZbmJmTmmesXZGZV5mRV6yfm5mxiBgbys9s/E HYxfLrsfYhTgYFTi4TWIkksTYk0sK67MPcQowcGsJMLbIiybJsSbklhZlVqUH19UmpNafIhR moNFSZzXKzw1QUggPbEkNTs1tSC1CCbLxMEp1cCYvHTzPMOZ3TY+Oydu7l7keF925+t1HTH1 9ol3JFVP3q348H+59j/JtNr5Nnt7Wa8lt/VMKGkKECmok/eeEZa8dfZbEZmNnz7vbqicuOZT CtOEeHWGX63zTs9Vcam/b5zkuUp8G6NIgEH71fV/PruJta/iFnuwre5Wc1hsI3vPw7r1MY22 j88osRRnJBpqMRcVJwIADhOFE2ACAAA= X-CFilter-Loop: Reflected X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 7893D4000B X-Stat-Signature: s94iqadonsscfd4eng5d8wz8saf61yha X-Rspam-User: X-HE-Tag: 1713338342-398980 X-HE-Meta: U2FsdGVkX19FGLPV8dklbRW9+U/xOkHYHZIqTRewJdwNhftwYpNV/GIopk7WyrSmYwG3ALq35Tfbga/SqvO41yh2ruPIhrwMZPhPxmrXxkaA5qttIXdlbPPRdtQXF4tafVG0HnzJ7SL4xOIw6aRVuAG/vMqnmTB7MOlw7RaxJZwFQ+Bdxr7YWKWo6F+X/x/qdb9S2PigHrqaQ0btQzbawBKy/8MGXMCvvm7cnvLT4cZ6G52vwHvuGRvCVz6dbrziclF8X3wtKpE3F52vJrmNYIGdmqBU2IMf45VoxpprOX9fnWYpmNhEitw/zUsuoDKKb19PhxzH5xW/nutzBOJKhi0ELrQLtinhdSi6O9lDKoRDRm0VU1svpUZ8ACEqFMBcf6a+4mg/bdh1UKkMtPDoYkJp335pqxXFWZL+eESostmnpzJpe680JKPDH1HOudj+wmXqZ5/DkPkBRoXitUCI+gT+VJYIktwH/RqqOeoEsleqUaEHaNyUq6PT/JF7UUYxN3nNSFeFt4kNOeZ7JXcMy5Dbh9VEeKaCNr4vHWog8kAOMZyYM1ekXydtPKmdr9Bv68HpI9+ElOkW3kNwLXlhD8WeiDXgcH06Q26JwRe9iHHFr9DZKKK+edJhASipCr2ngDSasIXmPayKYiaU1cD5wPpRDgWiEpavmOb07UuLwh8MohKzIxBe1+4kd6nAhwNQMJYqz6VtGIj1if7D4VnabVCLQintCOvq+VvggbB4+88LWu3Fm3/PLquKcwgfQv4O1doJQJZ5nsYsHeFnKXruZbS68wyt3XcvzhgSMKa6HJ/xhBGwclvV2HH594kTQeb8pd9HWOU7hS5Q4HW1g8pWyqbQT4FdpeJv5rpzFtFyljx9aluQ8PVDZwg3BUo2eNk/wpDIp4D3n5pi3EyZEH8f9yRsIqKKZG4JWAb8EC6Q1B6GxKytUitabxeOLpV1sUSe/2AcwTcAsjRgGwMCsrS G8Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This is a preparation for migrc mechanism that requires to manipulate tlb batch's arch data. Even though arm64 does nothing for it, arch with CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH should provide the APIs. Signed-off-by: Byungchul Park --- arch/arm64/include/asm/tlbflush.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index a75de2665d84..b8c7fbc1c68e 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -347,6 +347,24 @@ static inline void arch_tlbbatch_flush(struct arch_tlbflush_unmap_batch *batch) dsb(ish); } +static inline void arch_tlbbatch_clear(struct arch_tlbflush_unmap_batch *batch) +{ + /* nothing to do */ +} + +static inline void arch_tlbbatch_fold(struct arch_tlbflush_unmap_batch *bdst, + struct arch_tlbflush_unmap_batch *bsrc) +{ + /* nothing to do */ +} + +static inline bool arch_tlbbatch_done(struct arch_tlbflush_unmap_batch *bdst, + struct arch_tlbflush_unmap_batch *bsrc) +{ + /* Kernel can consider tlb batch always has been done. */ + return true; +} + /* * This is meant to avoid soft lock-ups on large TLB flushing ranges and not * necessarily a performance improvement.