aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <drake@endlessm.com>2019-01-06 22:40:24 -0500
committerThomas Gleixner <tglx@linutronix.de>2019-01-11 15:35:47 -0500
commit7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 (patch)
treedca32d695a149db5446078bf3d5d7680e63419f9
parent5962dd22f0ff6f7d72fff974b3c637d52586643e (diff)
x86/kaslr: Fix incorrect i8254 outb() parameters
The outb() function takes parameters value and port, in that order. Fix the parameters used in the kalsr i8254 fallback code. Fixes: 5bfce5ef55cb ("x86, kaslr: Provide randomness functions") Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: bp@alien8.de Cc: hpa@zytor.com Cc: linux@endlessm.com Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20190107034024.15005-1-drake@endlessm.com
-rw-r--r--arch/x86/lib/kaslr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index 79778ab200e4..a53665116458 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -36,8 +36,8 @@ static inline u16 i8254(void)
36 u16 status, timer; 36 u16 status, timer;
37 37
38 do { 38 do {
39 outb(I8254_PORT_CONTROL, 39 outb(I8254_CMD_READBACK | I8254_SELECT_COUNTER0,
40 I8254_CMD_READBACK | I8254_SELECT_COUNTER0); 40 I8254_PORT_CONTROL);
41 status = inb(I8254_PORT_COUNTER0); 41 status = inb(I8254_PORT_COUNTER0);
42 timer = inb(I8254_PORT_COUNTER0); 42 timer = inb(I8254_PORT_COUNTER0);
43 timer |= inb(I8254_PORT_COUNTER0) << 8; 43 timer |= inb(I8254_PORT_COUNTER0) << 8;