From patchwork Mon Jan 8 17:32:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 123751 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp3001269qgn; Mon, 8 Jan 2018 09:32:51 -0800 (PST) X-Google-Smtp-Source: ACJfBou+KdW/md2o6f5KD7klNzNC8q0Osp9Q6drusJsphVOy3I0PIBhaDuPse4DiGzjWSAMXnf31 X-Received: by 10.84.133.226 with SMTP id f89mr12509435plf.407.1515432770980; Mon, 08 Jan 2018 09:32:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515432770; cv=none; d=google.com; s=arc-20160816; b=VVFxocRieYeHBeYeVq/UZr9SoFT3SfPQHg7PXiqDO6fd/BLecqO42JegwqAJATnkIj TAxuiXatizwbstvSmLIGwhK/W9MCYZ4trWhRvxUnHzBACeHu439LmcXTYOQJkJIlrLR0 sKCl2avkZagM+QUIXtmwYaDc1M0vhECpgJ8qJFQ/ux1mmlw+D21oPBpNh8y2iukR4oNG UTEqDkT8kmw6oGx5Qo2E3wM3yGg2Ka2QA6PEINgWs9sdaz79L1RWOv+fqpP3g/QNZ/Tp FT70t6OFGh7s5GP92VxIZ7L+vu0H23Rdh0u+3Hh5pivlv/pjgloI0Fgjs6bbpKMJXfnx 3fKg== 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=Ogeaj8H+I2683zmZkIu4HLy9rjtftg+S19HDtTIQeOs=; b=SzVoUNGqJmfEzp/yZqtevE+cxtJXXaWM5rmMb/zIazGliBHVZc+YZb0Xt6wui5uECH FajS6HUyemLNVU5Lhk6bOze1FyhpqTpjFVcnHgDhc66fu9SJeFtuNOhbVBNXp2QywYcO fD0esCoU7bk+e5F4/I0bkRx+my0C0Lo0f2JLltLIqWBQZ6ZlQlGr4ffMZu9FxW65BdEn ouue5T1k0f1UVBOgUNVtfiKR9ErWIRw8N8tT56/juz5oY5i3sl2sv4BCKz14OG5Dxf9N ra7bVtajNFfWB2qkAlXWkkzqu9AzcAk1VvRMFeTGpcDfVuFoRYWY0KV3TwMK2fOef9qO p+KA== 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 z3si7720536pgv.49.2018.01.08.09.32.50; Mon, 08 Jan 2018 09:32:50 -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 S1754404AbeAHRcq (ORCPT + 28 others); Mon, 8 Jan 2018 12:32:46 -0500 Received: from foss.arm.com ([217.140.101.70]:42880 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754293AbeAHRcj (ORCPT ); Mon, 8 Jan 2018 12:32:39 -0500 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 6B2AF1688; Mon, 8 Jan 2018 09:32:39 -0800 (PST) Received: from edgewater-inn.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 3D04F3F487; Mon, 8 Jan 2018 09:32:39 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 2C2AD1AE2D78; Mon, 8 Jan 2018 17:32:41 +0000 (GMT) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, lorenzo.pieralisi@arm.com, christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, shankerd@codeaurora.org, jnair@caviumnetworks.com, Will Deacon Subject: [PATCH v3 04/13] arm64: cpufeature: Pass capability structure to ->enable callback Date: Mon, 8 Jan 2018 17:32:29 +0000 Message-Id: <1515432758-26440-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1515432758-26440-1-git-send-email-will.deacon@arm.com> References: <1515432758-26440-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm64/kernel/cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.1.4 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index d723fc071f39..55712ab4e3bf 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1152,7 +1152,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); } } } @@ -1195,7 +1195,7 @@ verify_local_cpu_features(const struct arm64_cpu_capabilities *caps) cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } }