Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7908906ybl; Thu, 16 Jan 2020 07:34:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwQyVwQMGx4JoPCznAA5byXGbKVvFZDWIDEcpXrvvsNoc5mTtu5+zcyvIZMTRCjMcvUaIDD X-Received: by 2002:aca:51c9:: with SMTP id f192mr4607847oib.10.1579188886028; Thu, 16 Jan 2020 07:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579188886; cv=none; d=google.com; s=arc-20160816; b=McmK0ok7U7KLu9MBk6GaRs7gGxTn84xCZfow9Xy+dHguF3s0PoLi/MOdIPj7PnEl1P uD0s/pFrnaEBYiQNOWx1CxsgZQ5LaQu6ESWP5Cz/KGCOkrotELy7CJPTXGhir7vyPyAf +GHWDnKSCAmv0QCTjbfLf7poInabJ62cNM5zcOhDKuluuZRtipMaifrPzCAgJETL+aKT hNNzHZ2guaLbhYYA2ubgTQqzb9shV71Cvcx5e6kKDfDsMajwVSB2mIEfuR3XlYM/taM5 EKnSyYkUnkVIBTOVsqooIOcSw/iyJcIR/Q3rxyXyVvcD5rQ197WxACiXXFbIY+AOqgj2 lZ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=X2NixT47Tkit0/jFo5DqWpDOqdP2VEJmWIFJEWmqtWM=; b=gi9FI5ftZwAw2b5pD+eB84Aotud4EQPRpPU0R9bZ4Jvdcioz1ybFRrNBMLEt4Jmvs3 H/0fcpNlTzIA/UHz82ZFSCWV2TapY/RSJslwmcEsbVQMRFuU5J6p/htcZv8KFts1AAfI HvtG2pIhVKOy+/5Io78gfoXf0MEqi/oe+gjhnOQC9Qco3dZPt5tlkWUHFt6gklz0qbEt OibpUxGEJZVoJvjaVRi7QexdsO4PifMX5rUGnb+xAaOEepaJdEwgD8L/FbFjsh9qPJky I9y48Xv6kkwhFv906wCyV9J/FHbk8TLKfUeMkWYJK8V2H0wehJwBf27Bxcy154VXvU/S wOdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SldGcIE8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si13702137otp.13.2020.01.16.07.34.33; Thu, 16 Jan 2020 07:34:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SldGcIE8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728905AbgAPPco (ORCPT + 99 others); Thu, 16 Jan 2020 10:32:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:40814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgAPPco (ORCPT ); Thu, 16 Jan 2020 10:32:44 -0500 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 557F42081E; Thu, 16 Jan 2020 15:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579188763; bh=2KRjK1V41mmh2xoe9yYAj/6+Sq91KlveZCbfKn1X4x0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SldGcIE8mha8oKPdrIJb8hthCy0q6gcgCf67U/lpFtQ/XcsdwrAw3YY2m97nPOltB FkCxoc/5h7MIqK71DwsGfEgIyrYs6sWdsl2zuc/d8GPBOM+D8muFITxxgPfy62MAfT HCM5EYBCOfA46QiSbtnvOL1lIN51VTMvF2KX2IDM= Date: Thu, 16 Jan 2020 15:32:38 +0000 From: Will Deacon To: Sai Prakash Ranjan , jhugo@codeaurora.org Cc: Catalin Marinas , Marc Zyngier , Andre Przywara , Mark Rutland , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Douglas Anderson , Stephen Boyd , Bjorn Andersson , Matthias Kaehlcke , James Morse Subject: Re: [PATCH] arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list Message-ID: <20200116153235.GA18909@willie-the-truck> References: <20200116141912.15465-1-saiprakash.ranjan@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200116141912.15465-1-saiprakash.ranjan@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+Jeffrey] On Thu, Jan 16, 2020 at 07:49:12PM +0530, Sai Prakash Ranjan wrote: > KRYO3XX silver CPU cores and KRYO4XX silver, gold CPU cores > are not affected by Spectre variant 2. Add them to spectre_v2 > safe list to correct ARM_SMCCC_ARCH_WORKAROUND_1 warning and > vulnerability sysfs value. > > Signed-off-by: Sai Prakash Ranjan > --- > arch/arm64/include/asm/cputype.h | 6 ++++++ > arch/arm64/kernel/cpu_errata.c | 3 +++ > 2 files changed, 9 insertions(+) > > diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h > index aca07c2f6e6e..7219cddeba66 100644 > --- a/arch/arm64/include/asm/cputype.h > +++ b/arch/arm64/include/asm/cputype.h > @@ -85,6 +85,9 @@ > #define QCOM_CPU_PART_FALKOR_V1 0x800 > #define QCOM_CPU_PART_FALKOR 0xC00 > #define QCOM_CPU_PART_KRYO 0x200 > +#define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803 > +#define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804 > +#define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805 Jeffrey is the only person I know who understands the CPU naming here, so I've added him in case this needs either renaming or extending to cover other CPUs. I wouldn't be at all surprised if we need a function call rather than a bunch of table entries... That said, the internet claims that KRYO4XX gold is based on Cortex-A76, and so CSV2 should be set... Will