From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBF40C47247 for ; Tue, 5 May 2020 11:10:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDCDD206B8 for ; Tue, 5 May 2020 11:10:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QUuDLTMy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Xcd5vIJg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDCDD206B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S/155wM3fK2Wt60uWEsFwy+hMKftjVDEcDraCwvIfcY=; b=QUuDLTMy3Tqpsy NNiQXzsbOHBLTQ7TA/bYXJmMTD+OZDJYgHqjIhBI/SRD4AbIuWkd5XAS0z22Ykf6vN8u92K9fNqN/ sz6oy5wDfqSlWm/48ySscXaEftYeEMW8q68Xb/mklsSnxuCimjsePWIRxYnZIQ13co0Kdv7+ogoSz e1zn7ts2uo8vLCLtmwuShFqyoeuy9Wv3c5o95uwrRyFdTRXTU931ZCTtr+2il5huFGj8G9ikfddRW sdjXu++QG7uiXaUTHMcD344tCfFPvg7LACU6/bVBvn1eLPb0Gm0TdMWrWgrTXtX6ah+DySz/70ZNH Jyp78IcHMFTwRInceyHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVvTR-0004ca-DE; Tue, 05 May 2020 11:10:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVvTO-0004b4-1o for linux-arm-kernel@lists.infradead.org; Tue, 05 May 2020 11:10:51 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1ED0206B8; Tue, 5 May 2020 11:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588677049; bh=tLnC3k0rye0luMgLxFSFH5txN4xnLzlLq84ZHZhCA2Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xcd5vIJgLtqRrkuJPCcdbU5b2WtJlWCm7UfhN/ckq+9vmS9qPWkYH8U94I7Ta3xG6 B3gwrGBf+MKsezEyVcBIqJfTF5o0pjmu+4FRTfre6YfZi2V53Ty7hZuThX/Y1cO5vq S39yKwl2ZnHA6kNGQTole+6zuVkz6j6CVXpE84w0= Date: Tue, 5 May 2020 12:10:45 +0100 From: Will Deacon To: Anshuman Khandual Subject: Re: [PATCH V3 03/16] arm64/cpufeature: Make doublelock a signed feature in ID_AA64DFR0 Message-ID: <20200505111045.GE19710@willie-the-truck> References: <1588426445-24344-1-git-send-email-anshuman.khandual@arm.com> <1588426445-24344-4-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1588426445-24344-4-git-send-email-anshuman.khandual@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200505_041050_119193_AA3492B1 X-CRM114-Status: GOOD ( 17.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Suzuki K Poulose Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, May 02, 2020 at 07:03:52PM +0530, Anshuman Khandual wrote: > Double lock feature can have the following possible values. > > 0b0000 - Double lock implemented > 0b1111 - Double lock not implemented > > But in case of a conflict the safe value should be 0b1111. Hence this must > be a signed feature instead. Also change FTR_EXACT to FTR_LOWER_SAFE. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Rutland > Cc: Suzuki K Poulose > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > > Suggested-by: Suzuki K Poulose > Signed-off-by: Anshuman Khandual > --- > arch/arm64/kernel/cpufeature.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > index 51386dade423..cba43e4a5c79 100644 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -338,7 +338,7 @@ static const struct arm64_ftr_bits ftr_id_mmfr0[] = { > }; > > static const struct arm64_ftr_bits ftr_id_aa64dfr0[] = { > - ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_EXACT, 36, 28, 0), > + S_ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, 36, 28, 0), Wait, isn't this buggered today? Shouldn't that 28 be a 4? I think we really need to: 1. Make it impossible to describe overlapping fields, incomplete registers etc (ideally at build-time) 2. Have a macro that for 4-bit fields so you don't have to type '4' all the time Suzuki, any ideas how we can make this a bit more robust? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel