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>
Loading
Please register or sign in to comment