Add missing mutex in LPC error path
Add missing mutex in LPC error path

There is a pre-check to look for errors before every LPC read or
write operation.  This check was running outside of the mutex,
which meant that if an operation caused an error and then another
thread attempted a separate LPC op, the second thread would end
up reporting the error from the first operation,  This would
typically just result in a double log, but there are cases where
an error is expected (the SIO problem for the hiomap protocol)
and is deleted by the caller.  Because of the second thread
seeing the error, the error condition ends up being a visible
log.

The change here is to move the pre-check inside the mutex so that
only 1 thread can ever be checking the LPC status at a time.

Change-Id: I9ce0ce48252b7d2b271aa5dd6e0a819dfb728a25
CQ: SW450825
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68609
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: Jenkins OP Build CI <e610bd72261d3c0a48f1e8ae36832ab00774d426@us.ibm.com>
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Reviewed-by: Corey V. Swenson <6b585c7446d4a0351ef146912eaabcae3d9a2e28@us.ibm.com>
Reviewed-by: Christian R. Geddes <f397583a9caa8163a06ad1128784fb67413f2fe6@us.ibm.com>
Reviewed-by: William G. Hoffa <7dd6aa5e78423995d9d7c7ecada5b77ee07f88cc@us.ibm.com>
Tested-by: Jenkins OP HW <0eb0fff262f74a65a832afbcc7b153e391c9a3fd@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <fb8db48116bc8a69e29dd8cdb037246f232f4af5@us.ibm.com>

open-power/hostboot,open-power/hostboot,open-power/hostboot,open-power/hostboot,open-power/hostboot