Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Instead of setting the TPR to the value tha...



details:   https://anonhg.NetBSD.org/src/rev/3fae2fa7f61b
branches:  trunk
changeset: 348330:3fae2fa7f61b
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Oct 15 09:50:27 2016 +0000

description:
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.

diffstat:

 sys/arch/x86/x86/lapic.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r 7b37e6b82d05 -r 3fae2fa7f61b sys/arch/x86/x86/lapic.c
--- a/sys/arch/x86/x86/lapic.c  Sat Oct 15 09:09:55 2016 +0000
+++ b/sys/arch/x86/x86/lapic.c  Sat Oct 15 09:50:27 2016 +0000
@@ -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 @@
 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 @@
        }
 
        x86_disable_intr();
-       s = lapic_tpr;
 
        /*
         * Map local apic.  If we have a local apic, it's safe to assume
@@ -132,7 +130,7 @@
        cpu_init_first();       /* catch up to changed cpu_number() */
 #endif
 
-       lapic_tpr = s;
+       i82489_writereg(LAPIC_TPRI, 0);
        x86_enable_intr();
 }
 



Home | Main Index | Thread Index | Old Index