From patchwork Mon Apr 9 05:40:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 896130 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KKb62Vk9z9s0t for ; Mon, 9 Apr 2018 16:07:30 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CkoMgtaN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40KKb60RwVzDqvH for ; Mon, 9 Apr 2018 16:07:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CkoMgtaN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::244; helo=mail-pf0-x244.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CkoMgtaN"; dkim-atps=neutral Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40KK121XZBzDr3t for ; Mon, 9 Apr 2018 15:41:26 +1000 (AEST) Received: by mail-pf0-x244.google.com with SMTP id a2so5234331pff.8 for ; Sun, 08 Apr 2018 22:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HEPXN3AH8tgZzHS4Ujcw5nnYG9YQTbYLQC+be7pmhgA=; b=CkoMgtaNL+ulR3V6iU77VzaewqM9E8emlZFLtUfdEc9didySqKJXY+PESZE/1J8U6X eAPYqZH813Cqazavic8s0R22bCh+7VW3PwZmKW8mjn/r6ye+8XivS1mNsDWa7eMJfmTb Igy0iN6bvjMwnEKyQAJigLDnlp16As2GWjll4+CJdLl269NEHS0/H4CCqJTguGzJ6fxJ Bkprfwoh9sgEHNmXckOg16it3Ct6aNqKG+UZlniazb4jmYwCZgsU3Mxl8i1/EhCEtNgb jkkGtbGjiEBMc1Kpg9ML5MRwSdjX0dO2t3HlkAW6uhlqG1xz+t5HR7MG7DHUVASjb7vg wyjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HEPXN3AH8tgZzHS4Ujcw5nnYG9YQTbYLQC+be7pmhgA=; b=MYUHDAePAdjhLDHlHgJg3FZNJQeydOWTRszjxBn2aHNhPjObzT9bBh+XUKzuE3E4ky uWccxK8KIQEzIbgBq374tApdgYvNxZC2hLa8N1R8w7YoxWQoCps6zM7ldVcnX+28SHNC PYnIJBPCKHRmB11zOwKm6oN20ESFMgtcQVuBvbELd8QW3ZZ4mCiXkJnmkSsssWY4F31U t2TktJWOt2MSFzBn3j1Ud6BEOg2FUk4lkAktJ1Z88qS3Y1MR4XAPfKnI4rzb9y4imYDO YWov3rRt/6nYJdiMPxhLfN+coAqakBLk7QQPvOe3UbFTzpxavuo8mtn9bYmHnwnJHFce I9kQ== X-Gm-Message-State: AElRT7FKa99Aagau8s7ipHye1MxULdTsw8fIekxrVxTfKb3uw8rjbiVG 4LAe0+DiFPGq+t2qzdFutxQuoQ== X-Google-Smtp-Source: AIpwx4+23zBnOYFJUtAKi3QFUGv1OzaPlieGQxrNeGc4BtuG+tLkL8fIZo7PmEWfP91d3+mDPFSkMQ== X-Received: by 10.98.133.212 with SMTP id m81mr28146869pfk.61.1523252483845; Sun, 08 Apr 2018 22:41:23 -0700 (PDT) Received: from roar.au.ibm.com (59-102-70-78.tpgi.com.au. [59.102.70.78]) by smtp.gmail.com with ESMTPSA id 204sm1043194pgb.67.2018.04.08.22.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Apr 2018 22:41:23 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 6/6] drivers/tty/hvc: remove unexplained "just in case" spin delay Date: Mon, 9 Apr 2018 15:40:56 +1000 Message-Id: <20180409054056.27292-7-npiggin@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180409054056.27292-1-npiggin@gmail.com> References: <20180409054056.27292-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This delay was in the very first OPAL console commit 6.5 years ago. The firmware console has hardened sufficiently to remove it. Cc: Benjamin Herrenschmidt Signed-off-by: Nicholas Piggin Reviewed-by: Benjamin Herrenschmidt --- drivers/tty/hvc/hvc_opal.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index e151cfacf2a7..436b98258e60 100644 --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c @@ -307,14 +307,8 @@ static int udbg_opal_getc(void) int ch; for (;;) { ch = udbg_opal_getc_poll(); - if (ch == -1) { - /* This shouldn't be needed...but... */ - volatile unsigned long delay; - for (delay=0; delay < 2000000; delay++) - ; - } else { + if (ch != -1) return ch; - } } }