diff options
author | PixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2022-06-19 18:39:40 -0700 |
---|---|---|
committer | Robin Peng <robinpeng@google.com> | 2022-06-21 08:56:53 +0000 |
commit | 7528759e589aeaddf013d9d6fa88b05481052427 (patch) | |
tree | f70dde88e00015bf9195acb542ffedf93e224fe7 | |
parent | aa46c84ea92d9b298c9cd87a56a0de23c196d2ee (diff) | |
parent | 50a3e50660372ebfcf976678e468f513dc7ffa85 (diff) | |
download | aoc-7528759e589aeaddf013d9d6fa88b05481052427.tar.gz |
Merge android13-gs-pixel-5.10-tm-d1 into android13-gs-pixel-5.10-tm-qpr1
Bug: 233569354
SBMerger: 442815275
Change-Id: If5d9370ff56f8dc7b39806d23f6759e25b25f62a
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | aoc.c | 11 | ||||
-rw-r--r-- | aoc_channel_dev.c | 21 |
2 files changed, 17 insertions, 15 deletions
@@ -2140,12 +2140,6 @@ static void aoc_monitor_online(struct work_struct *work) if (aoc_state == AOC_STATE_FIRMWARE_LOADED) { dev_err(prvdata->dev, "aoc init no respond, try restart\n"); -#if IS_ENABLED(CONFIG_SOC_GS201) - /* TODO: Causing APC watchdogs on GS201 */ - mutex_unlock(&aoc_service_lock); - return; -#endif - aoc_take_offline(prvdata); restart_rc = aoc_watchdog_restart(prvdata); if (restart_rc) @@ -2537,8 +2531,9 @@ static void aoc_watchdog(struct work_struct *work) dev_err(prvdata->dev, "aoc coredump timed out, coredump only contains DRAM\n"); snprintf(crash_info, RAMDUMP_SECTION_CRASH_INFO_SIZE, - "AoC watchdog : %s (incomplete)", - crash_reason_valid ? crash_reason : "unknown reason"); + "AoC watchdog : %s (incomplete %u:%u)", + crash_reason_valid ? crash_reason : "unknown reason", + ramdump_header->breadcrumbs[0], ramdump_header->breadcrumbs[1]); } if (ramdump_header->valid && memcmp(ramdump_header, RAMDUMP_MAGIC, sizeof(RAMDUMP_MAGIC))) { diff --git a/aoc_channel_dev.c b/aoc_channel_dev.c index 5911e1f..d09d6f6 100644 --- a/aoc_channel_dev.c +++ b/aoc_channel_dev.c @@ -36,7 +36,8 @@ module_param(received_msg_count, long, S_IRUGO); module_param(sent_msg_count, long, S_IRUGO); struct chan_prvdata { - struct wakeup_source *wakelock; + struct wakeup_source *queue_wakelock; + struct wakeup_source *user_wakelock; }; struct aocc_device_entry { @@ -245,9 +246,9 @@ static int aocc_demux_kthread(void *data) * reading a waking message at the end. */ if (take_wake_lock) { - pm_wakeup_ws_event(service_prvdata->wakelock, 200, true); + pm_wakeup_ws_event(service_prvdata->user_wakelock, 200, true); } else if (aoc_service_can_read(service)) { - pm_wakeup_ws_event(service_prvdata->wakelock, 10, true); + pm_wakeup_ws_event(service_prvdata->queue_wakelock, 10, true); } if (!handler_found) { @@ -773,7 +774,8 @@ static int aocc_probe(struct aoc_service_dev *dev) return -ENOMEM; if (strcmp(dev_name(&dev->dev), "usf_sh_mem_doorbell") != 0) { - prvdata->wakelock = wakeup_source_register(&dev->dev, dev_name(&dev->dev)); + prvdata->user_wakelock = wakeup_source_register(&dev->dev, dev_name(&dev->dev)); + prvdata->queue_wakelock = wakeup_source_register(&dev->dev, "usf_queue"); dev->prvdata = prvdata; ret = create_character_device(dev); @@ -808,9 +810,14 @@ static int aocc_remove(struct aoc_service_dev *dev) sh_mem_doorbell_service_dev = NULL; } else { prvdata = dev->prvdata; - if (prvdata->wakelock) { - wakeup_source_unregister(prvdata->wakelock); - prvdata->wakelock = NULL; + if (prvdata->queue_wakelock) { + wakeup_source_unregister(prvdata->queue_wakelock); + prvdata->queue_wakelock = NULL; + } + + if (prvdata->user_wakelock) { + wakeup_source_unregister(prvdata->user_wakelock); + prvdata->user_wakelock = NULL; } } |