Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3778600pxt; Tue, 10 Aug 2021 11:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjNDaCm9lmG624EVeW4ADnRfmr9/oqEPUIQxUeTsjWeF/9psG8Ylf1vEo8uFcjc38Q8u0g X-Received: by 2002:a05:6602:2812:: with SMTP id d18mr416161ioe.98.1628618808500; Tue, 10 Aug 2021 11:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618808; cv=none; d=google.com; s=arc-20160816; b=lJ9oTqBtI+2DcOFcLghdUL5ANX0cncB0tE+DBEquGx363aSPDkmc5xR9kA6bYQ8XNq 4OwK7O37gd00rNubpeGAkG/7FntyoCYSqFFY+PYZ1ayjEJBMnw5JToCI36UkCQjgtvil lzORSGKOL/mDP/kG9vsBQDbFElkHk63ftPLJCz8d8sYr0zfyLn+BOkXZi5ofQcoH00eT 22c8EcrGugDmIqdshDjo+IOl9ABBGWmN5T3+ZfU6VWCJyeMaSkuPCwUz2Dpoa9ybhpt5 ZM2aU+PjWYBU74xOsaZ3fg2gGKUYYg/3lP2dATLf8CaTScme+/igQuAKawNBqfBGWL1f lWiQ== 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=X/oL52WVItOehf7paYlGxfF4pYngdCX3kUvpSlG4+TiD1ojztSHKVGhhXGcAaARDh0 1O70cx76IJI/NHYzaQDPYD/h0uvCJ+HuWSHcIDRl5YQGiyNHJwLrLgPBPnaQ/8PKcZCs +erGkeuClgRuablver9iO69GCDv1Zil95E/22rXdYfk1YALc60NpAqGH5r7eb9UKvZJ4 vu3fDLLtwOrtlYSQWO/dfYcVRdu9H7pVc3kIrZgs989lxFll6Rx4/DzWImx/X5QwNvhT OeLkk0VsJS9BIEjoH0f1KLSHc9VTvo/K5+xL0EhbIYtenwq1DcNjVhiFqX6pU2t/NqXo VLPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LLlcabRw; 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 k3si20790268iog.8.2021.08.10.11.06.36; Tue, 10 Aug 2021 11:06:48 -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=LLlcabRw; 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 S238967AbhHJSEi (ORCPT + 99 others); Tue, 10 Aug 2021 14:04:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:33404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233662AbhHJSAE (ORCPT ); Tue, 10 Aug 2021 14:00:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7D6E61390; Tue, 10 Aug 2021 17:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617605; bh=Z0qU4/2yKzhC+XXVvaVOFrD17qTEYzJulLpeR9Dy9Yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LLlcabRwuMkIdRsRzlVx3kM81JmRNnPDxI40Y9C7FMtSrOp/Pp5j87S5UjOmms5UE jX1sjYI226+BqY6htyW+7yY6WUPXF4sMGAUZVRAoI1dNB+SmWpr/ptPJOD0Dl31Ddb tikoAruZs2QLcroW+ilpYlbFOydpn4RVX3xFg9YM= 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.13 131/175] fpga: dfl: fme: Fix cpu hotplug issue in performance reporting Date: Tue, 10 Aug 2021 19:30:39 +0200 Message-Id: <20210810173005.266339438@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810173000.928681411@linuxfoundation.org> References: <20210810173000.928681411@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; }