Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp409833lqr; Wed, 5 Jun 2024 09:23:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJ/MavRQfvXLTI3T2UTZtgQJ0qWpe9rh4Dia+iqxHul0XBvp0VXkciAF9vIodRtVQ2pJzbkuYNQyz3OsIZ6sNOLgm77PuyvG6FOw7sYQ== X-Google-Smtp-Source: AGHT+IHwGCn29UxigVEe0l+PmWNlLUHmoYVP9c4sGHGCO2ONJtbrjFQXMo355OfE2hV0IclsdT+V X-Received: by 2002:a05:6e02:13a3:b0:374:b143:96dd with SMTP id e9e14a558f8ab-374b1ee27cemr31574555ab.3.1717604618874; Wed, 05 Jun 2024 09:23:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717604618; cv=pass; d=google.com; s=arc-20160816; b=1LvgyJkQAWoQcTAedmjhyOaCmoXsu/qHW0FzQqBjQaZcHrDFptmWvT/6r+tXg1Y9k5 B7kM4E5nx6dh7iVDPDi2IPcpCyckVmMMAFi+7OUvsx8LBHGGkAwaXSfEy7n31pli/eHW TC/gJIfoIyXIi6gDwq9aX2qPnyGwnDhCZAvjy6kBMD34biitk4evgLlK6Ygomjuqp6qM 9YMzKHDUyc9IO56VPpYYenTl03ptNWM7GbtK0U3lP+AkhcgfLEr+G8Tkng0/b16Os8Pg dm20wTHOVRz7YMxjewJ/tcNJAgHwUPF4lPuN3K9Mw56Od2YQuHM+rN9y4B/cEYptshpA ltrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=ECObdowLHaKJRSddAmBeaz1UoR0dD+Xo0UOjE6cZ7+Q=; fh=lBrqDP4W84ltGMxgRgMplLGeJ6OYKyUqFLdXI6maIpA=; b=Vf8bhV6DqVhCG4AVQWEAtfg1mcCN5CNxywXJxS1MbCojFcO8topB029hnt2bCfk02Y G8A2BdqucAy4Pqq5U/5wzqhmw+6JF2LivZbIWwfAOIyIIS17LAxAQXq1zSpqBCI+iE2P 6M4Et2Wb3ooAnLTMU0y8OzvAW6qOkf05zcEMKjjl4ILgcMZcPwzcGKIseJPoyVhyLV7g K9LQnYViiY0ErblkBO5qdDuAKMn3pEJxnTNcA7PwE6vxpnp7cVd4CxFxHs/J805FIZMi MGNOcxrfaXkkdRGYw2v5MhNL8Zi9aUxn/DWB5BihPVLwpd70GeeFOKxettKYrzG+ivXS 3qyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35d973c95si27555a12.886.2024.06.05.09.23.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 09:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-202888-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7DDC2B23996 for ; Wed, 5 Jun 2024 16:09:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1763188CA4; Wed, 5 Jun 2024 16:09:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AF0327450; Wed, 5 Jun 2024 16:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717603762; cv=none; b=Bm71ybfWfDLjRc3W3vpdSI83W68NuRQEPkwPigmfy2yd0nBVpF5vcNpQMmVH+e87mkjmUFKL3kI2I1f0/7tXwiB9TzzVlfj636VnpPuZr3QWuFdzejBHH6l0pElsyrrznHnDqUmZMl8rl8n4U6a+kNtfZHay5ideEDr+uXZSSCY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717603762; c=relaxed/simple; bh=eBkn4utFAH7OSlBC/g1EBgVWMbx38sXX+1z4qb9G5KE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JZoLg54y4Zxf0MFEBcju/7jMRd6DUTeb5aahFvmho5fIyIW1RbDseKQQuWQsptiIea+KOmw3P1X1bd2Qg4mqSgEEf23xox3D2e11DTGV8P2x18ZDJM2GWLjx2PmNO5S5/OogDBLPRikUhp59OQsb2PVOI2CQ/XA1X5w65S4yR1Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E81F8339; Wed, 5 Jun 2024 09:09:43 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16D333F64C; Wed, 5 Jun 2024 09:09:17 -0700 (PDT) Message-ID: <739d24fc-b557-4ef9-875d-d1a800f6c4db@arm.com> Date: Wed, 5 Jun 2024 17:09:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 3/7] coresight: core: Add provision for panic callbacks To: Linu Cherian Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, sgoutham@marvell.com, gcherian@marvell.com, suzuki.poulose@arm.com, mike.leach@linaro.org References: <20240605081725.622953-1-lcherian@marvell.com> <20240605081725.622953-4-lcherian@marvell.com> Content-Language: en-US From: James Clark In-Reply-To: <20240605081725.622953-4-lcherian@marvell.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 05/06/2024 09:17, Linu Cherian wrote: > Panic callback handlers allows coresight device drivers to sync > relevant trace data and trace metadata to reserved memory > regions so that they can be retrieved later in the subsequent > boot or in the crashdump kernel. > > Signed-off-by: Linu Cherian > Reviewed-by: James Clark > --- > Changelog from v8: > Added Reviewed-by tag. > > drivers/hwtracing/coresight/coresight-core.c | 37 ++++++++++++++++++++ > include/linux/coresight.h | 12 +++++++ > 2 files changed, 49 insertions(+) > [...] > static int __init coresight_init(void) > { > int ret; > @@ -1377,6 +1408,10 @@ static int __init coresight_init(void) > if (ret) > goto exit_bus_unregister; > > + /* Register function to be called for panic */ > + ret = atomic_notifier_chain_register(&panic_notifier_list, > + &coresight_notifier); > + ret isn't checked here