Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp887985lqj; Mon, 3 Jun 2024 04:12:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXVCvtdwDqwtkrRoz46jA0M428mAaex7ymaw61b2eOdwUtGSM8B1+JPwc2J2qzicxpHUitOar81koe3thdf3ic/dcxHOrTBhYOg8XytkA== X-Google-Smtp-Source: AGHT+IE6jJcX/2qEVYyF3Ump29ykPeOpuSJlSztwHZud/6HrpPvM5dJiwhTg+G1jYduEzhJo4EOz X-Received: by 2002:a05:6a20:841c:b0:1af:667c:38cc with SMTP id adf61e73a8af0-1b26f0f1ae9mr10073995637.5.1717413138054; Mon, 03 Jun 2024 04:12:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717413138; cv=pass; d=google.com; s=arc-20160816; b=QiQuf4Rlozv3k1rhf3lGmmfUflHSVyzlQhw7h56q4m42ZoygfBgsGaRTL2/lNaovq5 3xmuAB+DuCFvaMmbWwVDlAZnX7LX5H2IvbOM6eBR4NJwR9w7qxB+LMX195YEmaVIZrZJ oPB0LYHp2ponfAQACdL/UCkD2CRnGgtdqvjoScmX5N2MN8Zgn37LYvW7meQEAzjfAwiH Ciq5W8N/WsImdtN0JgSyw43Uwr5wM5xhD799QJZ226qINEm/eVylGdZoO047CQlL4X5T a5dGNKZxyuwvqFoZ0SyeLXqZfJ5cQi2s/VEMm8kwOyyabSEN/bvghSHjKL9YfeJNYNNe 34qA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:content-language:thread-index :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject :in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=4Q+U5KnyvuMp+bndOsiFnEHmV6Drv1tUz1F+LkhtJEI=; fh=oaupAsayC2sNGJHWewGue+ywUc1n487JDREFVqYSEEg=; b=B2U9AZYX/RokiZqnuH0WGvNURiDzND2wwyxJCNXJJN8ez+PXZ8OzOjZqeTXy7UPGwC AztQ+9DzUhrO0VsBNRtcbeuuoxVG7suPnSSfUDOqMQSZhwgTP9ud7a1BzuxDaDyOcG+s nyiG/PizWSCAXiYZpQf7icIfg27hoS8E1rO+9mqBrxw2hBiseWfDeXrsy+WQSEBug64k Sab4wQ740zstoEq7O7fpRLtUxICCD3HLW+qAPsyrNa3qeq58G0Jg/750VAcEKmd+ezih ZnVYPBEljjlpGzdL1u8GnPVHQltrg6cR/niXELRYrh8os2+YCNz1hRiC/Nkt4d6N8uEp JA1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aTBfsG3m; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-199009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77b6322si8355735a91.117.2024.06.03.04.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 04:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aTBfsG3m; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-199009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 452CEB22111 for ; Mon, 3 Jun 2024 11:03:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A7C3783CCF; Mon, 3 Jun 2024 11:03:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="aTBfsG3m" Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (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 E502778C80 for ; Mon, 3 Jun 2024 11:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717412579; cv=none; b=HAtSmOe1X8S7ysleSzrgpHcru/SyUWXOOMwAKYqQR4LYdz92sjqAQvykKlh0AI0iUfoH46nv56CTHhVst9BC7akrJf+AqMpwgLVEyfY2asRCNAKKqTj7Qu0MH3GLBzdafolCb2C5kSQ3wodJ5A/XwzUg9LYXRdY5h4PEIJ/cxHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717412579; c=relaxed/simple; bh=Hz+QOiNXfdRocqqvM1P1Cz8l1xb0oLt1qoEdbTHesI4=; h=From:To:Cc:In-Reply-To:Subject:Date:Message-ID:MIME-Version: Content-Type:References; b=P3RpOKAnoJTtW+fvHkgDmRaLx7nTPzYeecjyKvxPfEmbOFy3ZSLbVdb5+1f0jl31hBV8G3vd7xLsKU2S8ioj51XEyHEQHB4sunjldVCbPzfp0HoTcrpWrwLWUvqmOEDygXyKJqMNmkZzFd/NRy4cA10e2iQbA/i5J/nyxd2in30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=aTBfsG3m; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240603110253epoutp04ba1e2599c0251194a6b905c384254790~VeaL5k9hL0745507455epoutp04m for ; Mon, 3 Jun 2024 11:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240603110253epoutp04ba1e2599c0251194a6b905c384254790~VeaL5k9hL0745507455epoutp04m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1717412573; bh=4Q+U5KnyvuMp+bndOsiFnEHmV6Drv1tUz1F+LkhtJEI=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=aTBfsG3mj6DSuVWwkjWTfVVQr30SQJiugPYf1syuEjE9lWZkhIFvIMwoc5h1iWPrI K6IGDoCNnucv8H6XEvXY0vxJNqw53rzJgJFtj3H0HsdjILmMv1gGU3SsV9m6MoJDIS 0Xb2QrqYpVLV9U21eu1PR4ZhXYdDi2dk7EhuOBSM= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20240603110253epcas1p26050d248242c79711160803bb6c7b547~VeaLXprjV1917919179epcas1p2j; Mon, 3 Jun 2024 11:02:53 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.38.250]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Vt9ms0swBz4x9Pq; Mon, 3 Jun 2024 11:02:53 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 6E.96.09622.CD2AD566; Mon, 3 Jun 2024 20:02:52 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20240603110252epcas1p4e0ead148f7e8c85728db2b6dc8d79dbf~VeaK1QOQr0343203432epcas1p4t; Mon, 3 Jun 2024 11:02:52 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240603110252epsmtrp17cf406aa04674fc07c10c370c200cd76~VeaK0ltMN3072030720epsmtrp1K; Mon, 3 Jun 2024 11:02:52 +0000 (GMT) X-AuditID: b6c32a37-075fa70000002596-23-665da2dcc06f Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id 8D.ED.18846.CD2AD566; Mon, 3 Jun 2024 20:02:52 +0900 (KST) Received: from sgsupark03 (unknown [10.252.69.53]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240603110252epsmtip22f645a091fc0655b79b8045c8e7f07c6~VeaKohqhZ0468104681epsmtip2e; Mon, 3 Jun 2024 11:02:52 +0000 (GMT) From: "Seongsu Park" To: , , , Cc: , , , In-Reply-To: <20240523122146.144483-1-sgsu.park@samsung.com> Subject: RE: [PATCH] arm64: Cleanup __cpu_set_tcr_t0sz() Date: Mon, 3 Jun 2024 20:02:52 +0900 Message-ID: <000001dab5a5$94580a40$bd081ec0$@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH8m0kGjlO3sBEuOPUVgIk9EwDJ9wFU9gUNsWdr81A= Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJsWRmVeSWpSXmKPExsWy7bCmnu6dRbFpBq9n21j8/PKe0eL9sh5G iz8bdzNZbHp8jdXi8q45bBZLr19ksnjf0MVq0XLH1IHDY828NYweO2fdZffYtKqTzWPzknqP vi2rGD0+b5ILYIvKtslITUxJLVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLx CdB1y8wBOkdJoSwxpxQoFJBYXKykb2dTlF9akqqQkV9cYquUWpCSU2BWoFecmFtcmpeul5da YmVoYGBkClSYkJ3xYFlBwX/eip45K9kaGM9xdzFycEgImEjsPGfXxcjFISSwg1Fi84MrjBDO J0aJrft/sXUxckI4i9ujQGyQhkWLl7FDFO1klHi8ZgcrhPOcUeLi3KnMIFVsAjoS375NYQGx RQRiJa6enQI2iVmgXmLF4mesIDangI3E3Z3fwOLCAhYSx+b9AbNZBFQknj9ZyQRi8wpYSrz5 9wPKFpQ4OfMJC8QceYntb+cwQ1ykIPHz6TJWkHdEBKwkTl3RgSgRkZjd2cYMcpuEwFwOif7d Oxgh6l0kjl+ezQRhC0u8Or6FHcKWknjZ3wZlF0vs+7IGan6NxIN5e6Bse4mOZ20sILuYBTQl 1u/Sh9jFJ/Huaw8rJER5JTrahCBMZYlzWx0hTEmJPwv0IGZ4SGz5f5J1AqPiLCRvzULy1iwk 989CWLWAkWUVo1hqQXFuemqxYYExPJ6T83M3MYITqZb5DsZpbz/oHWJk4mA8xCjBwawkwttX F50mxJuSWFmVWpQfX1Sak1p8iNEUGNATmaVEk/OBqTyvJN7QxNLAxMzIxMLY0thMSZz3zJWy VCGB9MSS1OzU1ILUIpg+Jg5OqQam+e1O105Gfy31tPIsqvzBdE4r5k5CZMP9uK1VcXaqP+0W t/UWuO3z/jjPYdtxN6ltD7coBMwImdp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W1LzL/3HamaL2qOXmlxNH72IaDjkl7O1VMUgYuf1LIcZVY+4 Tx1fVP32ZV+TdMi6aJV9hy7qSE9Qs19hqvBvH6vxxYPsnRH6cVfn8vznMi5/ZiDz1eZRaSK3 R/Q59/zuM1rKv/lX9hW5Cj7fwR3rWTRpl0DFkcsML13776clmClNnhZ/bPrqbaoPZ0mdCxS9 rXin2LA31F4i+sKPs36/b4duna7EUpyRaKjFXFScCAB/2e1CGQMAAA== X-CMS-MailID: 20240603110252epcas1p4e0ead148f7e8c85728db2b6dc8d79dbf X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240523122152epcas1p49d579e40d4ef0c442820cc01f79ab38b References: <20240523122146.144483-1-sgsu.park@samsung.com> Dear All, Please check this patch. I think this patch is appropriate. Thanks. Seongsu Park. > -----Original Message----- > From: Seongsu Park > Sent: Thursday, May 23, 2024 9:22 PM > To: catalin.marinas@arm.com; will@kernel.org; ardb@kernel.org; > mark.rutland@arm.com > Cc: linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > infinite.run@gmail.com; sgsu.park@samsung.com > Subject: [PATCH] arm64: Cleanup __cpu_set_tcr_t0sz() > > The T0SZ field of TCR_EL1 occupies bits 0-5 of the register and encode the > virtual address space translated by TTBR0_EL1. When updating the field, > for example because we are switching to/from the idmap page-table, > __cpu_set_tcr_t0sz() erroneously treats its 't0sz' argument as unshifted, > resulting in harmless but confusing double shifts by 0 in the code. > > Co-developed-by: Leem ChaeHoon > Signed-off-by: Leem ChaeHoon > Signed-off-by: Seongsu Park > --- > arch/arm64/include/asm/mmu_context.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/mmu_context.h > b/arch/arm64/include/asm/mmu_context.h > index c768d16b81a4..bd19f4c758b7 100644 > --- a/arch/arm64/include/asm/mmu_context.h > +++ b/arch/arm64/include/asm/mmu_context.h > @@ -72,11 +72,11 @@ static inline void __cpu_set_tcr_t0sz(unsigned long > t0sz) { > unsigned long tcr = read_sysreg(tcr_el1); > > - if ((tcr & TCR_T0SZ_MASK) >> TCR_T0SZ_OFFSET == t0sz) > + if ((tcr & TCR_T0SZ_MASK) == t0sz) > return; > > tcr &= ~TCR_T0SZ_MASK; > - tcr |= t0sz << TCR_T0SZ_OFFSET; > + tcr |= t0sz; > write_sysreg(tcr, tcr_el1); > isb(); > } > -- > 2.34.1