mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
drivers: qcom: rpmh: caching batch requests should flag the cache dirty
The sleep/wake state batch requests are saved in a linked list and flushed along with other sleep/wake request when entering system low power modes. Caches are flushed only if the state flag is marked dirty. A race situation could cause the batch sleep/wake requests to not be flushed. Here is how this could happen - - Interconnect driver (ICC) invalidates the sleep/wake requests - RSC driver clears the TCSes (BCM, VRM, ARC sleep votes cleared) - ICC sends an active state response-required request - RSC driver sends the AMC request - RPMH waits on the response, calls wait_for_completion - Scheduler schedules idle thread - cpuidle enters cluster idle state - RPMH flushes cache and marks cache clean (no BCM votes in TCS) - RSC driver receives IRQ response - RPMH calls complete() - ICC worker thread resumes execution - ICC driver calls RPMH driver with updated sleep and wake votes - RPMH caches the request, *cache is NOT marked dirty* - Scheduler schedules idle thread - cpuidle enters cluster idle state - Cache is clean and nothing to flush - CPU enters idle =>ICC sleep/wake votes are not sent Fix this by dirtying the cache state even when caching batch requests. Change-Id: I7613e665d181f8abb27915d622442e7b981f9fcc Signed-off-by: Lina Iyer <ilina@codeaurora.org>
This commit is contained in:
parent
514fa165a3
commit
ac290b4993
1 changed files with 1 additions and 0 deletions
|
|
@ -350,6 +350,7 @@ static void cache_batch(struct rpmh_ctrlr *ctrlr, struct batch_cache_req *req)
|
|||
|
||||
spin_lock_irqsave(&ctrlr->cache_lock, flags);
|
||||
list_add_tail(&req->list, &ctrlr->batch_cache);
|
||||
ctrlr->dirty = true;
|
||||
spin_unlock_irqrestore(&ctrlr->cache_lock, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue