Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3767064pxt; Tue, 10 Aug 2021 10:50:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9vEG3c4zSFSoz+anqjtQ9Dtyc8m6DgbAbPFGxtXhUfPu7lemdLycHfNQLPl35jT0yN7DK X-Received: by 2002:a92:194c:: with SMTP id e12mr336175ilm.199.1628617835558; Tue, 10 Aug 2021 10:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628617835; cv=none; d=google.com; s=arc-20160816; b=tuo6LOInk+UaQ+4jaUBbgU+8YLQR89HQxkUxPA+HKM1b5l2VXqbWVWcHM1VpUF0n0s z4IBlW/3RWaJeQaeXY53ZGPemWOKrtEwnftm3Bx+fqVDACs8Qo8c6496+S0gzbWZviJD 3Xq0Jad4pu8Ii9VXfjyUeFZL+YL4Yad6CpK86S+67l+WuIpu+z6sQTQIf26ykN5M2k5a QPJyILgDU9YkcwlC3P2xVsJod6joZRkyj4SrJ/MUhGklm0YQy3aQW4osn+S3zxcR2nW6 bQwcPAxCDkeQ8IFoTZKUGF3eRXrLKGpJm2QgNXuS2TlJVmTSAJ8GwhdC4IsF1KszarH7 E48A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Rwl+Gn40McPVbRB14esD4fTG+KCEWohzIO9b41AJf6Y=; b=p1vRHEz8/aZj8t/0qE/WDKPIbR7n+01vA8V9Z10A++GcFzTCngz5GHDNCUrUz5h4iE BEkvrI0cqkeUs1a4Wfy20+11jtvy37p+NeFuaeE5c612JcNIeY9gt2oMjTxC4u85dGwj FxpL9856yNgFOmnzDuqcaWdHCWl1cObr/T3QKyp3SZVrZeLeJBCosfUQK0UNjYMoIa6k zvolkLFjbrItMk7526kMj0FjeCwk9QKdUHGThtRQUYIlaS7CWSPBJswKVP3qv1BPDdKm I5FC/kjyKWi82gv9WdLNddnMsVG3z+iChQGklGhY+gt722IfM+b5yH1wRMy/JpKfvUyj Vnhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mQFc/phv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m18si11318562jaj.27.2021.08.10.10.50.22; Tue, 10 Aug 2021 10:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mQFc/phv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230380AbhHJRtE (ORCPT + 99 others); Tue, 10 Aug 2021 13:49:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:57234 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235882AbhHJRqK (ORCPT ); Tue, 10 Aug 2021 13:46:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DEB9561241; Tue, 10 Aug 2021 17:40:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617227; bh=Z0qU4/2yKzhC+XXVvaVOFrD17qTEYzJulLpeR9Dy9Yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mQFc/phvf9OnTzmpFVniTmCHH6FgmDyEtUzbgCTkTrEPOxXCp7a+pknlCWpvpnNQp jWPrGud+hiwgMWSLo1/+2MbwwBwsalB51zg7A5xMsExiRGhIVx5gSm8/m0ZHpnHeYK /Uz9lChDhx1cocShF607+KUhkJUArPiWS/obJrEs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xu Yilun , Wu Hao , Kajol Jain , Moritz Fischer Subject: [PATCH 5.10 100/135] fpga: dfl: fme: Fix cpu hotplug issue in performance reporting Date: Tue, 10 Aug 2021 19:30:34 +0200 Message-Id: <20210810172959.154865395@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810172955.660225700@linuxfoundation.org> References: <20210810172955.660225700@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kajol Jain commit ec6446d5304b3c3dd692a1e244df7e40bbb5af36 upstream. The performance reporting driver added cpu hotplug feature but it didn't add pmu migration call in cpu offline function. This can create an issue incase the current designated cpu being used to collect fme pmu data got offline, as based on current code we are not migrating fme pmu to new target cpu. Because of that perf will still try to fetch data from that offline cpu and hence we will not get counter data. Patch fixed this issue by adding pmu_migrate_context call in fme_perf_offline_cpu function. Fixes: 724142f8c42a ("fpga: dfl: fme: add performance reporting support") Cc: stable@vger.kernel.org Tested-by: Xu Yilun Acked-by: Wu Hao Signed-off-by: Kajol Jain Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman --- drivers/fpga/dfl-fme-perf.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/fpga/dfl-fme-perf.c +++ b/drivers/fpga/dfl-fme-perf.c @@ -953,6 +953,8 @@ static int fme_perf_offline_cpu(unsigned return 0; priv->cpu = target; + perf_pmu_migrate_context(&priv->pmu, cpu, target); + return 0; }