Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-14 11:44:35 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-14 11:44:35 +0100
commit692e50442e95c813c0619077bcadc517021fec67 (patch)
tree7d0bef846e77b9df0e02bbd8b72ad9b4a83faf1c
parent8dceab134b0cba9e1283e36050d54f59971495c2 (diff)
hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
(bsc#1051510).
-rw-r--r--patches.fixes/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_op.patch50
-rw-r--r--series.conf1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches.fixes/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_op.patch b/patches.fixes/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_op.patch
new file mode 100644
index 0000000000..8004eb76c0
--- /dev/null
+++ b/patches.fixes/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_op.patch
@@ -0,0 +1,50 @@
+From 447808bf500a7cc92173266a59f8a494e132b122 Mon Sep 17 00:00:00 2001
+From: Stewart Smith <stewart@linux.ibm.com>
+Date: Thu, 29 Mar 2018 17:02:46 +1100
+Subject: [PATCH] hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
+Git-commit: 447808bf500a7cc92173266a59f8a494e132b122
+Patch-mainline: v4.18-rc1
+References: bsc#1051510
+
+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 <stewart@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/tty/hvc/hvc_opal.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
+index 2ed07ca6389e..9645c0062a90 100644
+--- a/drivers/tty/hvc/hvc_opal.c
++++ b/drivers/tty/hvc/hvc_opal.c
+@@ -318,7 +318,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)
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 85d3a2b249..e8f395c94d 100644
--- a/series.conf
+++ b/series.conf
@@ -16709,6 +16709,7 @@
patches.arch/powerpc-pkeys-Drop-private-VM_PKEY-definitions.patch
patches.arch/powerpc-64s-Fix-compiler-store-ordering-to-SLB-shado.patch
patches.fixes/4.4.139-043-powerpc-mm-hash-Add-missing-isync-prior-to-ke.patch
+ patches.fixes/hvc_opal-don-t-set-tb_ticks_per_usec-in-udbg_init_op.patch
patches.arch/powerpc-64s-Add-barrier_nospec.patch
patches.arch/powerpc-64s-Add-support-for-ori-barrier_nospec-patch.patch
patches.arch/powerpc-64s-Patch-barrier_nospec-in-modules.patch