From nobody Wed Jun 17 02:59:52 2026 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 916E0410D3C for ; Tue, 28 Apr 2026 12:18:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777378741; cv=none; b=sxT8sM9BH8FZNuwbQOlG/TjGjhqGfaLZ/MHjkv7kRrrXw6JsRYImP6nXoqMGYtdLnqpxz+YM+qHSOmmTFQp4f1jBW5fshQhKzplDoUBblx+bmtR8qllAjQ3EeQhpeaASQxyxJ9SUMCaAvdo3BOfeoXcWUMPUt6fI4nzkR1QMOow= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777378741; c=relaxed/simple; bh=zto+sCohtWqqDRe461JQ7KeIMNuRDjVOi5wBO+6f/WM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JiuT2dmAA09q05ho/aTpmBoJkUbeVvLnd4nq8tFKovONXJZq0Vn0QutciY7pIh8swdygJWsAqDQWI82AGnJioYnW5dMI4BB3E2lz7LuX1ix233C6TKCYuoDU+1HSvptFbANuNN32arMaZG/eS2MwUV//xC0pQV2/0owg45UeoGI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rd2AAxnz; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rd2AAxnz" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4838c15e3cbso105391215e9.3 for ; Tue, 28 Apr 2026 05:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777378728; x=1777983528; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+vLs6lQ43LLvofmoYOFin5kLufD/aLjPw9JJrWzlSmA=; b=rd2AAxnz2X8BbIGuyvxsqWyA7jEj2XF+YdAYuBxL3/QfFyPK+74Etdg0SddVLK2h+D lJVC6fZBhO3GdYeto+Fjeyl0ZkeAxizkKQBjJibdWb9htIlYYrnYSqmDse+bHkjtC0L+ lml2DlL/PyrSH7LjtvFFEECCPBu6TtvqbAHZ6x3eP+4HegWDWGVpXWsC3lGd7TG3iuFx LRD/DyypxCl6jraAaThcAhVbRXf/1FQiREsSzTUaVRmJ1iuxvIPne7nR5r8pzKB/Vske budtV9hY8RnvHg3VnRCGHVDO8rvEg616fFMfpzhgGamfeybYwX2CLAOdeElX7YcwUvsT HfiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777378728; x=1777983528; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+vLs6lQ43LLvofmoYOFin5kLufD/aLjPw9JJrWzlSmA=; b=YK3f1J5lzx9WYAcLF2SGtuLjr4MlGt3X0figZvc0L0UxY47bKfY5O2TXfIuJbC18pf jYB6TfQsS/qrYQAxw5o1BH3x7BSTysG7aYI9a+05iWojbVO2SuaVfU23jJBqUCqgbZY5 h9af1uoj+t4MQO8uJaBFvEOwPJ7nEtqeT/JK/STJrWzf3GRJMIhxjE/5TXWl+8ZJyLU1 ytGhHIXPHVux0yUoKho3Kq+JO9LcEkhkWZlE6m6qikWHgvcK7WJY3ulrWuUpV198FKRt +0YmemGoa0iXA7r+WqGJgATLuQsZEkNfK4LTDIlH6khgXMvf/bDQ/rvltcI/kKBGWgZP 4PvA== X-Forwarded-Encrypted: i=1; AFNElJ+CSy+dDFYZP8WC22TcEUCbKNMwScwfIi7AgVIa7esq+Qe0MTKU8J193j8R8D63CZges6aUkZamaSpan4w=@vger.kernel.org X-Gm-Message-State: AOJu0Yx39B4t+gAHFNplcnC4L57sxlo+pVI+yqyz5XtDvZGOJA41peO7 lRcpY83AlG1QKe+22GbbBTtPMbOkkNTuPC9Xf6JpyESX/3CNFPoh84eKoGexXFF8w7Y= X-Gm-Gg: AeBDiet6+lm4p6UMmS8/69Tz3I5Ir2LzBpl0oTSiirdWhlpWW4BInJB0QMHBeKs9uG+ D91jKCkucJPbAeDmm7UNooDTRHI6a40PJ3dzrOXJAphyty4waxB/j7TI7wMfhP2HJUlxQgDgxjR 8Pw+R3OTk0YGCYoDfyzbUoFyK91epLJuKISLcaVjheeDOeyruqZiDFNjYR02wEC1whbJuIfM8is Z8qWNp40bfMAi35rAvYye9GHhwmJStlqdGtfPRY0km9VnAY/xK8ZISSm1IOKyT/YZnX9XS3C6Hj RKxdvjQRFk3HoI2HBIzk6zwCsc78u+COa0AxiEH2vro0+EI8Lb0vTYLWozUj6aujIHWhm+4VAVd vCOL+ebzZw4czOvY5UY1WTKtm3bNMC5P3h+ylA+XCfDCJelL9CeQsRHg0VEu7z0wQjWdaMcvszQ Yryljg2mHo69t05vX+Y4KfOBi9rwMB45tquafUpyE= X-Received: by 2002:a05:600c:3541:b0:489:a4:e578 with SMTP id 5b1f17b1804b1-48a77b19c77mr45784075e9.14.1777378728223; Tue, 28 Apr 2026 05:18:48 -0700 (PDT) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7748e622sm17851125e9.1.2026.04.28.05.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 05:18:47 -0700 (PDT) From: James Clark Date: Tue, 28 Apr 2026 13:18:11 +0100 Subject: [PATCH 1/2] coresight: ete: Always save state on power down Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260428-james-cs-ete-pm_save_enable-v1-1-c7a90ca6f43b@linaro.org> References: <20260428-james-cs-ete-pm_save_enable-v1-0-c7a90ca6f43b@linaro.org> In-Reply-To: <20260428-james-cs-ete-pm_save_enable-v1-0-c7a90ca6f43b@linaro.org> To: Suzuki K Poulose , Mike Leach , Leo Yan , Alexander Shishkin , Mathieu Poirier Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 ETE registers are always system registers so it's highly unlikely there will be an implementation that preserves them on CPU power down. Also the ETE DT binding never documented "arm,coresight-loses-context-with-cpu" so nobody would have legitimately been able to use that binding to fix it. Fix it by hard coding the setting for ETE and add a warning if the user tried to use the module parameter. Don't add a warning if loses-context-with-cpu is present in the DT as it's not a documented binding anyway. etm4_init_pm_save() needs to happen after drvdata is initialised so etm4x_is_ete() can be called. This fixes the following error when using Coresight with ACPI on the FVP which supports CPU PM: coresight ete0: External agent took claim tag WARNING: drivers/hwtracing/coresight/coresight-core.c:248 at coresight_di= sclaim_device_unlocked+0xe0/0xe8, CPU#0: perf/117 Fixes: 35e1c9163e02 ("coresight: ete: Add support for ETE tracing") Signed-off-by: James Clark Reviewed-by: Leo Yan --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 41 +++++++++++++++---= ---- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/h= wtracing/coresight/coresight-etm4x-core.c index d565a73f0042..a7fb680dd383 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -56,10 +56,11 @@ MODULE_PARM_DESC(boot_enable, "Enable tracing on boot"); #define PARAM_PM_SAVE_NEVER 1 /* never save any state */ #define PARAM_PM_SAVE_SELF_HOSTED 2 /* save self-hosted state only */ =20 +/* Save option for ETM4. ETE ignores this option and always saves */ static int pm_save_enable =3D PARAM_PM_SAVE_FIRMWARE; module_param(pm_save_enable, int, 0444); MODULE_PARM_DESC(pm_save_enable, - "Save/restore state on power down: 1 =3D never, 2 =3D self-hosted"); + "Save/restore state on power down: 1 =3D never, 2 =3D self-hosted. ETM4 o= nly."); =20 static struct etmv4_drvdata *etmdrvdata[NR_CPUS]; static void etm4_set_default_config(struct etmv4_config *config); @@ -1365,6 +1366,30 @@ static void etm4_fixup_wrong_ccitmin(struct etmv4_dr= vdata *drvdata) } } =20 +static int etm4_init_pm_save(struct device *dev, struct etmv4_drvdata *drv= data) +{ + if (etm4x_is_ete(drvdata)) { + /* + * Always do PM save for ETE. It always uses system registers + * which will be lost on CPU power down. + */ + pm_save_enable =3D PARAM_PM_SAVE_SELF_HOSTED; + } else if (pm_save_enable =3D=3D PARAM_PM_SAVE_FIRMWARE) { + pm_save_enable =3D coresight_loses_context_with_cpu(dev) ? + PARAM_PM_SAVE_SELF_HOSTED : PARAM_PM_SAVE_NEVER; + } + + if (pm_save_enable !=3D PARAM_PM_SAVE_NEVER) { + drvdata->save_state =3D devm_kmalloc(dev, + sizeof(struct etmv4_save_state), + GFP_KERNEL); + if (!drvdata->save_state) + return -ENOMEM; + } + + return 0; +} + static void etm4_init_arch_data(void *info) { u32 etmidr0; @@ -2247,6 +2272,9 @@ static int etm4_add_coresight_dev(struct etm4_init_ar= g *init_arg) return -ENOMEM; =20 etm4_set_default(&drvdata->config); + ret =3D etm4_init_pm_save(dev, drvdata); + if (ret) + return ret; =20 pdata =3D coresight_get_platform_data(dev); if (IS_ERR(pdata)) @@ -2305,17 +2333,6 @@ static int etm4_probe(struct device *dev) if (ret) return ret; =20 - if (pm_save_enable =3D=3D PARAM_PM_SAVE_FIRMWARE) - pm_save_enable =3D coresight_loses_context_with_cpu(dev) ? - PARAM_PM_SAVE_SELF_HOSTED : PARAM_PM_SAVE_NEVER; - - if (pm_save_enable !=3D PARAM_PM_SAVE_NEVER) { - drvdata->save_state =3D devm_kmalloc(dev, - sizeof(struct etmv4_save_state), GFP_KERNEL); - if (!drvdata->save_state) - return -ENOMEM; - } - raw_spin_lock_init(&drvdata->spinlock); =20 drvdata->cpu =3D coresight_get_cpu(dev); --=20 2.34.1 From nobody Wed Jun 17 02:59:52 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 853EF41325D for ; Tue, 28 Apr 2026 12:18:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777378741; cv=none; b=MWhqCL3NMsAXIbFrO4n7MIN+z7xI0lJ+f2cgBUcg6glOqVwm/FXXEXnIprweRHv2sMhRjALoNZoXbdON/py11hmhZwGMUrzJYwI43wvgrQSNLGyVoL8O6Ucvz8PRc8/wWra/wPmE0CzssfAkfo+3mYTiyP0s3GkQqqrgVIggJP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777378741; c=relaxed/simple; bh=qMtbDID2bLaNgrgPsUEJXbRL9qX80nm0YgTm4eX4oVE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kDL7km7FtehWY+W/EmoTrDxd63XAAQC3vwS5zN9Ci5Hd9/Kdwg25QAc7rySO0kRA1VBAJnH7J2t4kYIJQxh+HElDJDuv3Im0MLU2oR1hmWAQJZyObq7YllfbYuMNaNbLWKTCMR8+AXoZvoQ6SII4SLmfsv4axh7RZAO1cvRiVJc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Yuyqbo1R; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Yuyqbo1R" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-48896199cbaso112076455e9.1 for ; Tue, 28 Apr 2026 05:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777378729; x=1777983529; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hFaRGwKwcB4UEZe1cHPn1QebdGoufLB6lmAYhWEeHLs=; b=Yuyqbo1RrByb5C46O7br6uRTNVPHlqIRlrSIrTlI+EGrAWfIMgP4YbeCFAV3P6uwuv ICFKHzP362FvvJPaw5W4jnavt1jTlcYozh0Ta8dxaTtn8ARcoXhNmg45PPn0wKyjfePb 9wc+8AdsNYaTp1VOBIIs9xISWITkR+9P/Ecsy6uQrGz9M7G8D4xNs9qv3KorXP8TJ1al Fy7a5qeadRsZHCpa/ZKy2Az9sNLlTqj7hgpI2DeU/1+xf/qRbEnHz7h7lAEr7WMGCqWn /w5kCNhrYRjvjhpNa5ptxONzrshEX+ueKiZ4JeRVUVoxQlN1KBJuWOxRQ3URvm0PC/5L Ydfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777378729; x=1777983529; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=hFaRGwKwcB4UEZe1cHPn1QebdGoufLB6lmAYhWEeHLs=; b=nJzV/Kgn4atMiBrV5Doq6Jr/xS+4+YElV0aIbGMILWiYCZCIOAnNsm5tEGxaM/F+o0 C18v9FTfs+xOsNe/hi8s4Ehp3q56ebHwVrVQG7fMOD/Xj2Zj/MknDH4a9uYTMCuTbp6V c9Ntu2YGytGtIIWkaffQLk6PjVLw5DS+tx/ST0GP9Xa5kMd3pcuea7oeQdJ472bHmzWd brOdoud9NhTCn7mKHUdWG0KmUvNHvTf5gqsQN+Bu+co9g1+G3I9pujHL8IVlv0wK9bbW VSBMUL7R+qXao/kaUvR6trwc/yQNWTywtM7C4tQsoU9YFZKMr6STUnXHNT7C40y7AoND PYWQ== X-Forwarded-Encrypted: i=1; AFNElJ9sxMPPT7nN8VR9u6tDoG2pv4h+wmOAOo7KstqVQyqX2nrSMNAa/gwBIrKnX1b063VWEK9zO4sgsJrI6gU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1CEAYvhgDBx24saEithrA+fWmIon52aY6NEAv91779E2c8e80 5D7lsmoPivAg6au1ps3zA5WV02tSoRf4GqpnUSZvfxt9Sqr8BI3ohk6Si6i98wGm3TU= X-Gm-Gg: AeBDietX7IkIG5WQZd8gMqVFfeCz3bj59/Vo2zdDZIcNTvOffIpjSgjohFV61oswREH xJmuZX5kPF9edlO520NrzsPDkCwWD+jMCq/CV/9fPnzkoWgF44ylcijpzgPMOHme4vKQ200IYT2 yUd4ctuD9rabAIFPlc3/Z7bbohSfyTUhgwKnfJUj/kG2WnoDlI2APszjXw3mi+roiK4FWLD7sAj FGeb+EI9MTUwCYPPucgAXOg/vzBlWI+qS/uIfef5naVikSJotc4OU+pG4L5kiHBdlq+Dz1ERgv+ A9rYqF1iXvDKhETKMoJx9KsiZ/cpowkKX37qKIrL1QTYQylHmyMj3S9g/2+GDlDGGkuAKJVAj4Y uKKRMP5bwj2P4HevdUNuvWgzxrrd+8eEg6wawco8zjUChBUDEwEVs2j4nxAyeKKXZsaNMKL0EoN xuOuZXOQWA58niZmY0d2ZTjV23xqajYUQ6N9WitnjkepmMp1zCNw== X-Received: by 2002:a05:600c:a11:b0:489:1a3a:9e45 with SMTP id 5b1f17b1804b1-48a77b1b405mr46646045e9.26.1777378729214; Tue, 28 Apr 2026 05:18:49 -0700 (PDT) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7748e622sm17851125e9.1.2026.04.28.05.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 05:18:48 -0700 (PDT) From: James Clark Date: Tue, 28 Apr 2026 13:18:12 +0100 Subject: [PATCH 2/2] coresight: etm4x: Refactor pm_save_enable handling Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260428-james-cs-ete-pm_save_enable-v1-2-c7a90ca6f43b@linaro.org> References: <20260428-james-cs-ete-pm_save_enable-v1-0-c7a90ca6f43b@linaro.org> In-Reply-To: <20260428-james-cs-ete-pm_save_enable-v1-0-c7a90ca6f43b@linaro.org> To: Suzuki K Poulose , Mike Leach , Leo Yan , Alexander Shishkin , Mathieu Poirier Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, James Clark X-Mailer: b4 0.14.0 pm_save_enable is a global module parameter used as a user input, but at the same time is modified on probe. There are some theoretical scenarios where the DT for one device says to save and another says not to which result in one device not allocating save state memory but later trying to save if probing happens in a certain order. We also couldn't warn if the module parameter is used for ETE because the input value is overwritten, then for the next device it looks like the user had set a value triggering a warning. Fix it by treating the module parameter strictly as user input and adding a new per device pm_save boolean, and then add the warning that couldn't be added before. Signed-off-by: James Clark --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 22 ++++++++++++++++--= ---- drivers/hwtracing/coresight/coresight-etm4x.h | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/h= wtracing/coresight/coresight-etm4x-core.c index a7fb680dd383..915f348620d8 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -1366,20 +1366,30 @@ static void etm4_fixup_wrong_ccitmin(struct etmv4_d= rvdata *drvdata) } } =20 +/* + * Take the global pm_save_enable module argument and setup the CPU PM save + * setting for this device. + */ static int etm4_init_pm_save(struct device *dev, struct etmv4_drvdata *drv= data) { if (etm4x_is_ete(drvdata)) { + if (pm_save_enable) + dev_warn_once(dev, "pm_save_enable module option is only for ETM4\n"); + /* * Always do PM save for ETE. It always uses system registers * which will be lost on CPU power down. */ - pm_save_enable =3D PARAM_PM_SAVE_SELF_HOSTED; + drvdata->pm_save =3D true; } else if (pm_save_enable =3D=3D PARAM_PM_SAVE_FIRMWARE) { - pm_save_enable =3D coresight_loses_context_with_cpu(dev) ? - PARAM_PM_SAVE_SELF_HOSTED : PARAM_PM_SAVE_NEVER; + drvdata->pm_save =3D coresight_loses_context_with_cpu(dev); + } else if (pm_save_enable =3D=3D PARAM_PM_SAVE_SELF_HOSTED) { + drvdata->pm_save =3D true; + } else { + drvdata->pm_save =3D false; } =20 - if (pm_save_enable !=3D PARAM_PM_SAVE_NEVER) { + if (drvdata->pm_save) { drvdata->save_state =3D devm_kmalloc(dev, sizeof(struct etmv4_save_state), GFP_KERNEL); @@ -2037,7 +2047,7 @@ static int etm4_cpu_save(struct etmv4_drvdata *drvdat= a) { int ret =3D 0; =20 - if (pm_save_enable !=3D PARAM_PM_SAVE_SELF_HOSTED) + if (!drvdata->pm_save) return 0; =20 /* @@ -2152,7 +2162,7 @@ static void __etm4_cpu_restore(struct etmv4_drvdata *= drvdata) =20 static void etm4_cpu_restore(struct etmv4_drvdata *drvdata) { - if (pm_save_enable !=3D PARAM_PM_SAVE_SELF_HOSTED) + if (!drvdata->pm_save) return; =20 if (coresight_get_mode(drvdata->csdev)) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtrac= ing/coresight/coresight-etm4x.h index 89d81ce4e04e..6472677f3098 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -1078,6 +1078,7 @@ struct etmv4_drvdata { bool lpoverride : 1; bool skip_power_up : 1; bool paused : 1; + bool pm_save : 1; u64 trfcr; struct etmv4_config config; struct etmv4_save_state *save_state; --=20 2.34.1