]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.60/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_opal_common.patch
Remove duplicated commits
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_opal_common.patch
CommitLineData
a65d4bac
GKH
1From foo@baz Sat Jul 28 10:25:26 CEST 2018
2From: Stewart Smith <stewart@linux.ibm.com>
3Date: Thu, 29 Mar 2018 17:02:46 +1100
4Subject: hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
5
6From: Stewart Smith <stewart@linux.ibm.com>
7
8[ Upstream commit 447808bf500a7cc92173266a59f8a494e132b122 ]
9
10time_init() will set up tb_ticks_per_usec based on reality.
11time_init() is called *after* udbg_init_opal_common() during boot.
12
13from arch/powerpc/kernel/time.c:
14 unsigned long tb_ticks_per_usec = 100; /* sane default */
15
16Currently, all powernv systems have a timebase frequency of 512mhz
17(512000000/1000000 == 0x200) - although there's nothing written
18down anywhere that I can find saying that we couldn't make that
19different based on the requirements in the ISA.
20
21So, we've been (accidentally) thwacking the (currently) correct
22(for powernv at least) value for tb_ticks_per_usec earlier than
23we otherwise would have.
24
25The "sane default" seems to be adequate for our purposes between
26udbg_init_opal_common() and time_init() being called, and if it isn't,
27then we should probably be setting it somewhere that isn't hvc_opal.c!
28
29Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
30Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
31Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
32Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33---
34 drivers/tty/hvc/hvc_opal.c | 1 -
35 1 file changed, 1 deletion(-)
36
37--- a/drivers/tty/hvc/hvc_opal.c
38+++ b/drivers/tty/hvc/hvc_opal.c
39@@ -332,7 +332,6 @@ static void udbg_init_opal_common(void)
40 udbg_putc = udbg_opal_putc;
41 udbg_getc = udbg_opal_getc;
42 udbg_getc_poll = udbg_opal_getc_poll;
43- tb_ticks_per_usec = 0x200; /* Make udelay not suck */
44 }
45
46 void __init hvc_opal_init_early(void)