summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2023-08-21 10:38:38 -0700
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2023-08-21 10:38:39 -0700
commit2b67279aa59172db5533adfc7ae4c4d4f3df0dae (patch)
tree73e89951b89d279a62c644a2a0b2ad3b7e3652d5
parentc2e8a938a2af310362e4590834171fdc24081b28 (diff)
parent253d84cf48e0b678554ea6580058b881a44ee9ad (diff)
downloadlwis-2b67279aa59172db5533adfc7ae4c4d4f3df0dae.tar.gz
Merge android14-gs-pixel-5.15-udc-qpr1 into android14-gs-pixel-5.15
SBMerger: 558810260 Change-Id: I2b9dc56c400ffb7285e530e0d101d31a4056beef Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--lwis_io_entry.c7
-rw-r--r--lwis_io_entry.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/lwis_io_entry.c b/lwis_io_entry.c
index 6c55634..67cd639 100644
--- a/lwis_io_entry.c
+++ b/lwis_io_entry.c
@@ -21,6 +21,7 @@ int lwis_io_entry_poll(struct lwis_device *lwis_dev, struct lwis_io_entry *entry
uint64_t val, start;
uint64_t timeout_ms = entry->read_assert.timeout_ms;
int ret = 0;
+ int64_t process_time_ms = 0;
/* Only read and check once if in_hardirq() */
if (in_hardirq()) {
@@ -48,6 +49,12 @@ int lwis_io_entry_poll(struct lwis_device *lwis_dev, struct lwis_io_entry *entry
usleep_range(1000, 1000);
}
}
+
+ process_time_ms = ktime_to_ms(lwis_get_time()) - start;
+
+ if (process_time_ms > DEFAULT_POLLING_TIMEOUT_MS) {
+ dev_info(lwis_dev->dev, "IO entry polling processed %lld ms", process_time_ms);
+ }
return ret;
}
diff --git a/lwis_io_entry.h b/lwis_io_entry.h
index a06e17a..bf8b644 100644
--- a/lwis_io_entry.h
+++ b/lwis_io_entry.h
@@ -18,6 +18,8 @@
#define MIN_WAIT_TIME 10
/* Maximum value of sleep time */
#define MAX_WAIT_TIME 20000
+/* Default value of polling timeout */
+#define DEFAULT_POLLING_TIMEOUT_MS 5
/*
* lwis_io_entry_poll: