diff mbox series

[v2,1/5] powerpc/powernv: Re-enable imc trace-mode in kernel

Message ID 20200121101728.14858-2-anju@linux.vnet.ibm.com (mailing list archive)
State Superseded
Headers show
Series Re-enable IMC trace-mode | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (20862247a368dbb75d6e97d82345999adaacf3cc)
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Anju T Sudhakar Jan. 21, 2020, 10:17 a.m. UTC
commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu"
disables IMC(In-Memory Collection) trace-mode in kernel, since frequent
mode switching between accumulation mode and trace mode via the spr LDBAR
in the hardware can trigger a checkstop(system crash).

Patch to re-enable imc-trace mode in kernel.

The following patch in this series will address the mode switching issue
by implementing a global lock, and will restrict the usage of
accumulation and trace-mode at a time.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
---
 arch/powerpc/platforms/powernv/opal-imc.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Madhavan Srinivasan Feb. 6, 2020, 9:03 a.m. UTC | #1
On 1/21/20 3:47 PM, Anju T Sudhakar wrote:
> commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu"
> disables IMC(In-Memory Collection) trace-mode in kernel, since frequent
> mode switching between accumulation mode and trace mode via the spr LDBAR
> in the hardware can trigger a checkstop(system crash).
>
> Patch to re-enable imc-trace mode in kernel.
>
> The following patch in this series will address the mode switching issue
> by implementing a global lock, and will restrict the usage of
> accumulation and trace-mode at a time.

Reviewed-by: MAdhavan Srinivasan <maddy@linux.ibm.com>

>
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> ---
>   arch/powerpc/platforms/powernv/opal-imc.c | 9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
> index 000b350d4060..3b4518f4b643 100644
> --- a/arch/powerpc/platforms/powernv/opal-imc.c
> +++ b/arch/powerpc/platforms/powernv/opal-imc.c
> @@ -278,14 +278,7 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
>   			domain = IMC_DOMAIN_THREAD;
>   			break;
>   		case IMC_TYPE_TRACE:
> -			/*
> -			 * FIXME. Using trace_imc events to monitor application
> -			 * or KVM thread performance can cause a checkstop
> -			 * (system crash).
> -			 * Disable it for now.
> -			 */
> -			pr_info_once("IMC: disabling trace_imc PMU\n");
> -			domain = -1;
> +			domain = IMC_DOMAIN_TRACE;
>   			break;
>   		default:
>   			pr_warn("IMC Unknown Device type \n");
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
index 000b350d4060..3b4518f4b643 100644
--- a/arch/powerpc/platforms/powernv/opal-imc.c
+++ b/arch/powerpc/platforms/powernv/opal-imc.c
@@ -278,14 +278,7 @@  static int opal_imc_counters_probe(struct platform_device *pdev)
 			domain = IMC_DOMAIN_THREAD;
 			break;
 		case IMC_TYPE_TRACE:
-			/*
-			 * FIXME. Using trace_imc events to monitor application
-			 * or KVM thread performance can cause a checkstop
-			 * (system crash).
-			 * Disable it for now.
-			 */
-			pr_info_once("IMC: disabling trace_imc PMU\n");
-			domain = -1;
+			domain = IMC_DOMAIN_TRACE;
 			break;
 		default:
 			pr_warn("IMC Unknown Device type \n");