From patchwork Fri Jan 5 13:12:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 123521 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp801892qgn; Fri, 5 Jan 2018 05:14:28 -0800 (PST) X-Google-Smtp-Source: ACJfBoumaU+EQDPWHB5jO+RPHKGRxpYPer3cAKXH5n+QxPrTGMq1svCOXfIw3cHIkAaB8EiLgScC X-Received: by 10.98.49.134 with SMTP id x128mr2909247pfx.163.1515158068733; Fri, 05 Jan 2018 05:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515158068; cv=none; d=google.com; s=arc-20160816; b=Xpxc4taGRMZxsXzaYYVbgfOftzjY0EdvL1oRCTa10q6vPR/PkTe0a2cC0HveVMgO32 xSdFKEYSzZ8A7mReP/Lu0+fkxRtmS2ipw4kQCXnbyJAUKOuJKKn72rZ2lUz8kin/omWz i3U/gO6MPScQNnZG6RtgpTpdRfygIF2TbLYrq+sTxL53b0FR7Tl4fbpm2EaHSMOr6cGY tVkl9VDJgqJLNxCPkbvfQsOdpw3ySA9y1ah21Iku74fM0vaSAaSxZifYxWtwHeWFExzH Xh27nbv7OBwmlZqhqL1zaRiOMEXIdnIwua7R3YGCYJO/c6EUcSpDAYX6xJM78Sr7sP7a zkBA== 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=G5sRcL97zARitHyf9Ft/S/F91AKWfUo9HS9gfd+SFp16e02Jn1qkxgbvLmwY1kmwpT e0AtZviKDEmrVU41DqGQaKTbaOqi/BNIwuUVVo63XbABuffRBHsabSNs9eBonTNfDbMb T7Y3am12lDpmQPlKIAVhGyIIH8rcbGzH5bUDvMLGsFgBGXtgyFJPV4n22QfcGg8kibhn ceChPQgdS6Dw29h5iWOqTp/5aez+IWeSYqFcJtIV38U2UswtGl4e2F6VTRrxYrCzWXNo 5Y2NOb3ZgkNEJPLLAZYOZ2TWRRzQOuyXC5UhD8Z2kxn+Yhx2WD9iw5B8ZsAFTqlahmyV PLqA== 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 31si3988278ply.145.2018.01.05.05.14.28; Fri, 05 Jan 2018 05:14:28 -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 S1752057AbeAENO0 (ORCPT + 27 others); Fri, 5 Jan 2018 08:14:26 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44740 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeAENMn (ORCPT ); Fri, 5 Jan 2018 08:12:43 -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 DD1F41610; Fri, 5 Jan 2018 05:12:42 -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 AB6263F53D; Fri, 5 Jan 2018 05:12:42 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 26A951AE180B; Fri, 5 Jan 2018 13:12:43 +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, labbott@redhat.com, Will Deacon Subject: [PATCH v2 04/11] arm64: cpufeature: Pass capability structure to ->enable callback Date: Fri, 5 Jan 2018 13:12:34 +0000 Message-Id: <1515157961-20963-5-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1515157961-20963-1-git-send-email-will.deacon@arm.com> References: <1515157961-20963-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); } }