From: Eugen Hristev <eugen.hristev@linaro.org>
To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, tglx@linutronix.de, andersson@kernel.org,
pmladek@suse.com, rdunlap@infradead.org, corbet@lwn.net,
david@redhat.com, mhocko@suse.com
Cc: tudor.ambarus@linaro.org, mukesh.ojha@oss.qualcomm.com,
linux-arm-kernel@lists.infradead.org,
linux-hardening@vger.kernel.org, jonechou@google.com,
rostedt@goodmis.org, linux-doc@vger.kernel.org,
devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-arch@vger.kernel.org, tony.luck@intel.com, kees@kernel.org,
Eugen Hristev <eugen.hristev@linaro.org>
Subject: [PATCH 22/26] remoteproc: qcom: Extract minidump definitions into a header
Date: Wed, 19 Nov 2025 17:44:23 +0200 [thread overview]
Message-ID: <20251119154427.1033475-23-eugen.hristev@linaro.org> (raw)
In-Reply-To: <20251119154427.1033475-1-eugen.hristev@linaro.org>
Extract the minidump definitions into a header such that the
definitions can be reused by other drivers.
No other change, purely moving the definitions.
Signed-off-by: Eugen Hristev <eugen.hristev@linaro.org>
---
drivers/remoteproc/qcom_common.c | 56 +------------------------
include/linux/soc/qcom/minidump.h | 68 +++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+), 55 deletions(-)
create mode 100644 include/linux/soc/qcom/minidump.h
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 8c8688f99f0a..4f1c8d005c97 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -18,6 +18,7 @@
#include <linux/rpmsg/qcom_smd.h>
#include <linux/slab.h>
#include <linux/soc/qcom/mdt_loader.h>
+#include <linux/soc/qcom/minidump.h>
#include <linux/soc/qcom/smem.h>
#include "remoteproc_internal.h"
@@ -28,61 +29,6 @@
#define to_ssr_subdev(d) container_of(d, struct qcom_rproc_ssr, subdev)
#define to_pdm_subdev(d) container_of(d, struct qcom_rproc_pdm, subdev)
-#define MAX_NUM_OF_SS 10
-#define MAX_REGION_NAME_LENGTH 16
-#define SBL_MINIDUMP_SMEM_ID 602
-#define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
-#define MINIDUMP_SS_ENCR_DONE ('D' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
-#define MINIDUMP_SS_ENABLED ('E' << 24 | 'N' << 16 | 'B' << 8 | 'L' << 0)
-
-/**
- * struct minidump_region - Minidump region
- * @name : Name of the region to be dumped
- * @seq_num: : Use to differentiate regions with same name.
- * @valid : This entry to be dumped (if set to 1)
- * @address : Physical address of region to be dumped
- * @size : Size of the region
- */
-struct minidump_region {
- char name[MAX_REGION_NAME_LENGTH];
- __le32 seq_num;
- __le32 valid;
- __le64 address;
- __le64 size;
-};
-
-/**
- * struct minidump_subsystem - Subsystem's SMEM Table of content
- * @status : Subsystem toc init status
- * @enabled : if set to 1, this region would be copied during coredump
- * @encryption_status: Encryption status for this subsystem
- * @encryption_required : Decides to encrypt the subsystem regions or not
- * @region_count : Number of regions added in this subsystem toc
- * @regions_baseptr : regions base pointer of the subsystem
- */
-struct minidump_subsystem {
- __le32 status;
- __le32 enabled;
- __le32 encryption_status;
- __le32 encryption_required;
- __le32 region_count;
- __le64 regions_baseptr;
-};
-
-/**
- * struct minidump_global_toc - Global Table of Content
- * @status : Global Minidump init status
- * @md_revision : Minidump revision
- * @enabled : Minidump enable status
- * @subsystems : Array of subsystems toc
- */
-struct minidump_global_toc {
- __le32 status;
- __le32 md_revision;
- __le32 enabled;
- struct minidump_subsystem subsystems[MAX_NUM_OF_SS];
-};
-
struct qcom_ssr_subsystem {
const char *name;
struct srcu_notifier_head notifier_list;
diff --git a/include/linux/soc/qcom/minidump.h b/include/linux/soc/qcom/minidump.h
new file mode 100644
index 000000000000..25247a6216e2
--- /dev/null
+++ b/include/linux/soc/qcom/minidump.h
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Qualcomm Minidump definitions
+ *
+ * Copyright (C) 2016 Linaro Ltd
+ * Copyright (C) 2015 Sony Mobile Communications Inc
+ * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef __QCOM_MINIDUMP_H__
+#define __QCOM_MINIDUMP_H__
+
+#define MAX_NUM_OF_SS 10
+#define MAX_REGION_NAME_LENGTH 16
+#define SBL_MINIDUMP_SMEM_ID 602
+#define MINIDUMP_REGION_VALID ('V' << 24 | 'A' << 16 | 'L' << 8 | 'I' << 0)
+#define MINIDUMP_SS_ENCR_DONE ('D' << 24 | 'O' << 16 | 'N' << 8 | 'E' << 0)
+#define MINIDUMP_SS_ENABLED ('E' << 24 | 'N' << 16 | 'B' << 8 | 'L' << 0)
+
+/**
+ * struct minidump_region - Minidump region
+ * @name : Name of the region to be dumped
+ * @seq_num: : Use to differentiate regions with same name.
+ * @valid : This entry to be dumped (if set to 1)
+ * @address : Physical address of region to be dumped
+ * @size : Size of the region
+ */
+struct minidump_region {
+ char name[MAX_REGION_NAME_LENGTH];
+ __le32 seq_num;
+ __le32 valid;
+ __le64 address;
+ __le64 size;
+};
+
+/**
+ * struct minidump_subsystem - Subsystem's SMEM Table of content
+ * @status : Subsystem toc init status
+ * @enabled : if set to 1, this region would be copied during coredump
+ * @encryption_status: Encryption status for this subsystem
+ * @encryption_required : Decides to encrypt the subsystem regions or not
+ * @region_count : Number of regions added in this subsystem toc
+ * @regions_baseptr : regions base pointer of the subsystem
+ */
+struct minidump_subsystem {
+ __le32 status;
+ __le32 enabled;
+ __le32 encryption_status;
+ __le32 encryption_required;
+ __le32 region_count;
+ __le64 regions_baseptr;
+};
+
+/**
+ * struct minidump_global_toc - Global Table of Content
+ * @status : Global Minidump init status
+ * @md_revision : Minidump revision
+ * @enabled : Minidump enable status
+ * @subsystems : Array of subsystems toc
+ */
+struct minidump_global_toc {
+ __le32 status;
+ __le32 md_revision;
+ __le32 enabled;
+ struct minidump_subsystem subsystems[MAX_NUM_OF_SS];
+};
+
+#endif
--
2.43.0
next prev parent reply other threads:[~2025-11-19 15:46 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 15:44 [PATCH 00/26] Introduce meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 01/26] kernel: " Eugen Hristev
2025-11-22 0:04 ` kernel test robot
2025-11-24 3:02 ` Bagas Sanjaya
2025-11-19 15:44 ` [PATCH 02/26] init/version: Annotate static information into meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 03/26] mm/percpu: " Eugen Hristev
2025-11-21 17:13 ` kernel test robot
2025-11-21 19:13 ` kernel test robot
2025-11-19 15:44 ` [PATCH 04/26] cpu: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 05/26] genirq/irqdesc: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 06/26] timers: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 07/26] kernel/fork: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 08/26] mm/page_alloc: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 09/26] mm/show_mem: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 10/26] mm/swapfile: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 11/26] kernel/vmcore_info: Register dynamic " Eugen Hristev
2025-11-19 15:44 ` [PATCH 12/26] kernel/configs: " Eugen Hristev
2025-11-21 22:16 ` kernel test robot
2025-11-19 15:44 ` [PATCH 13/26] mm/init-mm: Annotate static " Eugen Hristev
2025-11-19 15:44 ` [PATCH 14/26] panic: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 15/26] kallsyms: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 16/26] mm/mm_init: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 17/26] sched/core: Annotate runqueues " Eugen Hristev
2025-11-19 15:44 ` [PATCH 18/26] mm/memblock: Add MEMBLOCK_INSPECT flag Eugen Hristev
2025-11-19 15:44 ` [PATCH 19/26] mm/numa: Register information into meminspect Eugen Hristev
2025-11-19 15:44 ` [PATCH 20/26] mm/sparse: " Eugen Hristev
2025-11-19 15:44 ` [PATCH 21/26] printk: " Eugen Hristev
2025-11-19 15:44 ` Eugen Hristev [this message]
2025-11-19 15:44 ` [PATCH 23/26] soc: qcom: Add minidump driver Eugen Hristev
2025-11-22 4:55 ` kernel test robot
2025-11-22 7:54 ` kernel test robot
2025-11-19 15:44 ` [PATCH 24/26] soc: qcom: smem: Add minidump device Eugen Hristev
2025-11-19 15:44 ` [PATCH 25/26] dt-bindings: reserved-memory: Add Google Kinfo Pixel reserved memory Eugen Hristev
2025-11-19 16:02 ` Krzysztof Kozlowski
2025-11-19 16:19 ` Eugen Hristev
2025-11-20 7:21 ` Krzysztof Kozlowski
2025-11-19 16:33 ` Rob Herring (Arm)
2025-11-19 22:41 ` Rob Herring
2025-11-19 15:44 ` [PATCH 26/26] meminspect: Add Kinfo compatible driver Eugen Hristev
2025-11-19 16:30 ` [PATCH 00/26] Introduce meminspect Lorenzo Stoakes
2025-11-19 17:11 ` Eugen Hristev
2025-11-19 17:14 ` Lorenzo Stoakes
2025-11-19 17:19 ` Eugen Hristev
2025-11-19 18:15 ` Steven Rostedt
2025-11-19 18:24 ` Eugen Hristev
2025-11-19 18:38 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251119154427.1033475-23-eugen.hristev@linaro.org \
--to=eugen.hristev@linaro.org \
--cc=andersson@kernel.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=devicetree@vger.kernel.org \
--cc=jonechou@google.com \
--cc=kees@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mukesh.ojha@oss.qualcomm.com \
--cc=pmladek@suse.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=tudor.ambarus@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox