Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amd64/amd64 remove unused variable, and move variab...



details:   https://anonhg.NetBSD.org/src/rev/c9ec7ea695c2
branches:  trunk
changeset: 790566:c9ec7ea695c2
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 17 20:57:58 2013 +0000

description:
remove unused variable, and move variable used only by XEN in the XEN ifdef.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r bbab2b8f93d5 -r c9ec7ea695c2 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Thu Oct 17 20:57:06 2013 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Thu Oct 17 20:57:58 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.195 2013/06/05 14:37:04 christos Exp $   */
+/*     $NetBSD: machdep.c,v 1.196 2013/10/17 20:57:58 christos Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.195 2013/06/05 14:37:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196 2013/10/17 20:57:58 christos Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1051,7 +1051,6 @@
 int
 cpu_dump(void)
 {
-       int (*dump)(dev_t, daddr_t, void *, size_t);
        kcore_seg_t seg;
        cpu_kcore_hdr_t cpuhdr;
        const struct bdevsw *bdev;
@@ -1060,8 +1059,6 @@
        if (bdev == NULL)
                return (ENXIO);
 
-       dump = bdev->d_dump;
-
        /*
         * Generate a segment header.
         */
@@ -1567,7 +1564,6 @@
        extern void consinit(void);
        struct region_descriptor region;
        struct mem_segment_descriptor *ldt_segp;
-       struct pcb *pcb;
        int x;
 #ifndef XEN
        int ist;
@@ -1588,11 +1584,11 @@
 
        cpu_init_msrs(&cpu_info_primary, true);
 
-       pcb = lwp_getpcb(&lwp0);
 
        use_pae = 1; /* PAE always enabled in long mode */
 
 #ifdef XEN
+       struct pcb *pcb = lwp_getpcb(&lwp0);
        mutex_init(&pte_lock, MUTEX_DEFAULT, IPL_VM);
        pcb->pcb_cr3 = xen_start_info.pt_base - KERNBASE;
        __PRINTK(("pcb_cr3 0x%lx\n", xen_start_info.pt_base - KERNBASE));



Home | Main Index | Thread Index | Old Index