Received: by 10.192.165.156 with SMTP id m28csp249727imm; Tue, 17 Apr 2018 09:30:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49rAuPnBRBt0y7uYBW0XpI1AfRvhVVb3DprNjJUU1EJBO4caETdB0F67ss4AKPa1Ts1NHE1 X-Received: by 2002:a17:902:9898:: with SMTP id s24-v6mr2668513plp.51.1523982621077; Tue, 17 Apr 2018 09:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982621; cv=none; d=google.com; s=arc-20160816; b=g6bH4TbsEU0YugEmSbTK0afxNxoU5wmTzCIYivz/ez1TE/Q7azstfzPPCCtgxsK5tX 7titxdEA0q0bOvNygsBn7PS6sORTcXwk/QGiORDPhp4T/lI6nYQ1zAhcVwwhQ3ZkG7lr Fvh+EaSQkYOmmYFzRlUDbZ8pNRz2Mj69854wIFc0ehn4qVdNSOi0toRgboR4YkMqq/qc nooCbu0/eMufWh9S4+/I2jSRsZGzkFXhMtu6L7yIv6dNhN5jkl2YO5UEXx7g06Qbyouv vpuj1/qVjueFP1m3KpuKjwZ3oK+Pl5pj42cP3aSQWyQ55UTvFROliqTGBYF3inExilQB 78fg== 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=Fq4Q5N5NVzYYlvaFn+DN/EJNOQ/FgywT9+yHtfyRiv4=; b=qK0glVHzw9WAia+Ff9hjrEgMPlPROJ3jFcGsxun6zzRtAzK5pm6ag8oiS4gvAOzXl7 /rOIaEzNfkyKilYMT6fDNspl2uAMtbntWBiY+OdFY9MKDR30ifQ9RUcpdhNePrEp2CWi +55Qmp1H+khhubZhs/uLDKvTp6uWgilIE8TRS5CIp96fkvA72yr6pwE/ZHjw2m3e/Hw8 +XAobxfKO2RAhGsTcOgBKWKJ8qn39kvGyMLwdb5kviACEL8GP/ZRQd4CramHkw4u0C/8 J4aPJ1oVQ7GGqErpXlzBGSPe+XQfXXytvXlvXbpM5kSLvV//02+EN2JcNhhN2588apfe +Mww== 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 l12si6663558pgr.518.2018.04.17.09.30.06; Tue, 17 Apr 2018 09:30:21 -0700 (PDT) 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 S1754656AbeDQQ2b (ORCPT + 99 others); Tue, 17 Apr 2018 12:28:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35558 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755478AbeDQQIj (ORCPT ); Tue, 17 Apr 2018 12:08:39 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 647A0F04; Tue, 17 Apr 2018 16:08:38 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Suzuki K Poulose , Will Deacon , Catalin Marinas , Greg Hackmann , Mark Rutland Subject: [PATCH 4.9 21/66] arm64: cpufeature: Pass capability structure to ->enable callback Date: Tue, 17 Apr 2018 17:58:54 +0200 Message-Id: <20180417155646.768192153@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155645.868055442@linuxfoundation.org> References: <20180417155645.868055442@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Rutland From: Will Deacon commit 0a0d111d40fd1dc588cc590fab6b55d86ddc71d3 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: Mark Rutland [v4.9 backport] Tested-by: Greg Hackmann 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 @@ -1058,7 +1058,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); } /* @@ -1115,7 +1115,7 @@ verify_local_cpu_features(const struct a cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } }