Received: by 10.223.185.116 with SMTP id b49csp2252365wrg; Thu, 15 Feb 2018 08:47:39 -0800 (PST) X-Google-Smtp-Source: AH8x2240A6USCi2ditK7f7606h8JqIsoUutJw/rR4TObSbHhsH32ncjYWsiT5TxfdwgQfnbF7YLe X-Received: by 10.98.105.199 with SMTP id e190mr3236960pfc.70.1518713259438; Thu, 15 Feb 2018 08:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518713259; cv=none; d=google.com; s=arc-20160816; b=sHh7F38c8TF/MSDnTbH+XaaXWEU6e8ukW/4f7piFm1/kFIcr21ufop/bQdrAKIvpzW Y7Lq0vQ0qLPdbf+/d3YlWt84VHKSw3MEeGZCCxUpEVaNcOCu6JxPRbZw4DVTyyio2l/d OJUsP1d+16OafSdID5Y3jLDGqjp2cDZkpBl7YDFnb6aqnsGWV1HkHQzJAmt8As/7JlkO EiwOHuP5YwqCd+lYQnunYtuhkaUr5GF3/rIhFaaoQCP0Lpp9a8JWbGBKdOaT6urcJeV2 Qwwgu8pWbIv1UTJng5rZUGW1sJOaF+Teqn6fiAo9NANDQFtdET6ZdfFdk3AAEwbVLrOA saKA== 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=7Cc3kyH1UqD0XeZ8u7JC/0sf/hiqupeU57ZnSrVSIUI=; b=ie1ZorpUTiLyP6eGwMfwEEtK0OfwNzmU9TsjvRUJ7oEWlNri5P54d2knZiEyJqE7Mg KPG0dEoHsBZ8rZ8GEtoHXHaCXNnSSC7U380DgOTtigr6EaDxhGAYn8DTVIrg5WV7Sp/1 pf+fZlPpATn7Fj7VdIm336okBQ/2Fx39XVtIdvEioZsxMkPIdsCFWAPShPcO3U51z5qz QUzFCuE0dT4b3lFPlg4pf7yLn7PC3mKVXMP/AXOwt6t7dCyaGPBbWso+se2yJbrP+S8U 1POEsY2orwXaqRsUDwNBV/3Vsb8vgGaVjAh0e2K5pbZch8hQhmJSg1bkugMpocrp5UUD b1rw== 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 v34-v6si1581498plg.803.2018.02.15.08.47.14; Thu, 15 Feb 2018 08:47:39 -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 S1426392AbeBOQoj (ORCPT + 99 others); Thu, 15 Feb 2018 11:44:39 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60340 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423876AbeBOPlN (ORCPT ); Thu, 15 Feb 2018 10:41:13 -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 18D921146; Thu, 15 Feb 2018 15:41:12 +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 Subject: [PATCH 4.15 060/202] [Variant 2/Spectre-v2] arm64: cpufeature: Pass capability structure to ->enable callback Date: Thu, 15 Feb 2018 16:16:00 +0100 Message-Id: <20180215151716.467771666@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 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: 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 @@ -1215,7 +1215,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); } } } @@ -1259,7 +1259,7 @@ verify_local_cpu_features(const struct a cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } }