From patchwork Thu Apr 12 11:11:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 133208 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1571661ljb; Thu, 12 Apr 2018 04:12:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49qxVZh9dZzNNJHg/Ycs1eEsMkSXy7GHJUFMxN9sgN0ssDruR3ji/wHvpflVAXlV+6OS34C X-Received: by 2002:a17:902:64d7:: with SMTP id y23-v6mr515098pli.349.1523531557291; Thu, 12 Apr 2018 04:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523531557; cv=none; d=google.com; s=arc-20160816; b=pRUirTUMizloKGNTROTMFqMqBtLFgdFs4JXKG/lTYTEvx11QBhKxj/ZRsryC1NsEps nrjO9a9y97F+VQxMTn3+EgXL9YKEAiGvZMwxbnnj7eUgHqLmNOaKzh5eZ5SWxMBO0xQV jkir2o1pDvSYICl3SFqTjxxnKF6ovfbaoVtBUCUWI4VoFwSIpi+L6DgfKfigbXtw/gV9 DpqcnaEvjoscZFBPd73IS58Jbhn4kY8SUG4z/ID772P+tBPxQy8SeDXmazJwO3rxnhHl 2b57YEiMBT8zMl0FLCRQKj7HopbKMrQJOqbpuAnkopKq/Tom8GZVXdcFsqT4ihvJBzsn 1sUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=jICyAB0ueSa21iveC6xeZ4pJNIbhkFndusgFBblqcm4=; b=rUWM+CcjL3r1mS6lxy0VgO6cCouVvsmhM557E3eJiYa+tGj9+Q/vmvCPH6TfixfzHo tFqG1jRcPzUnxzJ3M07FHci++6OfKt+a9DCWPA1VRmvLw7IO4vKxLf2aAmHxtmfoyemq HGz/5sEaAUVj+OxYlSD3QsHPJpn3O5M5U8RzzZULSlOlohIvT1IhgULXT8ARSKvEnxdw RwuF89UUPreB3Ne9LBundSIBsV6/kLzjg12M7/0EtawB3M3lbXJWwz/IQn9FWbjUSboE dQjPY5zOq5fK5l/nxCSmXdlD4HtTmAVC6sLnwupEdHN6LyToHtndREVuT+hOVBEFQATJ CUPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 bg3-v6si3001807plb.118.2018.04.12.04.12.37; Thu, 12 Apr 2018 04:12:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752755AbeDLLMg (ORCPT + 11 others); Thu, 12 Apr 2018 07:12:36 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752470AbeDLLMg (ORCPT ); Thu, 12 Apr 2018 07:12:36 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6B4680D; Thu, 12 Apr 2018 04:12:35 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4BF813F24A; Thu, 12 Apr 2018 04:12:34 -0700 (PDT) From: Mark Rutland To: stable@vger.kernel.org Cc: mark.brown@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com, catalin.marinas@arm.com, ghackmann@google.com, shankerd@codeaurora.org Subject: [PATCH v4.9.y 13/42] arm64: cpufeature: Pass capability structure to ->enable callback Date: Thu, 12 Apr 2018 12:11:09 +0100 Message-Id: <20180412111138.40990-14-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180412111138.40990-1-mark.rutland@arm.com> References: <20180412111138.40990-1-mark.rutland@arm.com> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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] --- arch/arm64/kernel/cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index cf000fd694fa..692f107bb46e 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1058,7 +1058,7 @@ void __init enable_cpu_capabilities(const struct arm64_cpu_capabilities *caps) * 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 arm64_cpu_capabilities *caps_list) cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } }