Received: by 10.223.185.116 with SMTP id b49csp7393149wrg; Thu, 1 Mar 2018 04:59:21 -0800 (PST) X-Google-Smtp-Source: AG47ELvJZuIzK+NxvvY9nsrEJ/sMdB2t7JDpxxPexQ8MZtYB/IgnqVgNERtDIr1o2nK7Lz39J0n7 X-Received: by 10.101.93.135 with SMTP id f7mr1459414pgt.82.1519909161439; Thu, 01 Mar 2018 04:59:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519909161; cv=none; d=google.com; s=arc-20160816; b=up+feEenX9JWAEhchH0rdYCdUryERDCdAS2nv/1rUnoMFHKG80VZg/B4nhB8wSrjWo mdECRbCldSpaeHQUKCf5gFln8oUCjV009c1stOrTo3TI/LrpqzWhCxBjzl0gN4rCHveI d2w5ubuU8/ESgCOhx/3LfchjESIxdWNvrhuwlXN9t+CPKs8IMOCRXKvo3uqDPVz0NyIU GJt+RjdAAS93Qk4bWCNrdjeujXMF2ehceij1XUIw27doIHjiHyHws95oEYO03yyuNVfi JOY62b/QAbwxySAHCFmG8Gx5grFYYEHfeDs+Z5ewsfcfRMiUjCKiDyhMJ6V8RANk5ET4 6cMA== 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:dkim-signature:arc-authentication-results; bh=mp5ELbwEmYRLHeQ3bnHDHxexdMKPPHMhOHF8S+YF3Ac=; b=treIJuo5SMNow+d+yIEXrGsxbZjHvZrJUi4YAB/fJIK4pcX5HzSnScurtPT3XJo7WC MK/NiTmoen+uO+90a6chktpP46UCd71ulxF+NScC3EqAOtwWPbtkY9ZWHkPUNeVuImWN egEdzv1Akzbml9M3v8t+FXvAxO7fZhH034UPo3HEVFRYJkOYN0+/3olCRNb48wPXP2s2 GBPBHhsfyVch01V+JNneY5GAXSoNOiznbjHI/7N7+pomGWiVEUM7wuRxkjJVAGPW1oMQ j8n2rfF6503iGGVeh7T944+UE1NzRJ/KiMSmVYVBdA7J3nDRM9z9UyxO5liq7ArjUkMX l+pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c3I9UT93; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35-v6si2992398plh.712.2018.03.01.04.59.06; Thu, 01 Mar 2018 04:59:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=c3I9UT93; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030914AbeCAM6B (ORCPT + 99 others); Thu, 1 Mar 2018 07:58:01 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41700 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030911AbeCAM56 (ORCPT ); Thu, 1 Mar 2018 07:57:58 -0500 Received: by mail-pf0-f195.google.com with SMTP id f80so2399668pfa.8 for ; Thu, 01 Mar 2018 04:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mp5ELbwEmYRLHeQ3bnHDHxexdMKPPHMhOHF8S+YF3Ac=; b=c3I9UT93a9gl4iZ5XmQ52VlxvjAEr/8R2RbP1GwsMm1BMHfJStTzlh3Nhgh2vRA0tm nXzXLXeT2lRrvjbdBcHQIgqM0iJMPBQL0B7dZpAcokZBrKfo2w/E5h4JAc2xc0iekS+q OOUiUBIDTU3jYUa3THNcMd/SvhIsCW1TP/APg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mp5ELbwEmYRLHeQ3bnHDHxexdMKPPHMhOHF8S+YF3Ac=; b=PjD1Z5SqQAf1VMQWonkiAML7xjzPWPE568vOvvmdLN+yEv3UQvad1dHyFWGtpKPfno GMtW7MRhA0xjq69TOHAlFW9eZkr9MzBEl/heLBkCwbtb543BGnj6a+nM6cg3imZXUxnH JE5K1Ho1MHq6ybKlgo3kj9XEr5W3iMlFPmTzHHvrIDtaYbOG1FKDQyaOvcezv3sC+gYs 1dSHWC470HenM03lxDhzl4+A//sM4W7n+thg6qyUAEOzZDewtmKubLw56PurtOgMmzQr Xe46kCyMfSn3cq2QTBQGJoKqcCQvF7ls0X1Sgg1T3AA0McztedJRjxBUQzJwCEaEwbQA Qx4A== X-Gm-Message-State: APf1xPBmzFGbrWiC6aCAZkemK1+w759A/UupMDxaI6Dl5YbHke0x/gfh suZeZc1Jg7yN/CDH7hr/4FU2XQ== X-Received: by 10.101.77.69 with SMTP id j5mr1490545pgt.352.1519909077807; Thu, 01 Mar 2018 04:57:57 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id x4sm2289655pfb.46.2018.03.01.04.57.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 04:57:57 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 21/45] arm64: cpufeature: Pass capability structure to ->enable callback Date: Thu, 1 Mar 2018 20:53:58 +0800 Message-Id: <1519908862-11425-22-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> References: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Alex Shi --- arch/arm64/kernel/cpufeature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index fcb67e0..5c41ef6 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -949,7 +949,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); } /* @@ -1005,7 +1005,7 @@ verify_local_cpu_features(const struct arm64_cpu_capabilities *caps) cpu_die_early(); } if (caps->enable) - caps->enable(NULL); + caps->enable((void *)caps); } } -- 2.7.4