Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7830116ybl; Thu, 16 Jan 2020 06:20:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyW7U1sa7WQCEXPKcpY9xHMcpwicFD2N+sHl3WrWaJbD9MW8LRdo1M9gBnvdguogNhy2l65 X-Received: by 2002:a9d:7757:: with SMTP id t23mr2163365otl.315.1579184446425; Thu, 16 Jan 2020 06:20:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579184446; cv=none; d=google.com; s=arc-20160816; b=xi+blUmL4qzY/95FMowryyLJ58Co4EWJ/oodU14vbdCD9JvMvN3RjrsKGPYG8kHeeM ei1wiayl91f8ggN+VpF6Mbfd4CvqbR01FMFhTDh47tn7PjWe0o1LlQOCvjWtNIS8ybql VgWrQYD3j1W6YSFDqjaVcXTLheyI9rD0et4c4L4VQmQ81wPbklpcj7zTrBvcpQgz0ciY BQxa87xI1iP8tyhdEWH+FuJlPUOEadPao492+vgvTdgABEvFK8F9SMwEVRBGWgKoYD2Y B8j4Y6cuVxanH+DNhj4Zcv99UzFK4k79nHHI9ZqZdFAm1Gi8LKlCRw7hm9F4c3YnKqIh 8cQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature; bh=F/smCYCNf+T2ixQGU3VAUh8QI4L0ikLpSfao8JkC1WE=; b=qMhEV4eEL4ZZpf9r1UljN+c01y17RNXpEAooJY3pewBzLlm+nKJthoLeSaeyzr+qJv d/4TH28+53jHCm63QWblT6ERXp5nbR7eceMpAv+sFebdjpQwCIVXD/YeRmUPEEYh+/85 VKxDaWjkF2xOgFS1D1QTV84Z+yCv2z80fTLOgCG0KlmyoYCwzAt6NIQP59UyJl/oI/Kn EM6X8JS+czrkMo0Ipi0YK3oowRp9AGfHwA725cm5PI/Odkqa7CbG8qawyqJ8NKmyLVoD 4WLP6gW3h7Atuj8Fn4z8GShPbiYKUc5lsWiv6NC1lurOQev9sjndKeeMiealztxcG7wF vZ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=XnuNuet4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si11936144oig.255.2020.01.16.06.20.33; Thu, 16 Jan 2020 06:20: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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=XnuNuet4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgAPOTe (ORCPT + 99 others); Thu, 16 Jan 2020 09:19:34 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:41079 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgAPOTe (ORCPT ); Thu, 16 Jan 2020 09:19:34 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1579184373; h=Content-Transfer-Encoding: MIME-Version: Message-Id: Date: Subject: Cc: To: From: Sender; bh=F/smCYCNf+T2ixQGU3VAUh8QI4L0ikLpSfao8JkC1WE=; b=XnuNuet477cSyDCMvYn8OKYOI9ltDh1v5W53iPm+eLmWKTRc4QUNTTILxPKLZgqClP8XUsfd TOsB8hCizOcJlK/oXJ97erHmtrlTIXrZKZ+XRUmV11iIp4UsrkvOv3iHeY1Ep7a4yu0TIWgO QMC0rJPgxNTw0QWTKvskTDlQM+g= X-Mailgun-Sending-Ip: 104.130.122.25 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e2070f1.7f57b72bb618-smtp-out-n01; Thu, 16 Jan 2020 14:19:29 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C9729C43383; Thu, 16 Jan 2020 14:19:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=2.0 tests=ALL_TRUSTED,SPF_NONE, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-253.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0B27DC433CB; Thu, 16 Jan 2020 14:19:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0B27DC433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=saiprakash.ranjan@codeaurora.org From: Sai Prakash Ranjan To: Will Deacon , Catalin Marinas , Marc Zyngier , Andre Przywara , Mark Rutland Cc: 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 , Sai Prakash Ranjan Subject: [PATCH] arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list Date: Thu, 16 Jan 2020 19:49:12 +0530 Message-Id: <20200116141912.15465-1-saiprakash.ranjan@codeaurora.org> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 #define NVIDIA_CPU_PART_DENVER 0x003 #define NVIDIA_CPU_PART_CARMEL 0x004 @@ -111,6 +114,9 @@ #define MIDR_QCOM_FALKOR_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR_V1) #define MIDR_QCOM_FALKOR MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_FALKOR) #define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO) +#define MIDR_QCOM_KRYO_3XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_SILVER) +#define MIDR_QCOM_KRYO_4XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_GOLD) +#define MIDR_QCOM_KRYO_4XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_SILVER) #define MIDR_NVIDIA_DENVER MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_DENVER) #define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL) #define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX) diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 85f4bec22f6d..58ba2d1c66a3 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -548,6 +548,9 @@ static const struct midr_range spectre_v2_safe_list[] = { MIDR_ALL_VERSIONS(MIDR_CORTEX_A55), MIDR_ALL_VERSIONS(MIDR_BRAHMA_B53), MIDR_ALL_VERSIONS(MIDR_HISI_TSV110), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_SILVER), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_SILVER), { /* sentinel */ } }; -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation