Received: by 10.223.185.116 with SMTP id b49csp2314592wrg; Thu, 15 Feb 2018 09:41:48 -0800 (PST) X-Google-Smtp-Source: AH8x227wQasqg2CAG+c96HC4+4J+oIhD+zqUj1WbsM0RY1NqyUjYgevzaJVaIkXKqT8tNgPyGM8T X-Received: by 2002:a17:902:540f:: with SMTP id d15-v6mr3298460pli.224.1518716508044; Thu, 15 Feb 2018 09:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518716508; cv=none; d=google.com; s=arc-20160816; b=cGrDiDmNgZCIyVZ2LYh2IxCMZvur+edVckvpgRCHuDOX2wK4gtR3bQ6NjE4taac5VY MuiLEIQtsdq8COJfHMP8q6a4dzVDo8ZIMU/DeSxn7ziLs8Yk0Y+sPsvS3fQ/fFmMxGIQ SACRpjge50rFEKgx9cIGj1bcggNthrRvY04NgbPlyqJ+yaiqN2/g65gVpGV4WLyYLGDw hNBDJCois1ANoSDOsQ8vSAH01hgFSUJS+mcorxj5DYJtprR2pZ7FwX2y9k+3Xv8wqKQz Dn8F+6ejWa1TX2q59yUGNAe1SsL3SvZSVh6CqKOLXThoDwM2+3czJn322Vlt34vwi+Ty o1/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=sL5ab00/i8wyPPZ+FMZ9dBeP08cRYAAf8hC05MV2okM=; b=kvjbQHaIzgp0+RM+ZWmAAJ4sl29DzfBlNUDiCx30TnxHeuAT9qkhC++fylaBqr5t7Z XD7Ybl0CTjxp2KI2Iz6YZy/2+zKCQZb2CkLZYr4+PUZ9CQDMUSwr6uldhyiIhiLK9kd8 tuH0RBpE9vEFemY5+4z05Q7rwbIlmbcDoA4fSbBXRCFIyZhYK7UIUafS4ox87CAi7eLe Sd1uuu1kCX+pa87cSF0fLCW7nG6ap/glofzWHYx1LL5HiFp2kDfxDwXyLxufgU351RmD qNVhUQ56MR9F9hh1tQOR2FeiMRbwcIwOzljrfUcfNf8NZDK2x7M2iFKLQtJTjT7tTgJW HU/g== ARC-Authentication-Results: i=1; mx.google.com; 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 o184si1689169pga.245.2018.02.15.09.41.33; Thu, 15 Feb 2018 09:41:48 -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; 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 S1164657AbeBOPch (ORCPT + 99 others); Thu, 15 Feb 2018 10:32:37 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56444 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164227AbeBOPce (ORCPT ); Thu, 15 Feb 2018 10:32:34 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 59666ECC; Thu, 15 Feb 2018 15:32:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Pieralisi , Will Deacon , Catalin Marinas , Ard Biesheuvel Subject: [PATCH 4.14 068/195] [Variant 2/Spectre-v2] drivers/firmware: Expose psci_get_version through psci_ops structure Date: Thu, 15 Feb 2018 16:15:59 +0100 Message-Id: <20180215151709.118920798@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151705.738773577@linuxfoundation.org> References: <20180215151705.738773577@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Will Deacon Commit d68e3ba5303f upstream. Entry into recent versions of ARM Trusted Firmware will invalidate the CPU branch predictor state in order to protect against aliasing attacks. This patch exposes the PSCI "VERSION" function via psci_ops, so that it can be invoked outside of the PSCI driver where necessary. Acked-by: Lorenzo Pieralisi Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/psci.c | 2 ++ include/linux/psci.h | 1 + 2 files changed, 3 insertions(+) --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -496,6 +496,8 @@ static void __init psci_init_migrate(voi static void __init psci_0_2_set_functions(void) { pr_info("Using standard PSCI v0.2 function IDs\n"); + psci_ops.get_version = psci_get_version; + psci_function_id[PSCI_FN_CPU_SUSPEND] = PSCI_FN_NATIVE(0_2, CPU_SUSPEND); psci_ops.cpu_suspend = psci_cpu_suspend; --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -26,6 +26,7 @@ int psci_cpu_init_idle(unsigned int cpu) int psci_cpu_suspend_enter(unsigned long index); struct psci_operations { + u32 (*get_version)(void); int (*cpu_suspend)(u32 state, unsigned long entry_point); int (*cpu_off)(u32 state); int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);