ASoC: Haswell DSP: Fix locking to reset, boot and IRQ handler.

To be squashed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ASoC: SST DSP: IPC message Tx/Rx should be unlocked as callers will hold.

To be squashed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ASoC: Haswell IPC: Simplify locking.

Remove the IPC lock as it can potentially deadlock with the sst splinlock.
Both were really being used to protect shim IO/IRQ so we can simplify
things a lot by only using 1 lock.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ASoC: Intel ACPI: Fix build warning.

To be squashed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
ASoC: Intel: Baytrail IPC: Simplify locking

This follows the same idea than ("ASoC: Haswell IPC: Simplify locking") by
removing the ipc_lock. Here potential spinlock inversion was fixed earlier
but using two spinlocks is not necessary robust against code changes.

Also separate ipc_lock is not absolutely needed since SHIM lock already
protects most of the code paths and are otherwise around quick code paths.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
ASoC: Intel: Fix potential spinlock recursion in low level SHIM accessors

There is potential spinlock recursion between SST platform specific HW irq
handlers and locked sst_dsp_shim_ accessors. Fix this by using
spin_lock_irqsave/spin_unlock_irqrestore.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
ASoC: Intel: Baytrail: Fix spinlock deadlock

There is possibility for a spinlock deadlock when calling
snd_pcm_period_elapsed with the SHIM spinlock held.

sst_byt_irq_thread (takes the lock)
-> sst_byt_process_notification
   -> byt_notify_pointer
      -> snd_pcm_period_elapsed
         -> ...
                -> sst_byt_pcm_trigger
                   -> sst_byt_stream_ calls
                      -> sst_byt_stream_operations
                         -> sst_byt_ipc_tx_msg_wait/_nowait
                            -> sst_byt_ipc_tx_message (takes the lock)

Fix this by releasing the lock before calling the byt_notify_pointer and
taking it back after.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>