The peripheral registrations are stored in a table on apps processor. During SSR, these need to be deleted and fresh ones are recorded after SSR completes. Currently this clean up function is called from interrupt context. This cleanup function works on a shared table, which is protected by mutexes. Using this mutex in interrupt function causes bug with spinlocks and generates warnings. Moving this cleanup to work queue resolves the issue. However, there might be race condition with this move. A new registration might come in, while the clean up is still going on OR yet to begin. Adding a bit mask which tracks the peripheral undergoing SSR. if new registration is received from this processor before clean up is completed, the registration packet is dropped. Also, an error message is printed in kernel to notify of the drop. Change-Id: I95e143220a3960d4e9459bb9874bab2911be0937 CRs-Fixed: 371866 Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>