From patchwork Mon Feb 26 08:19:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 129607 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3363622lja; Mon, 26 Feb 2018 00:33:02 -0800 (PST) X-Google-Smtp-Source: AH8x226g+1YHrkZZUcuEgDHV4/YY/N75i5yQYtcx3L7GVDTmtfCnBfkW9yXSRylq1diadA13uZUP X-Received: by 2002:a17:902:3001:: with SMTP id u1-v6mr8947583plb.254.1519633981976; Mon, 26 Feb 2018 00:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519633981; cv=none; d=google.com; s=arc-20160816; b=OFdHY141bk5hnHAJHtJ9kkF0krlToG1prKLccA+1CQgT22PT6YQcyv8g8LWZ30+yqn 0SC7OkJGAhFgKTF+RutvYNngFG7iAxSjzfZ+R+LhHNuypUCQ/I9ws84oG7w9UpImlWe8 fLDFttDq7DNBumu6y59Qd8as0mnBHZkqVPk02KkMROkr21qu3x/gw0Izyov8wJaMgJcN XP93FXCbad6/r36KQgWmpuM0qjcSpDcmGhVSx5/oajKo5L/TiAc9n4AtQZZXVbuGwj9V +doZWvDHy/nbMZ1yq9ufLaUEzNfpj3CZCSTwbtuaBWJ6h69UJFspczunA4kVbVpmms4W QeHQ== 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:to:from:dkim-signature:arc-authentication-results; bh=+xR+r110x92nrh5KbxC/qh/uHxgkGEZ0it5ORoIx2gk=; b=Vea75bNaZyC7ryj5mZfFB15JMAHgePbZJnbvsm4JgcfXbNmHryjscswsavJQORWCt4 QHFIS8A5y5MQx/BjN+MZb6rfXScYWD0IRWmgcqhJmG2V4OJcruE4zuCumFgckYy2VJ8R JboJodQfDlUbo1qYhnkdDmUZFPovq3Oy3A16ryl6l5Io8MsuhtuamJNs2xIyedBysboM C0Brbt8a+7u0V/D9Y2z/hl8stJxXqcUCVpgwqzrTkvFuSbyleuoclrsyICRFTRRGpOWK 15Y3VfnfiPYIbp1QAuqWpTMjW5vK3IljjV4o/hg4/tLNzsanDego4NQd/AQbmm6MLprS cLgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gUwGegbt; 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; 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 c14si980807pgu.341.2018.02.26.00.33.01; Mon, 26 Feb 2018 00:33:01 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=gUwGegbt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436AbeBZIdA (ORCPT + 10 others); Mon, 26 Feb 2018 03:33:00 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:37123 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752541AbeBZIXk (ORCPT ); Mon, 26 Feb 2018 03:23:40 -0500 Received: by mail-pl0-f68.google.com with SMTP id ay8so8854359plb.4 for ; Mon, 26 Feb 2018 00:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=+xR+r110x92nrh5KbxC/qh/uHxgkGEZ0it5ORoIx2gk=; b=gUwGegbtxMM+J+Et1e7BilrCA4XcNO36qS4/uUgBZWPNdQefunecApbEEIR45RIPbv MFQa4xXTC2L2Oc2fnOXsByXb0GdTG/v3osZd4DZ9i3UxSsSGa8NKYx9Z/Plxd5wuV8xz Doc7OTJwb5fF+Tkz0OGAbtOli2VYcAuRfrut8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=+xR+r110x92nrh5KbxC/qh/uHxgkGEZ0it5ORoIx2gk=; b=WIOfNH2ggNbXVmwng7WvvZuvz+iy4j0dxxrb8XP4b44uGZrubi91CfHd9MVidVRZ7z m02ptIkPcYgXRhNrIHcR0/S80lDS1tkNL1OlZjbq3DRM7eLL8pGrQR4mBX4oZN5BmZ+S AMk7a313FejmJMIfwBCSTPeHbi7a5Uz9m86KV+5P+G2zI5VF2amFZV/0W9k3q1eJVKZT 40WD8QI03c8GKuPHpg43JPYfAKxjLpwbNbZOQoqAwLS82sTT3WuvIPsYxoSIFIvVMyrC Urh0NVAULgq+EmHAVTw/AFDJzMexCatlz0qBN96PI2DvedVSo7X4lvw9HUbpcFP/4nWU WVYw== X-Gm-Message-State: APf1xPCuirgaNTI70X9ysYns5vVvUxW2lmA4up/CZ20r4/B/sG1feDlQ jDe69XFvBPV8d+3HRlkEKGFMhg== X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr10050718pln.386.1519633419920; Mon, 26 Feb 2018 00:23:39 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id o86sm1422706pfi.87.2018.02.26.00.23.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Feb 2018 00:23:39 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 21/52] arm64: cpufeature: Pass capability structure to ->enable callback Date: Mon, 26 Feb 2018 16:19:55 +0800 Message-Id: <1519633227-29832-22-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> References: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 Conflicts: arch/arm64/kernel/cpufeature.c --- 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); } }