From patchwork Thu Mar 1 12:53:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 130200 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2762576edc; Thu, 1 Mar 2018 04:58:06 -0800 (PST) X-Google-Smtp-Source: AG47ELssfj80015H/guO0VGMmjfHkmrTigr5Cy28Fy5UeKO3haRyjwtydfM4+GdApf2Ya0qvDHs9 X-Received: by 2002:a17:902:9885:: with SMTP id s5-v6mr1897097plp.400.1519909085958; Thu, 01 Mar 2018 04:58:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519909085; cv=none; d=google.com; s=arc-20160816; b=s7RNPi14Vv3Jo/roYk4SS70dmrQ2GkCBpoFDqRRem1cBectg3meW8ZtHdDAg988J4Z mZBp7rdfb7KrjkvI/22yivpwob2/yLw3rprc64HPzY6mi/ixwcjX2C73Evi0/Br9Sa+G OUfE0XDjXDKw2RERUjMznh1WY8T9nWy+TD9aG3aZUJCFngX4qfzzQn2pZQ/4oxl3EXAu BDZ8UUZ1ARGclJ4jtt5LUTqjdqQeRrgYuyHVmnGC/KSk83/OpJFPlJqV7efbx81eG914 uwlseFfdFdTMAFuaIEMSXeZEfWvVpmmsAcM1J3sZlb99sRljl9xPRLsC/tLvEsanDNMN 5HJw== 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 w62si2442652pgd.573.2018.03.01.04.58.05; Thu, 01 Mar 2018 04:58:05 -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 S1030924AbeCAM6B (ORCPT + 28 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(-) -- 2.7.4 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); } }