Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1979225lqz; Tue, 2 Apr 2024 03:50:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUe9M0p7Bfhbq2Cr5YLoNkA4n48g92uneedbHs1T9Rh0ccLd3MgwhQU6CGZ2+tfFMCbfSR+j3HHWMGts9d82JrXE63D/RGyTEozJNBcJA== X-Google-Smtp-Source: AGHT+IG6ZvnS9iSYbzQ0wEW67BXnjyAg3pvtDXRjEhpgIoPixTWGbYVBp9SYW/isGegGGd84Ar51 X-Received: by 2002:a05:620a:15aa:b0:789:f780:557 with SMTP id f10-20020a05620a15aa00b00789f7800557mr10856567qkk.70.1712055020244; Tue, 02 Apr 2024 03:50:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712055020; cv=pass; d=google.com; s=arc-20160816; b=yd04r31pEGbXdCjeHDdioJfGADUK7mBNpv7Y37rJ3xjZnLt9F+w50tt1Ux3r0i4V9o oerz9SDAeAQdjpjqFpyFhSQvCe/vKOUSh1q+d3/dVrMw2ItoU66otJAHP3Zill5cW4Pg NkorIK6vOLiawuz+AsHtBYqHgt0D1/ztn9mvwLH3nIYvsB3w3J0Q7e9PF6rWDZCae/dJ bdxvHCoGF0uH3Uj7MARVOK3SDw5G8Ydd7D0Myil9u4N28P+AVMQshhRti5id9Fb16B7K G5fu5mFvnXtj2q3SFCy/DjHezDV4KE2KB5iFQy0woBqJZiNglICc4PfG5TbvHtGYT23r 5PSQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=9yxYze5dfhmoUzXm3YYn4+4ta1glAp8N1hUv35EAiy8=; fh=EhPjOKm+pHyH6KCnnqqJ0IC14qr/W9sG0tO4aCH9ihI=; b=QDNJ+L+RsjunNlSN70DdYQNaz3yIEm54W23CrXwUxKKp987QFpE/RaKOo7hezOgKbq ezgX7M9Ai205HshTm1JcuApEQ+/cjdb8OezK8fmL7ivN9iZvEqBdCB8e8fBc++7iWcU/ h2hdUuHDodADQNP7w1y7UF05+mNAWRe3tICDa9cUgvwBoIYy5/uv5AHQ1+6XwbQEadGw 1qqFnaV3NdHsemmmS2bEoxBSJE81ob0dF+kkgGgH/i+a6Ky6BezDNbUunqbcMlQJcDti VPPE6ll+bL4cFy8FADT79iJCD43cObT+UETmmk1e0iNwRMIDmMmh9+SfBm0kw8kkrpgm NUgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qD4nTD1W; 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-127775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j17-20020ae9c211000000b0078a561153d1si10799160qkg.2.2024.04.02.03.50.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 03:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=qD4nTD1W; 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-127775-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127775-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id F2ED01C23296 for ; Tue, 2 Apr 2024 10:50:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 17BA55FBA1; Tue, 2 Apr 2024 10:50:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="qD4nTD1W" Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) (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 E402E5FB98 for ; Tue, 2 Apr 2024 10:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712055007; cv=none; b=X6C/nm3b4/p/zVcpnYQddEMPgenNp2YggVQ48JFgaXFJjq/9XVz4i5wjng4uTWRslAcx5egKIgvg/8mt5K9UJhgmPajZFbkvTlTlvi7DCeVNOFFjrBRByhfAVCqfhbg4at8jQLarTA47bYlosYgD03WLHKHVMXMW6KBT9Y4hKIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712055007; c=relaxed/simple; bh=skrlb+udmHJr6YwUZrY1WRcr/O427a2JM9RLbFAS99I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: References; b=JxnMSvWQUOWpdghisMCsPKF1+uGAmpAPswDJzzrKnFdimePoh0vly/gC0Lotn9iVN8LCmdTebN+uMvSuWeOtgGab+9CTs7oLP8iKnkYFA2RIUV7owdq1dCZX3/vA9Qf4blmpw3JPS2tJl8FGvaagE4Zx1YntrRetiCxvcznoWiA= 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=qD4nTD1W; arc=none smtp.client-ip=203.254.224.33 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 epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20240402104956epoutp031dbc90ab935794ea1900a08a881539eb~CcPLqHYQG0112701127epoutp03I for ; Tue, 2 Apr 2024 10:49:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20240402104956epoutp031dbc90ab935794ea1900a08a881539eb~CcPLqHYQG0112701127epoutp03I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1712054997; bh=9yxYze5dfhmoUzXm3YYn4+4ta1glAp8N1hUv35EAiy8=; h=From:To:Cc:Subject:Date:References:From; b=qD4nTD1WhDjjkuqNYRC23DzipMCKVSsYbbnTQxZlJAjvFabLI/OBaGcVUYp3EKZGv sSqby0wvgu/5wrF95HRLI+2FtepYTj+VwylurfUDy7oG5cq/d5aplSoYG+BTIEgTbD hZffugVR/wpV5SfgRMEBZU9vB6C3aEetnEHc9jCw= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20240402104956epcas1p4e4d19ab17c55ed789ce042916e6fc34e~CcPLOvk0P0407704077epcas1p4C; Tue, 2 Apr 2024 10:49:56 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.36.225]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4V84QX2x8nz4x9Pw; Tue, 2 Apr 2024 10:49:56 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 9C.96.09663.4D2EB066; Tue, 2 Apr 2024 19:49:56 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20240402104955epcas1p3dd15334a1305b99f3e1b82000e3c7c42~CcPKkm5qS1277012770epcas1p3x; Tue, 2 Apr 2024 10:49:55 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240402104955epsmtrp22943788078e38fea8b1f9ea6c3e5fa98~CcPKj4ufE2469524695epsmtrp2n; Tue, 2 Apr 2024 10:49:55 +0000 (GMT) X-AuditID: b6c32a37-557fa700000025bf-87-660be2d49e4d Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F4.03.08924.3D2EB066; Tue, 2 Apr 2024 19:49:55 +0900 (KST) Received: from parkseongsu-desktop.. (unknown [10.252.69.73]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240402104955epsmtip1658dffd28266f504c9c63b794f6c22ff~CcPKV7KAx1514115141epsmtip1Z; Tue, 2 Apr 2024 10:49:55 +0000 (GMT) From: Seongsu Park 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, sgsu.park@samsung.com, Leem ChaeHoon , Gyeonggeon Choi , Soomin Cho , DaeRo Lee , kmasta Subject: [PATCH] arm64: Fix double TCR_T0SZ_OFFSET shift Date: Tue, 2 Apr 2024 19:49:50 +0900 Message-Id: <20240402104950.170632-1-sgsu.park@samsung.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEJsWRmVeSWpSXmKPExsWy7bCmnu6VR9xpBqsXi1j8/PKe0eL9sh5G i01t9xkt/mzczWTx5e9SZotNj6+xWlzeNYfNYun1i0wW7xu6WC0m/djCaNH++QWrRcsdUwce jzXz1jB67Jx1l91j06pONo/NS+o9+rasYvQ4dHYBq8fnTXIB7FHZNhmpiSmpRQqpecn5KZl5 6bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlAdyoplCXmlAKFAhKLi5X07WyK8ktL UhUy8otLbJVSC1JyCswK9IoTc4tL89L18lJLrAwNDIxMgQoTsjP2Xn/GVPCGs+Lgx8vMDYxH OboYOTkkBEwkpndNZ+ti5OIQEtjBKLF04m4WCOcTo8TaFc+gMt8YJe53HmGHaTmzdy8zRGIv o8SXyYuZ4VoeHZ/AAlLFJqAlsfpfL1iHiECoxOsZ68FGMQvMYpJYcHQvWJGwgIXEonXPwGwW AVWJG3fugNm8AtYSB1YcZIJYJy+x/+BZZoi4oMTJmU/AapiB4s1bZzND1LRySEzd7gphu0gc P3gAqldY4tXxLVBnS0l8freXDcIultj3ZQ1Ub43Eg3l7oGx7iY5nbUDzOYDma0qs36UPsYpP 4t3XHlaQsIQAr0RHmxCEqSxxbqsjhCkp8WeBHsQMD4mO/RAzhARiJVasr5rAKDcLyfWzkFw/ C2HTAkbmVYxiqQXFuempxYYFxvBoTM7P3cQITpxa5jsYp739oHeIkYmD8RCjBAezkgjvT2/O NCHelMTKqtSi/Pii0pzU4kOMpsDwnMgsJZqcD0zdeSXxhiaWBiZmRiYWxpbGZkrivGeulKUK CaQnlqRmp6YWpBbB9DFxcEo1MO3KtEwoF36aERG3/NTdW/zKD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zfkdr6QPjxYlRokErZ8l2tkpra68LPAuF9dxVoOSIv0fOlJattM53E5yrZs+3cLhSPbK4wU6 88K4O2ouPLvI/8kx0PpqY+CEjbemT/JKKxKpf2me+f7x8beW6XHp33UWWN85+kpjAWtri5ZD 4vq4WxIuOrJxEd/LbRX3tisLatUkXD5TbNfjecW5dz3PxN/WbPn7593+vG/+zLKf2w9GaPU+ O6LEUpyRaKjFXFScCADu8mnD4wIAAA== X-CMS-MailID: 20240402104955epcas1p3dd15334a1305b99f3e1b82000e3c7c42 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240402104955epcas1p3dd15334a1305b99f3e1b82000e3c7c42 References: We have already shifted the value of t0sz in TCR_T0SZ by TCR_T0SZ_OFFSET. So, the TCR_T0SZ_OFFSET shift here should be removed. Co-developed-by: Leem ChaeHoon Signed-off-by: Leem ChaeHoon Co-developed-by: Gyeonggeon Choi Signed-off-by: Gyeonggeon Choi Co-developed-by: Soomin Cho Signed-off-by: Soomin Cho Co-developed-by: DaeRo Lee Signed-off-by: DaeRo Lee Co-developed-by: kmasta Signed-off-by: kmasta Signed-off-by: Seongsu Park --- arch/arm64/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h index c768d16b81a4..58de99836d2e 100644 --- a/arch/arm64/include/asm/mmu_context.h +++ b/arch/arm64/include/asm/mmu_context.h @@ -76,7 +76,7 @@ static inline void __cpu_set_tcr_t0sz(unsigned long t0sz) return; tcr &= ~TCR_T0SZ_MASK; - tcr |= t0sz << TCR_T0SZ_OFFSET; + tcr |= t0sz; write_sysreg(tcr, tcr_el1); isb(); } -- 2.34.1