From patchwork Mon Apr 21 16:40:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 4025711 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2737B9F391 for ; Mon, 21 Apr 2014 16:41:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49CDE20221 for ; Mon, 21 Apr 2014 16:41:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DB8E2021F for ; Mon, 21 Apr 2014 16:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbaDUQko (ORCPT ); Mon, 21 Apr 2014 12:40:44 -0400 Received: from mail-ob0-f201.google.com ([209.85.214.201]:58364 "EHLO mail-ob0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752714AbaDUQkk (ORCPT ); Mon, 21 Apr 2014 12:40:40 -0400 Received: by mail-ob0-f201.google.com with SMTP id vb8so415526obc.4 for ; Mon, 21 Apr 2014 09:40:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q3B4xXYWmsinSJzTV6r3RGYST34pSL3L1qkmLXFzTZY=; b=RdjCZaty/FIoOnI1UVayRYrYKq2HcSWZMmpx2/6otPWNWhgnSAmHY5iuyDJirTcuA/ /3BN0d3ohhOBDHqOs55CKNRDYkp62kp6nZ8nPHTYkrHwbJ10BRXbVjHU8JIv6nOeTe9N byILwTNOpSB1UKgI2XoUMP6E90HipkIQRPFZ8c1vK2guEvXY/jyKShSzgoD0G2YTO/3g XqJdtLgeQ7cQxUUxem9pTDKyM8H3DZ+AoPADAxsywaDxpFb0bypE46fKUS3wdLsNefm+ y5Gio5kD97YxvpnNZrp/XVQM1LqFP/wwPd3pue8gvblgYyZv2oKJWOYbFawGalT2UemI Q9zg== X-Gm-Message-State: ALoCoQlCCaEwEgzGCd7IL62h6Yl9ivoM3pYFxlobuI8yQiizQ7L+BLW7EcDPqKR1eZj90WkS+4A13LAa5I9N1iDvl9seGiFqsblUkRIqntOJwNc6EkTe8RKlyhyjcJ70DbTuobJxQbA/NThotfYrvAMwc3GD8175qBmSngV3I3ZxCnephGF6XSq1GKylVVsyxH6K/B47w33bneKIh6YGG/SuKSRPiWgarA== X-Received: by 10.182.106.229 with SMTP id gx5mr12887044obb.31.1398098439643; Mon, 21 Apr 2014 09:40:39 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id g21si5235268yhe.3.2014.04.21.09.40.39 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Apr 2014 09:40:39 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.72.141]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 7ABB55A4274; Mon, 21 Apr 2014 09:40:39 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id 2748880925; Mon, 21 Apr 2014 09:40:39 -0700 (PDT) From: Doug Anderson To: Greg Kroah-Hartman , linux-samsung-soc@vger.kernel.org Cc: olof@lixom.net, Doug Anderson , jslaby@suse.cz, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] serial: samsung: Change barrier() to cpu_relax() in console output Date: Mon, 21 Apr 2014 09:40:36 -0700 Message-Id: <1398098436-31895-3-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.9.1.423.g4596e3a In-Reply-To: <1398098436-31895-1-git-send-email-dianders@chromium.org> References: <1398098436-31895-1-git-send-email-dianders@chromium.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The two functions to write out to the console (one used in normal console mode and one in polling console mode) were slightly different. One used a barrier() in its loop and the other a cpu_relax(). The barrier() really doesn't do anything since we're using rd_regl() to read the port anyway. Switch it to cpu_relax() to make things consistent. No known bugs / issues are fixed by this change--it just makes things more consistent. Signed-off-by: Doug Anderson --- drivers/tty/serial/samsung.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 12442748..1f5505e 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1466,7 +1466,7 @@ s3c24xx_serial_console_putchar(struct uart_port *port, int ch) unsigned int ufcon = rd_regl(port, S3C2410_UFCON); while (!s3c24xx_serial_console_txrdy(port, ufcon)) - barrier(); + cpu_relax(); wr_regb(port, S3C2410_UTXH, ch); }