Message ID | 20170315095900.13962-3-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
diff --git a/hw/xive.c b/hw/xive.c index 6553e9b..bb20cb7 100644 --- a/hw/xive.c +++ b/hw/xive.c @@ -3838,6 +3838,9 @@ static void xive_reset_one(struct xive *x) buddy_reset(x->vp_buddy); #endif + /* The rest must not be called with the lock held */ + unlock(&x->lock); + /* Re-configure the CPUs */ for_each_present_cpu(c) { struct xive_cpu_state *xs = c->xstate; @@ -3856,8 +3859,6 @@ static void xive_reset_one(struct xive *x) xive_ipi_init(x, c); } } - - unlock(&x->lock); } static int64_t opal_xive_reset(uint64_t version)
The re-initialization of the per-CPU data structures must be done without holding the xive lock as it will be taken when needed by the functions being called. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- hw/xive.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)