Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1156828imm; Wed, 1 Aug 2018 11:07:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfMezMhl8bQHJGPGCsEsZaW/TooSEBqNmGrClwFtXMpU5xmlrK0fmQGdxXg1iWpT0SSIJVT X-Received: by 2002:a63:8f03:: with SMTP id n3-v6mr25799046pgd.166.1533146835170; Wed, 01 Aug 2018 11:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146835; cv=none; d=google.com; s=arc-20160816; b=zwrO71iUuivAdGiX2xd2+FmrJ0vbb69/07LSJRevmkjamyUEb/9ucI+ZK0s35s+Q3X 5yfjm2q3QlWp55G47Nz3yQXrtEgb3XaPh9eR4+iKKF206XJMfP0/AMhAES+awbMScrxu WogLnf4K6RvNvDVjHJpFTXqZyqf28boJzOD+/czykF4LGlslVQPB77MGs0d64kNQhf6K Ff4sx+YKzoMfN1DS/Yn+p6x+4Fh/WkETjDsR03Cpt+/tYYkyUCG7O+tQRl3HKx8iI30F 8zcCnVc41WmE3pqdXyP7wX+lZKTMlIULLRCUGxTfoufKXELTQyCgTCgM2MkKwnI9XBOb k7Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=IT4TwmWzP2Xm8w//DqWcKCFG0eKF387luTUxP3VpjlM=; b=nXxTLfcWQy+o+jdRqQmAcMh4fuEzmNeN8qDGqQLcA7gWNkUjLix/QznahZ9oWNP1Kh r1GrRVoFptQ7660CNx8F5j8ASdbNK7EWFT5zQp/As9tLk1uFsM+rodFm22TN04jFvOD0 G64oqkvjMQ8TlTNqufsys2UQmr58fOO1C2pw8FNYeBzn4nfMsJBBC7FJNOFCHdLdXB/k NFR4N5Vo56BhA+wGKh/XOVkeX63mV6UkQhBp1/+ze/mxqg4qUs19TSiWEbS5BBV6vEan WLH+s9fHcXMCWgX6epnMm3pBUNK55QCrFhNTrzuKx8V9Er7bCaeZnTlY1AJsg8UiHuhz HoLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si16159688pgd.306.2018.08.01.11.07.00; Wed, 01 Aug 2018 11:07:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732821AbeHATxI (ORCPT + 99 others); Wed, 1 Aug 2018 15:53:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50156 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405828AbeHATIh (ORCPT ); Wed, 1 Aug 2018 15:08:37 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 57CD0137D; Wed, 1 Aug 2018 17:14:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stewart Smith , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 049/246] hvc_opal: dont set tb_ticks_per_usec in udbg_init_opal_common() Date: Wed, 1 Aug 2018 18:49:19 +0200 Message-Id: <20180801165014.070184202@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stewart Smith [ Upstream commit 447808bf500a7cc92173266a59f8a494e132b122 ] time_init() will set up tb_ticks_per_usec based on reality. time_init() is called *after* udbg_init_opal_common() during boot. from arch/powerpc/kernel/time.c: unsigned long tb_ticks_per_usec = 100; /* sane default */ Currently, all powernv systems have a timebase frequency of 512mhz (512000000/1000000 == 0x200) - although there's nothing written down anywhere that I can find saying that we couldn't make that different based on the requirements in the ISA. So, we've been (accidentally) thwacking the (currently) correct (for powernv at least) value for tb_ticks_per_usec earlier than we otherwise would have. The "sane default" seems to be adequate for our purposes between udbg_init_opal_common() and time_init() being called, and if it isn't, then we should probably be setting it somewhere that isn't hvc_opal.c! Signed-off-by: Stewart Smith Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/tty/hvc/hvc_opal.c | 1 - 1 file changed, 1 deletion(-) --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c @@ -332,7 +332,6 @@ static void udbg_init_opal_common(void) udbg_putc = udbg_opal_putc; udbg_getc = udbg_opal_getc; udbg_getc_poll = udbg_opal_getc_poll; - tb_ticks_per_usec = 0x200; /* Make udelay not suck */ } void __init hvc_opal_init_early(void)