Received: by 10.223.185.116 with SMTP id b49csp2249587wrg; Thu, 15 Feb 2018 08:44:47 -0800 (PST) X-Google-Smtp-Source: AH8x225L5GBui42Jk97sN1e4TzWihvzB8bU8X9UWHF7YtqWQaCksYrxT5tQ+vo1qwkDBosvPrBgl X-Received: by 10.99.125.13 with SMTP id y13mr2649044pgc.282.1518713087612; Thu, 15 Feb 2018 08:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518713087; cv=none; d=google.com; s=arc-20160816; b=SRnUv42TzLPhBvtVeFOlB+ep/MTu//Bu7RrARkFvcUfk73WAHwgxh12EiD03y/Vs65 VqUg0DPnUCI9TGCGumZDwtswtU1SiYrMWrZhn5HRUQcHo5JXkRZ5BriOS69hHkbyuHAR HQ0bsvcaItqwfkc5SrndxQCM+nIDs7PH9nKR7op2x5y2sJOfbCWjUMthkZUj7R0N/LqV vRX0LU2hJrRTArE08YIHqKuJUeCRgG3Kq8xfprnYcRJixwtEaXFaaLed5XKcJlAcSW2H Iv71Yw0f0Nv2dF9EWpq7Db30bHqp/sSMLYwA9LYgjvQIHN624o/zWrFwrv6Dh77qIcof AU3g== 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=JJKLR6P3yKaAnrCWi5bXwuNGAFyxCFWJ/HVmY/ECsyM=; b=EHr71H6ySm4oBDcVjfFevrri6XhG+KW7dCc8cVbBhVPm91NgLECHU01pbzjEBtGqC1 rbE7wO6vUvqnezLj4vFYh9hD+qgDIdKVylVhpefZboE8tGZWXzVHfLO4m+IYnLV8qLvP 2MEHW5pXSMlu8pFxWWskh33hgJ+0bQhHq1pqVG9kczuBUTHxxxYgSVXiqTeASVPv63ZJ DWodOi/xjbPXnf8w3XU8/oFjmgLP1fDRTiy3pmoSydghqRg78v5GqzYT3s6SIw74GgMw U5n43s9lFXXQsEh4cVmYAUmsI9Jp9+CyU+m6gwbbIjdMtvIllaLt0xQhwNbYApw4Z8s1 Ajlg== 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 i6-v6si2920519plr.802.2018.02.15.08.44.32; Thu, 15 Feb 2018 08:44:47 -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 S1426343AbeBOQn0 (ORCPT + 99 others); Thu, 15 Feb 2018 11:43:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60398 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423873AbeBOPlQ (ORCPT ); Thu, 15 Feb 2018 10:41:16 -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 2DBEE9D; Thu, 15 Feb 2018 15:41:16 +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 Subject: [PATCH 4.15 061/202] [Variant 2/Spectre-v2] drivers/firmware: Expose psci_get_version through psci_ops structure Date: Thu, 15 Feb 2018 16:16:01 +0100 Message-Id: <20180215151716.565495689@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@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.15-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: 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);