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 -current



details:   https://anonhg.NetBSD.org/src/rev/4aa4c29ef347
branches:  jmcneill-usbmp
changeset: 771834:4aa4c29ef347
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Mar 06 18:26:34 2012 +0000

description:
sync to -current

diffstat:

 sys/arch/algor/algor/machdep.c                |      8 +-
 sys/arch/amd64/amd64/machdep.c                |    112 +-
 sys/arch/amd64/conf/GENERIC                   |      7 +-
 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           |     19 +-
 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/hp700/intr.c                   |     12 +-
 sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c   |     20 +-
 sys/arch/hppa/hppa/pmap.c                     |      6 +-
 sys/arch/i386/conf/ALL                        |      5 +-
 sys/arch/i386/i386/locore.S                   |     18 +-
 sys/arch/i386/i386/machdep.c                  |     82 +-
 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/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/xen/x86/x86_xpmap.c                  |     20 +-
 sys/arch/xen/x86/xen_pmap.c                   |      7 +-
 sys/arch/xen/xen/xpci_xenbus.c                |      6 +-
 sys/compat/netbsd32/netbsd32.h                |     15 +-
 sys/compat/netbsd32/netbsd32_fs.c             |     42 +-
 sys/dev/ic/gcscpcib.c                         |     16 +-
 sys/dev/ic/rtl8169.c                          |      8 +-
 sys/dev/ic/rtl81x9reg.h                       |      3 +-
 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/piixide.c                         |     28 +-
 sys/dev/pci/radeonfb.c                        |    199 +-
 sys/dev/pci/radeonfbvar.h                     |      4 +-
 sys/dev/pci/sdhc_pci.c                        |     80 +-
 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                           |    423 +-
 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_aue.c                          |      5 +-
 sys/dev/usb/if_axe.c                          |      6 +-
 sys/dev/usb/if_udav.c                         |      5 +-
 sys/dev/usb/if_urndis.c                       |      5 +-
 sys/dev/usb/ohci.c                            |      6 +-
 sys/dev/usb/ohcivar.h                         |      3 +-
 sys/dev/usb/uhci.c                            |      5 +-
 sys/dev/usb/uhcivar.h                         |      5 +-
 sys/dev/usb/uhid.c                            |      6 +-
 sys/dev/usb/uhub.c                            |      6 +-
 sys/dev/usb/ulpt.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/usb.h                             |      4 +-
 sys/dev/usb/usbdevs                           |      4 +-
 sys/dev/usb/usbdevs.h                         |      6 +-
 sys/dev/usb/usbdevs_data.h                    |     16 +-
 sys/dev/usb/usbdi.c                           |      9 +-
 sys/dev/usb/usbdi_util.c                      |      6 +-
 sys/dev/usb/usbdivar.h                        |      3 +-
 sys/fs/tmpfs/tmpfs_vnops.c                    |      8 +-
 sys/kern/kern_fork.c                          |     68 +-
 sys/kern/kern_synch.c                         |      8 +-
 sys/kern/subr_vmem.c                          |     12 +-
 sys/lib/libsa/ls.c                            |      3 +-
 sys/rump/librump/rumpkern/vm.c                |      6 +-
 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 +-
 109 files changed, 8711 insertions(+), 7346 deletions(-)

diffs (truncated from 24775 to 300 lines):

diff -r 9b380140fc11 -r 4aa4c29ef347 sys/arch/algor/algor/machdep.c
--- a/sys/arch/algor/algor/machdep.c    Tue Mar 06 09:56:03 2012 +0000
+++ b/sys/arch/algor/algor/machdep.c    Tue Mar 06 18:26:34 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.51.6.2 2012/03/06 09:56:03 mrg Exp $     */
+/*     $NetBSD: machdep.c,v 1.51.6.3 2012/03/06 18:26:34 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.6.2 2012/03/06 09:56:03 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51.6.3 2012/03/06 18:26:34 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 9b380140fc11 -r 4aa4c29ef347 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Tue Mar 06 09:56:03 2012 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Tue Mar 06 18:26:34 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.171.2.4 2012/03/06 09:56:04 mrg Exp $    */
+/*     $NetBSD: machdep.c,v 1.171.2.5 2012/03/06 18:26:34 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.4 2012/03/06 09:56:04 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171.2.5 2012/03/06 18:26:34 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 9b380140fc11 -r 4aa4c29ef347 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Tue Mar 06 09:56:03 2012 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Tue Mar 06 18:26:34 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.340.2.3 2012/03/06 09:56:05 mrg Exp $
+# $NetBSD: GENERIC,v 1.340.2.4 2012/03/06 18:26:34 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.3 $"
+#ident                 "GENERIC-$Revision: 1.340.2.4 $"
 
 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
 #options       DDB_ONPANIC=1   # see also sysctl(8): `ddb.onpanic'
 options        DDB_HISTORY_SIZE=512    # enable history editing in DDB
 #options       KGDB            # remote debugger
@@ -337,7 +338,7 @@
 #amdpcib* at pci? dev ? function ?     # AMD 8111 PCI-ISA w/ HPET
 #hpet* at amdpcib?
 
-#pwdog*        at pci? dev ? function ?        # QUANCOM PWDOG1
+pwdog* at pci? dev ? function ?        # QUANCOM PWDOG1
 
 ichlpcib* at pci? dev ? function ?     # Intel ICH PCI-LPC w/ timecounter,
                                        # watchdog and Speedstep and HPET
diff -r 9b380140fc11 -r 4aa4c29ef347 sys/arch/evbmips/adm5120/machdep.c
--- a/sys/arch/evbmips/adm5120/machdep.c        Tue Mar 06 09:56:03 2012 +0000
+++ b/sys/arch/evbmips/adm5120/machdep.c        Tue Mar 06 18:26:34 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.21.6.2 2012/03/06 09:56:05 mrg Exp $ */
+/* $NetBSD: machdep.c,v 1.21.6.3 2012/03/06 18:26:35 mrg Exp $ */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21.6.2 2012/03/06 09:56:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21.6.3 2012/03/06 18:26:35 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -126,7 +126,6 @@
 /* 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 9b380140fc11 -r 4aa4c29ef347 sys/arch/evbmips/alchemy/machdep.c
--- a/sys/arch/evbmips/alchemy/machdep.c        Tue Mar 06 09:56:03 2012 +0000
+++ b/sys/arch/evbmips/alchemy/machdep.c        Tue Mar 06 18:26:34 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.51.6.2 2012/03/06 09:56:05 mrg Exp $ */
+/* $NetBSD: machdep.c,v 1.51.6.3 2012/03/06 18:26:35 mrg Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51.6.2 2012/03/06 09:56:05 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51.6.3 2012/03/06 18:26:35 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -130,7 +130,6 @@
 /* Maps for VM objects. */
 struct vm_map *phys_map = NULL;
 



Home | Main Index | Thread Index | Old Index