Received: by 10.223.185.116 with SMTP id b49csp2562283wrg; Thu, 15 Feb 2018 13:42:00 -0800 (PST) X-Google-Smtp-Source: AH8x225+EwoyTQu+0I1nrSrZEOHVolmERtG2mk4b9xGsROZi5Ow8CIPLsFY/3ql3xY5FggxyDfJb X-Received: by 10.99.98.5 with SMTP id w5mr3377755pgb.307.1518730920870; Thu, 15 Feb 2018 13:42:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518730920; cv=none; d=google.com; s=arc-20160816; b=ZVFoCdBGRqQo/0hmc+QrYwXy0I27OLxpVEwahC6vgFn22SW3GNv1mLVO99+MVT5aia ahwY4NisICCFtw25miy4E14WNHRmPlEXqM/9O3zlPJVDOa48d/euiNUlmgst1AH8pHrf humGgltyeHbS90G2rLpPaWx3wBac1gFAkIKlk94Em1GJCFwCoMLJ9GAkgJxL9CRPUHlO kZgwKjM/ZxB2M2m+Noys0HONgj1IvIUx46NUJL0gV4coIzdYhRpIOVhccomHrVMWCt7e n97h0uMFCuMaOK7uIgMmILiwK22CHG55Bs2BP86Vw7UKWxn3gxLbF0Qy/qPYW93Nc2F8 UA8Q== 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=jQGt2mMVXlrHJOgGr7MYi9dw9HJk6DnrMHAbBQh/nqc=; b=c0E50wSOiyNA96wuJSs+alPERkRJWs5mMuGK/yzL4FzeQRYS/5G1Jy1Pp846s6oJNc ZSM8QbLrKVWcvofJQD5VF50kxJ6PzZNrLv45f8ScOy6U/iAvcbWRWM8bkgAYuAh0qqNN 7C1u6Ajh7PnNOfXV6IwLXuMpgWiwsy8y/tUk3Uqd7utdORZyjZcYOuXds+s84MpIlwU2 UhhqcN9rPDP8spF1z4CRcHgu/fSndZ91AVbn8yDjOc4slNYzIiD5H0IE8SN2bUqA4YsZ GXfS4HhCsp/5uDeFMFcgD3V/+H2BLZpHM6cMOVgDMpCPKxKIshh+hgcbDXJ8/xVIeylQ R4GQ== 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 t137si74682pgb.736.2018.02.15.13.41.45; Thu, 15 Feb 2018 13:42:00 -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 S1164671AbeBOPcj (ORCPT + 99 others); Thu, 15 Feb 2018 10:32:39 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56434 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164637AbeBOPcb (ORCPT ); Thu, 15 Feb 2018 10:32:31 -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 A66BFECC; Thu, 15 Feb 2018 15:32:30 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suzuki K Poulose , Will Deacon , Catalin Marinas , Ard Biesheuvel Subject: [PATCH 4.14 067/195] [Variant 2/Spectre-v2] arm64: cpufeature: Pass capability structure to ->enable callback Date: Thu, 15 Feb 2018 16:15:58 +0100 Message-Id: <20180215151709.058317092@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 0a0d111d40fd upstream. In order to invoke the CPU capability ->matches callback from the ->enable callback for applying local-CPU workarounds, we need a handle on the capability structure. This patch passes a pointer to the capability structure to the ->enable callback. Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1144,7 +1144,7 @@ void __init enable_cpu_capabilities(cons * uses an IPI, giving us a PSTATE that disappears when * we return. */ - stop_machine(caps->enable, NULL, cpu_online_mask); + stop_machine(caps->enable, (void *)caps, cpu_online_mask); } } } @@ -1203,7 +1203,7 @@ verify_local_cpu_features(const struct a cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } }