Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3717866rwb; Tue, 8 Nov 2022 07:40:10 -0800 (PST) X-Google-Smtp-Source: AMsMyM5Z5w9L2BplfCiLeyOu8BzmE2sVYebByk7NqF7aVdecU+An1/JOeowhy4VVw6CBxgi4Dc6z X-Received: by 2002:a17:906:c151:b0:78d:cdbc:9fb7 with SMTP id dp17-20020a170906c15100b0078dcdbc9fb7mr52122693ejc.688.1667922010504; Tue, 08 Nov 2022 07:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667922010; cv=none; d=google.com; s=arc-20160816; b=wVOTtTOj7MGP64qmjEwpRFOrwnSvR/EA0kP1SVEzC+h53pIS51kz94phyMEOBpKs8j v+1KSydx3+VXjIFbfpyMbdxkqERyXtncvv3iyMlBRu4wwD91fJ+zuKRwNG4Pv4uOCYmp 2jhdBL0UejwBzfUmtE8VEM8dkdaksjl3ERL5y4VUyVq6GZ6YDw6z94JtjPwHypW4xjVE Bvl3Gr/PyIdqlyjx8CqF/+4VAq+7e9rf/MZOM6WZq3z6GJ1tJNJxRQMphO/6J/1sSsbB 7Hpd0/rz0Mmk21zcVeNMP/VkexrbQn2vGO52Vn5kJSJZjXokHa4bIbBUa0/Y180buvKw 9MpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=7KNNbiBXvt9IPXkO9j+1hgfmBTfS5AqTK/bJCbxBSFc=; b=MjhshrVBcLOc/xfNr+XrzXb/KTceCrWBF7lDShPmd/31nDZVzQXrDqOr0/m8DBvvtg dL8Umv8FtJv1cz6me+v3SVn9VVNIDf1xzGj/6ST4+oeBnzGLdUFXu7syF7QKI32ufwZS +TWvxm4wXgxdlVOoUMvcKc23NQSZI2998+XvUI0WE0CEZo8SO/++vI3ptU9lTHIwTLvI 4Jx0LUXlmsh5LciRVdePAyDYmkB16+TPgu13X10JanuNMP+1Vlh53Q2g7jjVMV4arkS9 gspPspbuCXOiTvjzIkIxzzFKpTwUOcw5daeSMFYA5nnTVc00ZZACP/iQnxA8Y1IFWhvh hV5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZRp4TDwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg25-20020a170907971900b0078dc5b2b6c4si12878207ejc.666.2022.11.08.07.39.48; Tue, 08 Nov 2022 07:40:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZRp4TDwm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233468AbiKHO5O (ORCPT + 91 others); Tue, 8 Nov 2022 09:57:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234517AbiKHO5J (ORCPT ); Tue, 8 Nov 2022 09:57:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9CF21AC for ; Tue, 8 Nov 2022 06:57:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 20DF7B81B08 for ; Tue, 8 Nov 2022 14:57:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4607C433D7; Tue, 8 Nov 2022 14:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667919423; bh=8/7+dZAfZ4oLmH8C5GDxy0YK9sTb0CaI2LgkvYa7ypQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZRp4TDwm4I6QtzjpO11Izbisr1RkIA9BCxRVOMSVPsbk18zDUBJ9ttSLeJHbIfbf9 L1eSjllGAic8am5jy6YYT56gFXtkN/46a3IxdvLgU+ksVStZxfofSJGjQZJhKgwEhL bNXDRi1yAal0PXnhf4o4WEKMXE8FWJ40A6j5W05XrVQEr/VWtQFbMVinKMYgQIHaDL 8URElVjmbBaraVEzwEaDDdN5RBwKKjb/aWjNI/B4B6AztrPlxCQzfFv1glqW3oBTiW RhXlSkPTse1RWcr9pHvmDc8i92xJQr1Q2q4rb2LSKHXdfaDRANkdCDJGhOQeVmiqa+ /3iQgOV061IJA== Date: Tue, 8 Nov 2022 14:56:57 +0000 From: Will Deacon To: Mark Rutland Cc: Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Eric Biggers , "Jason A . Donenfeld" , Kees Cook , Suzuki K Poulose , Adam Langley Subject: Re: [PATCH v2] arm64: Enable data independent timing (DIT) in the kernel Message-ID: <20221108145656.GA23059@willie-the-truck> References: <20221107172400.1851434-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 08, 2022 at 02:41:26PM +0000, Mark Rutland wrote: > On Mon, Nov 07, 2022 at 06:24:00PM +0100, Ard Biesheuvel wrote: > > diff --git a/arch/arm64/kernel/suspend.c b/arch/arm64/kernel/suspend.c > > index 8b02d310838f9240..3032a82ea51a19f7 100644 > > --- a/arch/arm64/kernel/suspend.c > > +++ b/arch/arm64/kernel/suspend.c > > @@ -60,6 +60,8 @@ void notrace __cpu_suspend_exit(void) > > * PSTATE was not saved over suspend/resume, re-enable any detected > > * features that might not have been set correctly. > > */ > > + if (cpu_has_dit()) > > + set_pstate_dit(1); > > As above, I'd prefer if we either renamed cpu_has_dit() to cpus_have_dit(), or > just open-coded this as: > > if (cpus_have_const_cap(ARM64_HAS_DIT)) > set_pstate_dit(1); > > With either of those options: > > Acked-by: Mark Rutland > > I assume Will might fix that up when applying. Yup, I'll take care of that. Will