From patchwork Wed Feb 18 03:57:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 440783 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D8D4F14016B for ; Wed, 18 Feb 2015 14:57:56 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id AD6791A0A07 for ; Wed, 18 Feb 2015 14:57:56 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 1E1411A014B for ; Wed, 18 Feb 2015 14:57:51 +1100 (AEDT) Received: from pasglop.au.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t1I3vVi2028817; Tue, 17 Feb 2015 21:57:45 -0600 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Wed, 18 Feb 2015 14:57:24 +1100 Message-Id: <1424231849-17973-8-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424231849-17973-1-git-send-email-benh@kernel.crashing.org> References: <1424231849-17973-1-git-send-email-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 08/13] fsp/console: Don't time_wait with lock held X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Benjamin Herrenschmidt --- hw/fsp/fsp-console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index d77d086..554dbde 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -819,7 +819,6 @@ static bool send_all_hvsi_close(void) bool has_hvsi = false; static const uint8_t close_packet[] = { 0xfe, 6, 0, 1, 0, 3 }; - lock(&fsp_con_lock); for (i = 0; i < MAX_SERIAL; i++) { struct fsp_serial *fs = &fsp_serials[i]; struct fsp_serbuf_hdr *sb = fs->out_buf; @@ -839,9 +838,10 @@ static bool send_all_hvsi_close(void) break; time_wait_ms(500); } + lock(&fsp_con_lock); fsp_write_vserial(fs, close_packet, 6); + unlock(&fsp_con_lock); } - unlock(&fsp_con_lock); return has_hvsi; }