Received: by 2002:ab2:5182:0:b0:1f4:61d5:3ad4 with SMTP id x2csp78232lqi; Fri, 5 Apr 2024 10:12:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjS/ISsp/aj5S/KMLdhtkX94ELU4A4AE8tgxf9C36I/FVueevbYAOkUBfohg4w0QP2His+uPdJy9sbbh7vRRKhA5/dIidgupLsWWvcyg== X-Google-Smtp-Source: AGHT+IFZLYq5T4RqkmOKdYtuMDA8Hcda+T1+Yu74iDLmnU1XwhtVVdi1MFyBfQvWtYA1D1cATZWV X-Received: by 2002:a05:6a20:ce4e:b0:1a3:c43c:9ccd with SMTP id id14-20020a056a20ce4e00b001a3c43c9ccdmr2763249pzb.42.1712337148395; Fri, 05 Apr 2024 10:12:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712337148; cv=pass; d=google.com; s=arc-20160816; b=Y/elTfIhyUr0sBaJO7NGFYbokW+yj0dmeODP+mbWpUq6SZKPumtLmRULcKvz/xR3wu CObWU5R6D9Mr/oi1IPDua89YCYnqHf74F3mE7jLuqjHJ5YnFbU/qskuNCxNOs27XcwhG BjWozJntURWxE0TROoBVJ0gbtCBmKNnc7QhL6KiXO4XfLhg/t6TIo50EguPEAMPrR0C2 oyKOYpj61Ce3Pi1KTRnFMnlywtNMAzJ5rO3Y1k581l5cjhQ+6sP4PtXqa4hHUkbPRLC4 RafezWkXp9g+mjhQBDxRMD5bfv+JiD+fQ+eIMP5eL7EqvWUuKEAWXpDhMRziv9pvHEv6 Ruag== 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=BAyVx9/BRd9ulPhlLHAV8X8/W2lqFnZDsau6NEA1XAo=; fh=dB21D5xk1k6P6ZLyPmeDankCbQcl9rjhySMJGg4g3iA=; b=JMHLHrF2pfYKeOnw2vK1O7xnK4TRCE4YtAht2g1p5fBMHXYlQjp3P6NbrkMJt7wZ/P 0lnRBV6brCc1YpfYTgD3rdtD/Bzu/AeFRiIa+yxpVE6S3A2J/R9vA5PcWoBaMFIGG2sq YW9X5oXzyUx7GkKPaanv/8F4L2Dsxh1uPH9krr5ZjK037o2GuTr+3ptMBwqfUyqm8Ju/ 3pPhPYxh0UuhBIyiwzHhktookIgYP8WE+5pvtB+fqSQf28t4Xk3FkwATv6qjTzK0w1e3 mzpNBx2NKJJW76l8JptV6dwp50KgKVjF5p5ODk0oiaFMKHr/M9Prpjp2O0HxBHHY4nuO JTgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-133406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133406-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 r4-20020a63ec44000000b005e49532dc9esi1668804pgj.309.2024.04.05.10.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 10:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133406-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-133406-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133406-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 BD53F281258 for ; Fri, 5 Apr 2024 17:12:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E913B16C858; Fri, 5 Apr 2024 17:11:00 +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 6BE9017167A for ; Fri, 5 Apr 2024 17:11:00 +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=1712337060; cv=none; b=CBLG7G7N6PVbbVX4NoYVQtM0bFmMiX1LqD9q4VtyDR/zRJnytBQf4a4XAod7bSi5fuplwv6bmhfPkqSu62F2BcNwyRlv5xgmQoNP2vp9IiMUdiNqWJPf01PjY+htQbc+aRyibqvK8QRZp0XgRi10x3dqTRvGRVj6RJTKl4cJzTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712337060; c=relaxed/simple; bh=k9AUnheYHDZKaKIvTDFwV69cRi4PYIH7IBWxMOsDcjU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ioKmAeTrNpNHSQlV1xF+8OeVMoqgBfqVNBlT2X46/axnFvo8xTp1OBpyi5vAG5MHou/ZvBXYaeEQgy2aQqd/UOByimZMn8FpjzKMwW93VKEVkgSpYxTmPQRVnS2gxOqE2f8l1g4AE+JFy3IgeNONgD9Lzl5wVkQuTuOlXhDl/BQ= 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 DAD8DC433C7; Fri, 5 Apr 2024 17:10:56 +0000 (UTC) Date: Fri, 5 Apr 2024 18:10:54 +0100 From: Catalin Marinas To: Gavin Shan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, akpm@linux-foundation.org, maz@kernel.org, oliver.upton@linux.dev, ryan.roberts@arm.com, apopple@nvidia.com, rananta@google.com, mark.rutland@arm.com, v-songbaohua@oppo.com, yangyicong@hisilicon.com, shahuang@redhat.com, yihyu@redhat.com, shan.gavin@gmail.com Subject: Re: [PATCH v3 2/3] arm64: tlb: Improve __TLBI_VADDR_RANGE() Message-ID: References: <20240405035852.1532010-1-gshan@redhat.com> <20240405035852.1532010-3-gshan@redhat.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: <20240405035852.1532010-3-gshan@redhat.com> On Fri, Apr 05, 2024 at 01:58:51PM +1000, Gavin Shan wrote: > The macro returns the operand of TLBI RANGE instruction. A mask needs > to be applied to each individual field upon producing the operand, to > avoid the adjacent fields can interfere with each other when invalid > arguments have been provided. The code looks more tidy at least with > a mask and FIELD_PREP(). > > Suggested-by: Marc Zyngier > Signed-off-by: Gavin Shan Reviewed-by: Catalin Marinas