Source-Changes-HG archive

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

[src/jmcneill-usbmp]: src/sys sync to latest -current.



details:   https://anonhg.NetBSD.org/src/rev/d000efe38821
branches:  jmcneill-usbmp
changeset: 771830:d000efe38821
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Mar 04 00:46:01 2012 +0000

description:
sync to latest -current.

diffstat:

 sys/arch/algor/algor/machdep.c                |      8 +-
 sys/arch/amd64/amd64/bios32.c                 |     12 +-
 sys/arch/amd64/amd64/locore.S                 |      7 +-
 sys/arch/amd64/amd64/machdep.c                |    112 +-
 sys/arch/amd64/conf/GENERIC                   |      7 +-
 sys/arch/amd64/conf/XEN3_DOM0                 |     12 +-
 sys/arch/amd64/conf/XEN3_DOMU                 |      6 +-
 sys/arch/evbmips/adm5120/machdep.c            |      5 +-
 sys/arch/evbmips/alchemy/machdep.c            |      5 +-
 sys/arch/evbmips/atheros/machdep.c            |      5 +-
 sys/arch/evbmips/conf/LOONGSON                |     39 +-
 sys/arch/evbmips/conf/files.loongson          |     29 +-
 sys/arch/evbmips/loongson/autoconf.c          |     17 +-
 sys/arch/evbmips/loongson/bonito_mainbus.c    |     30 +-
 sys/arch/evbmips/loongson/dev/glx.c           |     16 +-
 sys/arch/evbmips/loongson/loongson_bus_defs.h |      5 +-
 sys/arch/evbmips/loongson/loongson_bus_io.c   |     27 +-
 sys/arch/evbmips/loongson/machdep.c           |     57 +-
 sys/arch/evbmips/loongson/yeeloong_machdep.c  |    117 +-
 sys/arch/evbmips/malta/machdep.c              |      6 +-
 sys/arch/evbmips/rasoc/machdep.c              |     11 +-
 sys/arch/evbmips/rmixl/machdep.c              |      9 +-
 sys/arch/hp700/dev/cpu.c                      |      6 +-
 sys/arch/hp700/dev/cpudevs                    |      4 +-
 sys/arch/hp700/dev/cpudevs.h                  |      5 +-
 sys/arch/hp700/dev/cpudevs_data.h             |      5 +-
 sys/arch/hp700/hp700/intr.c                   |     12 +-
 sys/arch/hp700/hp700/machdep.c                |      6 +-
 sys/arch/hp700/include/pdc.h                  |      4 +-
 sys/arch/hp700/stand/mkboot/mkboot.c          |      4 +-
 sys/arch/hp700/stand/xxboot/iplsum.c          |     26 +-
 sys/arch/hp700/stand/xxboot/main.c            |     10 +-
 sys/arch/hp700/stand/xxboot/readufs.h         |     18 +-
 sys/arch/hp700/stand/xxboot/start.S           |      4 +-
 sys/arch/hppa/hppa/pmap.c                     |      6 +-
 sys/arch/hppa/hppa/trap.S                     |      4 +-
 sys/arch/i386/conf/ALL                        |      5 +-
 sys/arch/i386/conf/XEN3_DOM0                  |     10 +-
 sys/arch/i386/conf/XEN3_DOMU                  |      4 +-
 sys/arch/i386/conf/majors.i386                |      4 +-
 sys/arch/i386/i386/gdt.c                      |     11 +-
 sys/arch/i386/i386/locore.S                   |     34 +-
 sys/arch/i386/i386/machdep.c                  |    126 +-
 sys/arch/ia64/conf/majors.ia64                |      4 +-
 sys/arch/mips/include/intr.h                  |      4 +-
 sys/arch/mips/mips/mips_fpu.c                 |      5 +-
 sys/arch/mips/mips/mips_machdep.c             |     11 +-
 sys/arch/shark/ofw/ofw.c                      |      6 +-
 sys/arch/sparc64/conf/Makefile.sparc64        |      7 +-
 sys/arch/sparc64/conf/files.sparc64           |      5 +-
 sys/arch/sparc64/sparc64/locore.s             |      5 +-
 sys/arch/usermode/dev/cpu.c                   |     10 +-
 sys/arch/usermode/dev/ttycons.c               |      8 +-
 sys/arch/usermode/include/intr.h              |      4 +-
 sys/arch/usermode/include/thunk.h             |      4 +-
 sys/arch/usermode/usermode/pmap.c             |     14 +-
 sys/arch/usermode/usermode/thunk.c            |      9 +-
 sys/arch/usermode/usermode/trap.c             |     45 +-
 sys/arch/vax/include/cpu.h                    |     15 +-
 sys/arch/vax/vax/machdep.c                    |      5 +-
 sys/arch/x68k/x68k/pmap_bootstrap.c           |     18 +-
 sys/arch/x86/include/cpu.h                    |      3 +-
 sys/arch/x86/include/specialreg.h             |      4 +-
 sys/arch/x86/isa/isa_machdep.c                |     51 +-
 sys/arch/x86/pci/amdtemp.c                    |     11 +-
 sys/arch/x86/pci/pci_machdep.c                |     49 +-
 sys/arch/x86/x86/pmap.c                       |     90 +-
 sys/arch/xen/x86/cpu.c                        |     26 +-
 sys/arch/xen/x86/x86_xpmap.c                  |     59 +-
 sys/arch/xen/x86/xen_pmap.c                   |      8 +-
 sys/dev/acpi/acpi_cpu_cstate.c                |      9 +-
 sys/dev/ic/gcscpcib.c                         |     16 +-
 sys/dev/ic/ld_cac.c                           |      6 +-
 sys/dev/ic/rtl8169.c                          |      8 +-
 sys/dev/ic/rtl81x9reg.h                       |      3 +-
 sys/dev/pci/agp_amd64.c                       |      9 +-
 sys/dev/pci/files.pci                         |      7 +-
 sys/dev/pci/gcscaudio.c                       |     73 +-
 sys/dev/pci/hdaudio/hdaudio_ids.c             |      5 +-
 sys/dev/pci/lynxfb.c                          |    808 +
 sys/dev/pci/lynxfbreg.h                       |     74 +
 sys/dev/pci/lynxfbvar.h                       |     29 +
 sys/dev/pci/pcidevs                           |     41 +-
 sys/dev/pci/pcidevs.h                         |     43 +-
 sys/dev/pci/pcidevs_data.h                    |  12282 ++++++++++++-----------
 sys/dev/pci/radeonfb.c                        |    199 +-
 sys/dev/pci/radeonfbvar.h                     |      4 +-
 sys/dev/pci/sdhc_pci.c                        |     80 +-
 sys/dev/scsipi/cd.c                           |     10 +-
 sys/dev/scsipi/scsi_all.h                     |      4 +-
 sys/dev/scsipi/ss.c                           |    137 +-
 sys/dev/scsipi/ss_mustek.c                    |    100 +-
 sys/dev/scsipi/ss_scanjet.c                   |    128 +-
 sys/dev/scsipi/ssvar.h                        |      6 +-
 sys/dev/scsipi/st.c                           |    425 +-
 sys/dev/scsipi/st_atapi.c                     |     25 +-
 sys/dev/scsipi/st_scsi.c                      |     71 +-
 sys/dev/scsipi/stvar.h                        |     18 +-
 sys/dev/sdmmc/sdhc.c                          |    109 +-
 sys/dev/sdmmc/sdhcreg.h                       |      9 +-
 sys/dev/usb/if_urndis.c                       |      5 +-
 sys/dev/usb/umass.c                           |     28 +-
 sys/dev/usb/umass_isdata.c                    |      8 +-
 sys/dev/usb/umass_quirks.c                    |     13 +-
 sys/dev/usb/umass_scsipi.c                    |     13 +-
 sys/dev/usb/umassvar.h                        |      5 +-
 sys/dev/usb/usbdevs                           |      4 +-
 sys/dev/usb/usbdevs.h                         |      6 +-
 sys/dev/usb/usbdevs_data.h                    |     16 +-
 sys/fs/tmpfs/tmpfs_vnops.c                    |      8 +-
 sys/kern/kern_fork.c                          |     68 +-
 sys/kern/kern_mutex.c                         |      8 +-
 sys/kern/kern_rwlock.c                        |      8 +-
 sys/kern/kern_synch.c                         |      8 +-
 sys/lib/libsa/ls.c                            |      3 +-
 sys/sys/cdefs_elf.h                           |      6 +-
 sys/ufs/chfs/chfs_inode.h                     |      3 +-
 sys/ufs/chfs/chfs_malloc.c                    |     20 +-
 sys/ufs/chfs/chfs_pool.c                      |      9 +-
 sys/uvm/uvm_km.c                              |      8 +-
 sys/uvm/uvm_param.h                           |      4 +-
 121 files changed, 8834 insertions(+), 7485 deletions(-)

diffs (truncated from 25498 to 300 lines):

diff -r b8d01fd6aa11 -r d000efe38821 sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c    Sat Mar 03 02:29:34 2012 +0000
+++ b/sys/arch/algor/algor/machdep.c    Sun Mar 04 00:46:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.51 2011/07/09 16:03:00 matt Exp $        */
+/*     $NetBSD: machdep.c,v 1.51.6.1 2012/03/04 00:46:01 mrg Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51 2011/07/09 16:03:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51.6.1 2012/03/04 00:46:01 mrg Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h" 
@@ -149,13 +149,9 @@
 struct p6032_config p6032_configuration;
 #endif 
 
-/* Our exported CPU info; we can have only one. */
-struct cpu_info cpu_info_store;
-
 /* Maps for VM objects. */
 struct vm_map *phys_map = NULL;
 
-int    physmem;                /* # pages of physical memory */
 int    maxmem;                 /* max memory per process */
 
 int    mem_cluster_cnt;
diff -r b8d01fd6aa11 -r d000efe38821 sys/arch/amd64/amd64/bios32.c
--- a/sys/arch/amd64/amd64/bios32.c     Sat Mar 03 02:29:34 2012 +0000
+++ b/sys/arch/amd64/amd64/bios32.c     Sun Mar 04 00:46:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $       */
+/*     $NetBSD: bios32.c,v 1.19.16.1 2012/03/04 00:46:02 mrg Exp $     */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.19 2009/11/07 07:27:40 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bios32.c,v 1.19.16.1 2012/03/04 00:46:02 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -145,16 +145,16 @@
                if (sh->sig != BIOS32_MAKESIG('_', 'S', 'M', '_'))
                        continue;
                i = sh->len;
-               for (chksum = 0; i--; chksum += p[i])
-                       ;
+               for (chksum = 0; i--; )
+                       chksum += p[i];
                if (chksum != 0)
                        continue;
                p += 0x10;
                if (p[0] != '_' && p[1] != 'D' && p[2] != 'M' &&
                    p[3] != 'I' && p[4] != '_')
                        continue;
-               for (chksum = 0, i = 0xf; i--; chksum += p[i]);
-                       ;
+               for (chksum = 0, i = 0xf; i--; )
+                       chksum += p[i];
                if (chksum != 0)
                        continue;
 
diff -r b8d01fd6aa11 -r d000efe38821 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Sat Mar 03 02:29:34 2012 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Sun Mar 04 00:46:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.65.8.1 2012/02/18 07:31:09 mrg Exp $      */
+/*     $NetBSD: locore.S,v 1.65.8.2 2012/03/04 00:46:02 mrg Exp $      */
 
 /*
  * Copyright-o-rama!
@@ -778,6 +778,11 @@
        cpuid
        movl    %eax,_C_LABEL(cpuid_level)
 
+       movq    $cpu_info_primary, %rdi
+       movq    %rdi, CPU_INFO_SELF(%rdi) /* ci->ci_self = ci */
+       movq    $1, %rsi
+       call    cpu_init_msrs   /* cpu_init_msrs(ci, true); */
+
        call    xen_pmap_bootstrap
 
        /*
diff -r b8d01fd6aa11 -r d000efe38821 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Sat Mar 03 02:29:34 2012 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Sun Mar 04 00:46:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.171.2.2 2012/02/24 09:11:26 mrg Exp $    */
+/*     $NetBSD: machdep.c,v 1.171.2.3 2012/03/04 00:46:02 mrg 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.171.2.2 2012/02/24 09:11:26 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171.2.3 2012/03/04 00:46:02 mrg Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -309,6 +309,8 @@
 void   dodumpsys(void);
 void   dumpsys(void);
 
+extern int time_adjusted;      /* XXX no common header */
+
 void dump_misc_init(void);
 void dump_seg_prep(void);
 int dump_seg_iter(int (*)(paddr_t, paddr_t));
@@ -407,23 +409,53 @@
 void hypervisor_callback(void);
 void failsafe_callback(void);
 void x86_64_switch_context(struct pcb *);
+void x86_64_tls_switch(struct lwp *);
 
 void
 x86_64_switch_context(struct pcb *new)
 {
-       struct cpu_info *ci;
-       ci = curcpu();
        HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), new->pcb_rsp0);
        struct physdev_op physop;
        physop.cmd = PHYSDEVOP_SET_IOPL;
        physop.u.set_iopl.iopl = new->pcb_iopl;
        HYPERVISOR_physdev_op(&physop);
-       if (new->pcb_fpcpu != ci) {
+}
+
+void
+x86_64_tls_switch(struct lwp *l)
+{
+       struct cpu_info *ci = curcpu();
+       struct pcb *pcb = lwp_getpcb(l);
+       struct trapframe *tf = l->l_md.md_regs;
+
+       /*
+        * Raise the IPL to IPL_HIGH.
+        * FPU IPIs can alter the LWP's saved cr0.  Dropping the priority
+        * is deferred until mi_switch(), when cpu_switchto() returns.
+        */
+       (void)splhigh();
+       /*
+        * If our floating point registers are on a different CPU,
+        * set CR0_TS so we'll trap rather than reuse bogus state.
+        */
+       if (l != ci->ci_fpcurlwp) {
                HYPERVISOR_fpu_taskswitch(1);
        }
+
+       /* Update TLS segment pointers */
+       if (pcb->pcb_flags & PCB_COMPAT32) {
+               update_descriptor(&curcpu()->ci_gdt[GUFS_SEL], &pcb->pcb_fs);
+               update_descriptor(&curcpu()->ci_gdt[GUGS_SEL], &pcb->pcb_gs);
+               setfs(tf->tf_fs);
+               HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, tf->tf_gs);
+       } else {
+               setfs(0);
+               HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, 0);
+               HYPERVISOR_set_segment_base(SEGBASE_FS, pcb->pcb_fs);
+               HYPERVISOR_set_segment_base(SEGBASE_GS_USER, pcb->pcb_gs);
+       }
 }
-
-#endif
+#endif /* XEN */
 
 /*
  * Set up proc0's TSS and LDT.
@@ -681,12 +713,12 @@
                l->l_sigstk.ss_flags |= SS_ONSTACK;
 }
 
-int    waittime = -1;
 struct pcb dumppcb;
 
 void
 cpu_reboot(int howto, char *bootstr)
 {
+       static bool syncdone = false;
        int s = IPL_NONE;
 
        if (cold) {
@@ -695,15 +727,37 @@
        }
 
        boothowto = howto;
-       if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
-               waittime = 0;
-               vfs_shutdown();
-               /*
-                * If we've been adjusting the clock, the todr
-                * will be out of synch; adjust it now.
-                */
-               resettodr();
-       }
+
+       /* i386 maybe_dump() */
+
+       /*
+        * If we've panic'd, don't make the situation potentially
+        * worse by syncing or unmounting the file systems.
+        */
+       if ((howto & RB_NOSYNC) == 0 && panicstr == NULL) {
+               if (!syncdone) {
+                       syncdone = true;
+                       /* XXX used to force unmount as well, here */
+                       vfs_sync_all(curlwp);
+                       /*
+                        * If we've been adjusting the clock, the todr
+                        * will be out of synch; adjust it now.
+                        *
+                        * XXX used to do this after unmounting all
+                        * filesystems with vfs_shutdown().
+                        */
+                       if (time_adjusted != 0)
+                               resettodr();
+               }
+
+               while (vfs_unmountall1(curlwp, false, false) ||
+                      config_detach_all(boothowto) ||
+                      vfs_unmount_forceone(curlwp))
+                       ;       /* do nothing */
+       } else
+               suspendsched();
+
+       pmf_system_shutdown(boothowto);
 
        /* Disable interrupts. */
        s = splhigh();
@@ -715,8 +769,6 @@
 haltsys:
        doshutdownhooks();
 
-       pmf_system_shutdown(boothowto);
-
         if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
 #ifndef XEN
 #if NACPICA > 0
@@ -2257,28 +2309,6 @@
        }
 }
 
-#ifdef XEN
-void x86_64_tls_switch(struct lwp *);
-
-void
-x86_64_tls_switch(struct lwp *l)
-{
-       struct pcb *pcb = lwp_getpcb(l);
-       struct trapframe *tf = l->l_md.md_regs;
-
-       if (pcb->pcb_flags & PCB_COMPAT32) {
-               update_descriptor(&curcpu()->ci_gdt[GUFS_SEL], &pcb->pcb_fs);
-               update_descriptor(&curcpu()->ci_gdt[GUGS_SEL], &pcb->pcb_gs);
-               setfs(tf->tf_fs);
-               HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, tf->tf_gs);
-       } else {
-               setfs(0);
-               HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, 0);
-               HYPERVISOR_set_segment_base(SEGBASE_FS, pcb->pcb_fs);
-               HYPERVISOR_set_segment_base(SEGBASE_GS_USER, pcb->pcb_gs);
-       }
-}
-#endif
 
 #ifdef __HAVE_DIRECT_MAP
 bool
diff -r b8d01fd6aa11 -r d000efe38821 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Sat Mar 03 02:29:34 2012 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Sun Mar 04 00:46:01 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.340.2.1 2012/02/18 07:31:10 mrg Exp $
+# $NetBSD: GENERIC,v 1.340.2.2 2012/03/04 00:46:03 mrg Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.340.2.1 $"
+#ident                 "GENERIC-$Revision: 1.340.2.2 $"
 
 maxusers       64              # estimated number of users
 
@@ -98,6 +98,7 @@
 #
 makeoptions    COPTS="-O2 -fno-omit-frame-pointer"
 options        DDB             # in-kernel debugger
+#options       DDB_COMMANDONENTER="bt" # execute command when ddb is entered



Home | Main Index | Thread Index | Old Index