Module Name:    src
Committed By:   maxv
Date:           Sat Oct 15 09:50:27 UTC 2016

Modified Files:
        src/sys/arch/x86/x86: lapic.c

Log Message:
Instead of setting the TPR to the value that was in the data segment, set
zero directly. On amd64, the data version of lapic_tpr is not explicitly
initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/x86/x86/lapic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/lapic.c
diff -u src/sys/arch/x86/x86/lapic.c:1.52 src/sys/arch/x86/x86/lapic.c:1.53
--- src/sys/arch/x86/x86/lapic.c:1.52	Mon Jul 25 12:11:40 2016
+++ src/sys/arch/x86/x86/lapic.c	Sat Oct 15 09:50:27 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: lapic.c,v 1.52 2016/07/25 12:11:40 maxv Exp $	*/
+/*	$NetBSD: lapic.c,v 1.53 2016/10/15 09:50:27 maxv Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.52 2016/07/25 12:11:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.53 2016/10/15 09:50:27 maxv Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -92,7 +92,6 @@ struct pic local_pic = {
 static void
 lapic_map(paddr_t lapic_base)
 {
-	int s;
 	pt_entry_t *pte;
 	vaddr_t va = (vaddr_t)&local_apic;
 
@@ -113,7 +112,6 @@ lapic_map(paddr_t lapic_base)
 	}
 
 	x86_disable_intr();
-	s = lapic_tpr;
 
 	/*
 	 * Map local apic.  If we have a local apic, it's safe to assume
@@ -132,7 +130,7 @@ lapic_map(paddr_t lapic_base)
 	cpu_init_first();	/* catch up to changed cpu_number() */
 #endif
 
-	lapic_tpr = s;
+	i82489_writereg(LAPIC_TPRI, 0);
 	x86_enable_intr();
 }
 

Reply via email to