summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Scheible <johnscheible@google.com>2022-10-27 16:20:29 -0700
committerJawad AlDhalemi <jaldhalemi@google.com>2022-11-15 21:26:18 +0000
commit09c58ad0bf693bc971ce8182c039597f9e21d064 (patch)
tree9ed3cf12060311f3dd3001a847fc9781e69e9cc6
parent707d7f2f766e3d8933a4095f696dd487e351b8b7 (diff)
downloadgs201-09c58ad0bf693bc971ce8182c039597f9e21d064.tar.gz
To assist with debugging of ramdumps where the GXP driver is not in the backstack, add a static symbol containing a pointer to the driver state so it can be located quickly in memory. Bug: 255451381 Signed-off-by: John Scheible <johnscheible@google.com> Change-Id: Ie68196f2642e839932dee0c3a972f17f563e2764
-rw-r--r--gxp-platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gxp-platform.c b/gxp-platform.c
index 642d829..5da0eb2 100644
--- a/gxp-platform.c
+++ b/gxp-platform.c
@@ -51,6 +51,8 @@
#include "gxp-wakelock.h"
#include "gxp.h"
+static struct gxp_dev *gxp_debug_pointer;
+
#define __wait_event_lock_irq_timeout_exclusive(wq_head, condition, lock, \
timeout, state) \
___wait_event(wq_head, ___wait_cond_timeout(condition), state, 1, \
@@ -2237,6 +2239,8 @@ static int gxp_platform_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&gxp->client_list);
mutex_init(&gxp->client_list_lock);
+ gxp_debug_pointer = gxp;
+
return 0;
err_vd_destroy:
gxp_vd_destroy(gxp);
@@ -2278,6 +2282,8 @@ static int gxp_platform_remove(struct platform_device *pdev)
devm_kfree(dev, (void *)gxp);
+ gxp_debug_pointer = NULL;
+
return 0;
}