Date: Sun, 14 Jan 2007 16:49:59 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 112906 for review Message-ID: <200701141649.l0EGnxce031818@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112906 Change 112906 by rdivacky@rdivacky_witten on 2007/01/14 16:49:54 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/identcpu.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/mp_machdep.c#4 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#4 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/setjmp.h#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/specialreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#20 integrate .. //depot/projects/linuxolator/src/sys/boot/common/pnp.c#2 integrate .. //depot/projects/linuxolator/src/sys/boot/common/pnpdata#2 delete .. //depot/projects/linuxolator/src/sys/boot/forth/loader.conf#4 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#20 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.h#8 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#9 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_mib.c#8 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#52 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#11 integrate .. //depot/projects/linuxolator/src/sys/conf/NOTES#15 integrate .. //depot/projects/linuxolator/src/sys/conf/options#13 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_cpu.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_package.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_perf.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_throttle.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpivar.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bcereg.h#6 integrate .. //depot/projects/linuxolator/src/sys/dev/bge/if_bgereg.h#8 integrate .. //depot/projects/linuxolator/src/sys/dev/cy/cy_isa.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/fb/boot_font.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/fb/creatorreg.h#1 branch .. //depot/projects/linuxolator/src/sys/dev/fb/gallant12x22.c#1 branch .. //depot/projects/linuxolator/src/sys/dev/fb/gfb.c#2 delete .. //depot/projects/linuxolator/src/sys/dev/fb/gfb.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/gfb/gfb_pci.c#2 delete .. //depot/projects/linuxolator/src/sys/dev/gfb/gfb_pci.h#2 delete .. //depot/projects/linuxolator/src/sys/dev/ichsmb/ichsmb.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/ichsmb/ichsmb_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/idt/idtreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/acphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/acphyreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/amphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/exphy.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/inphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/lxtphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/mii_physubr.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/miivar.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/nsphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/rlphy.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mii/ruephy.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/msk/if_msk.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci.c#13 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_pci.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcib_private.h#4 integrate .. //depot/projects/linuxolator/src/sys/dev/re/if_re.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/sound/pci/hda/hdac.c#11 integrate .. //depot/projects/linuxolator/src/sys/dev/syscons/scvesactl.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/if_aue.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/if_auereg.h#5 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usb_ethersubr.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usb_ethersubr.h#3 integrate .. //depot/projects/linuxolator/src/sys/fs/udf/udf_vfsops.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/identcpu.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/machdep.c#10 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/mp_machdep.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/nexus.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/include/setjmp.h#2 integrate .. //depot/projects/linuxolator/src/sys/i386/include/specialreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#15 integrate .. //depot/projects/linuxolator/src/sys/ia64/include/exec.h#2 integrate .. //depot/projects/linuxolator/src/sys/ia64/include/floatingpoint.h#2 integrate .. //depot/projects/linuxolator/src/sys/ia64/include/reloc.h#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_acct.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_acl.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_ntptime.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_prot.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_turnstile.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/tty_pts.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_socket.c#8 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_usrreq.c#4 integrate .. //depot/projects/linuxolator/src/sys/modules/sound/driver/emu10kx/Makefile#3 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_freebsd.c#2 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_freebsd.h#2 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_input.c#4 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_node.c#3 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_proto.c#3 integrate .. //depot/projects/linuxolator/src/sys/net80211/ieee80211_proto.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/COPYRIGHT#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/aarp.c#3 integrate .. //depot/projects/linuxolator/src/sys/netatalk/aarp.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/at.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/at_extern.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/at_proto.c#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/at_rmx.c#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/at_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_input.c#3 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_output.c#3 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_pcb.c#3 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_pcb.h#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_usrreq.c#2 integrate .. //depot/projects/linuxolator/src/sys/netatalk/ddp_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/netgraph/ng_deflate.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip.h#2 integrate .. //depot/projects/linuxolator/src/sys/netinet/ip_fw2.c#11 integrate .. //depot/projects/linuxolator/src/sys/netinet6/esp_aesctr.c#2 integrate .. //depot/projects/linuxolator/src/sys/netinet6/in6_cksum.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_cksum.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_if.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_input.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_ip.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_ip.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_outputfl.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_pcb.c#3 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_pcb.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_proto.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_usrreq.c#3 integrate .. //depot/projects/linuxolator/src/sys/netipx/ipx_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx_debug.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx_debug.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx_timer.h#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx_usrreq.c#2 integrate .. //depot/projects/linuxolator/src/sys/netipx/spx_var.h#2 integrate .. //depot/projects/linuxolator/src/sys/netnatm/natm.c#2 integrate .. //depot/projects/linuxolator/src/sys/netnatm/natm.h#2 integrate .. //depot/projects/linuxolator/src/sys/netnatm/natm_pcb.c#2 integrate .. //depot/projects/linuxolator/src/sys/netnatm/natm_proto.c#2 integrate .. //depot/projects/linuxolator/src/sys/pci/alpm.c#3 integrate .. //depot/projects/linuxolator/src/sys/pci/amdpm.c#3 integrate .. //depot/projects/linuxolator/src/sys/pci/amdsmb.c#3 integrate .. //depot/projects/linuxolator/src/sys/pci/if_pcn.c#4 integrate .. //depot/projects/linuxolator/src/sys/pci/intpm.c#3 integrate .. //depot/projects/linuxolator/src/sys/pci/intpmreg.h#3 integrate .. //depot/projects/linuxolator/src/sys/pci/nfsmb.c#4 integrate .. //depot/projects/linuxolator/src/sys/pci/viapm.c#3 integrate .. //depot/projects/linuxolator/src/sys/powerpc/conf/NOTES#3 integrate .. //depot/projects/linuxolator/src/sys/powerpc/include/reloc.h#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/include/ofw_nexus.h#1 branch .. //depot/projects/linuxolator/src/sys/sparc64/include/reloc.h#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/include/setjmp.h#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/pci/ofw_pcibus.c#3 integrate .. //depot/projects/linuxolator/src/sys/sparc64/pci/psycho.c#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/pci/psychoreg.h#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/reloc.h#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/setjmp.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/copyright.h#4 integrate .. //depot/projects/linuxolator/src/sys/sys/priority.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/rtprio.h#5 integrate .. //depot/projects/linuxolator/src/sys/ufs/ufs/ufs_acl.c#2 integrate .. //depot/projects/linuxolator/src/sys/vm/uma_core.c#4 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/identcpu.c#2 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.148 2006/08/01 01:23:39 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.149 2007/01/09 19:23:21 jkim Exp $"); #include "opt_cpu.h" @@ -228,8 +228,8 @@ "\007<b6>" "\010EST" /* Enhanced SpeedStep */ "\011TM2" /* Thermal Monitor 2 */ - "\012<b9>" - "\013CNTX-ID" /* L1 context ID available */ + "\012SSSE3" /* SSSE3 */ + "\013CNXT-ID" /* L1 context ID available */ "\014<b11>" "\015<b12>" "\016CX16" /* CMPXCHG16B Instruction */ ==== //depot/projects/linuxolator/src/sys/amd64/amd64/mp_machdep.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.278 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.279 2007/01/11 00:17:02 jeff Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -948,11 +948,10 @@ ipi_bitmap = atomic_readandclear_int(&cpu_ipi_pending[cpu]); -#ifdef IPI_PREEMPTION - if (ipi_bitmap & IPI_PREEMPT) { + if (ipi_bitmap & (1 << IPI_PREEMPT)) { mtx_lock_spin(&sched_lock); /* Don't preempt the idle thread */ - if (curthread->td_priority < PRI_MIN_IDLE) { + if (curthread != PCPU_GET(idlethread)) { struct thread *running_thread = curthread; if (running_thread->td_critnest > 1) running_thread->td_owepreempt = 1; @@ -961,7 +960,6 @@ } mtx_unlock_spin(&sched_lock); } -#endif /* Nothing to do for AST */ } ==== //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.71 2007/01/11 19:40:19 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -371,24 +371,9 @@ * If this is a memory resource, map it into the kernel. */ if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { - caddr_t vaddr = 0; + void *vaddr; - if (rman_get_end(r) < 1024 * 1024) { - /* - * The first 1Mb is mapped at KERNBASE. - */ - vaddr = (caddr_t)(uintptr_t)(KERNBASE + rman_get_start(r)); - } else { - u_int64_t paddr; - u_int64_t psize; - u_int32_t poffs; - - paddr = rman_get_start(r); - psize = rman_get_size(r); - - poffs = paddr - trunc_page(paddr); - vaddr = (caddr_t) pmap_mapdev(paddr-poffs, psize+poffs) + poffs; - } + vaddr = pmap_mapdev(rman_get_start(r), rman_get_size(r)); rman_set_virtual(r, vaddr); rman_set_bushandle(r, (bus_space_handle_t) vaddr); } @@ -402,12 +387,9 @@ /* * If this is a memory resource, unmap it. */ - if ((rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) && - (rman_get_end(r) >= 1024 * 1024)) { - u_int32_t psize; - - psize = rman_get_size(r); - pmap_unmapdev((vm_offset_t)rman_get_virtual(r), psize); + if (rman_get_bustag(r) == AMD64_BUS_SPACE_MEM) { + pmap_unmapdev((vm_offset_t)rman_get_virtual(r), + rman_get_size(r)); } return (rman_deactivate_resource(r)); ==== //depot/projects/linuxolator/src/sys/amd64/include/setjmp.h#2 (text+ko) ==== @@ -10,10 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by John Birrell. - * 4. Neither the name of the author nor the names of any co-contributors + * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -29,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/setjmp.h,v 1.9 2003/06/02 21:49:35 peter Exp $ + * $FreeBSD: src/sys/amd64/include/setjmp.h,v 1.10 2007/01/12 07:24:06 imp Exp $ */ #ifndef _MACHINE_SETJMP_H_ ==== //depot/projects/linuxolator/src/sys/amd64/include/specialreg.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.35 2006/07/13 16:09:40 jkim Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.36 2007/01/09 19:23:21 jkim Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -118,7 +118,8 @@ #define CPUID2_VMX 0x00000020 #define CPUID2_EST 0x00000080 #define CPUID2_TM2 0x00000100 -#define CPUID2_CNTXID 0x00000400 +#define CPUID2_SSSE3 0x00000200 +#define CPUID2_CNXTID 0x00000400 #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#20 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.24 2007/01/06 15:58:34 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.26 2007/01/14 16:20:37 netchild Exp $"); #include <sys/param.h> #include <sys/kernel.h> ==== //depot/projects/linuxolator/src/sys/boot/common/pnp.c#2 (text+ko) ==== @@ -4,7 +4,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/common/pnp.c,v 1.16 2003/08/25 23:30:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/pnp.c,v 1.17 2007/01/07 22:25:45 marius Exp $"); /* * "Plug and Play" functionality. @@ -82,52 +82,6 @@ return(CMD_OK); } -#if 0 -/* - * Try to load outstanding modules (eg. after disk change) - */ -COMMAND_SET(pnpload, "pnpload", "load modules for PnP devices", pnp_load); - -static int -pnp_load(int argc, char *argv[]) -{ - struct pnpinfo *pi; - char *modfname; - - /* find anything? */ - if (STAILQ_FIRST(&pnp_devices) != NULL) { - - /* check for kernel, assign modules handled by static drivers there */ - if (pnp_scankernel()) { - command_errmsg = "cannot load drivers until kernel loaded"; - return(CMD_ERROR); - } - if (fname == NULL) { - /* default paths */ - pnp_readconf("/boot/pnpdata.local"); - pnp_readconf("/boot/pnpdata"); - } else { - if (pnp_readconf(fname)) { - sprintf(command_errbuf, "can't read PnP information from '%s'", fname); - return(CMD_ERROR); - } - } - - /* try to load any modules that have been nominated */ - STAILQ_FOREACH(pi, &pnp_devices, pi_link) { - /* Already loaded? */ - if ((pi->pi_module != NULL) && (file_findfile(pi->pi_module, NULL) == NULL)) { - modfname = malloc(strlen(pi->pi_module) + 4); - sprintf(modfname, "%s.ko", pi->pi_module); /* XXX implicit knowledge of KLD module filenames */ - if (mod_load(pi->pi_module, pi->pi_argc, pi->pi_argv)) - printf("Could not load module '%s' for device '%s'\n", modfname, STAILQ_FIRST(&pi->pi_ident)->id_ident); - free(modfname); - } - } - } - return(CMD_OK); -} -#endif /* * Throw away anything we think we know about PnP devices. */ @@ -142,159 +96,7 @@ pnp_freeinfo(pi); } } -#if 0 -/* - * The PnP configuration database consists of a flat text file with - * entries one per line. Valid lines are: - * - * # <text> - * - * This line is a comment, and ignored. - * - * [<name>] - * - * Entries following this line are for devices connected to the - * bus <name>, At least one such entry must be encountered - * before identifiers are recognised. - * - * ident=<identifier> rev=<revision> module=<module> args=<arguments> - * - * This line describes an identifier:module mapping. The 'ident' - * and 'module' fields are required; the 'rev' field is currently - * ignored (but should be used), and the 'args' field must come - * last. - * - * Comments may be appended to lines; any character including or following - * '#' on a line is ignored. - */ -static int -pnp_readconf(char *path) -{ - struct pnpinfo *pi; - struct pnpident *id; - int fd, line; - char lbuf[128], *currbus, *ident, *revision, *module, *args; - char *cp, *ep, *tp, c; - - /* try to open the file */ - if ((fd = open(path, O_RDONLY)) >= 0) { - line = 0; - currbus = NULL; - - while (fgetstr(lbuf, sizeof(lbuf), fd) > 0) { - line++; - /* Find the first non-space character on the line */ - for (cp = lbuf; (*cp != 0) && !isspace(*cp); cp++) - ; - - /* keep/discard? */ - if ((*cp == 0) || (*cp == '#')) - continue; - - /* cut trailing comment? */ - if ((ep = strchr(cp, '#')) != NULL) - *ep = 0; - - /* bus declaration? */ - if (*cp == '[') { - if (((ep = strchr(cp, ']')) == NULL) || ((ep - cp) < 2)) { - printf("%s line %d: bad bus specification\n", path, line); - } else { - if (currbus != NULL) - free(currbus); - *ep = 0; - currbus = strdup(cp + 1); - } - continue; - } - - /* XXX should we complain? */ - if (currbus == NULL) - continue; - - /* mapping */ - for (ident = module = args = revision = NULL; *cp != 0;) { - - /* discard leading whitespace */ - if (isspace(*cp)) { - cp++; - continue; - } - - /* scan for terminator, separator */ - for (ep = cp; (*ep != 0) && (*ep != '=') && !isspace(*ep); ep++) - ; - - if (*ep == '=') { - *ep = 0; - for (tp = ep + 1; (*tp != 0) && !isspace(*tp); tp++) - ; - c = *tp; - *tp = 0; - if ((ident == NULL) && !strcmp(cp, "ident")) { - ident = ep + 1; - } else if ((revision == NULL) && !strcmp(cp, "revision")) { - revision = ep + 1; - } else if ((args == NULL) && !strcmp(cp, "args")) { - *tp = c; - while (*tp != 0) /* skip to end of string */ - tp++; - args = ep + 1; - } else { - /* XXX complain? */ - } - cp = tp; - continue; - } - - /* it's garbage or a keyword - ignore it for now */ - cp = ep; - } - - /* we must have at least ident and module set to be interesting */ - if ((ident == NULL) || (module == NULL)) - continue; - - /* - * Loop looking for module/bus that might match this, but aren't already - * assigned. - * XXX no revision parse/test here yet. - */ - STAILQ_FOREACH(pi, &pnp_devices, pi_link) { - - /* no driver assigned, bus matches OK */ - if ((pi->pi_module == NULL) && - !strcmp(pi->pi_handler->pp_name, currbus)) { - - /* scan idents, take first match */ - STAILQ_FOREACH(id, &pi->pi_ident, id_link) - if (!strcmp(id->id_ident, ident)) - break; - - /* find a match? */ - if (id != NULL) { - if (args != NULL) - if (parse(&pi->pi_argc, &pi->pi_argv, args)) { - printf("%s line %d: bad arguments\n", path, line); - continue; - } - pi->pi_module = strdup(module); - printf("use module '%s' for %s:%s\n", module, pi->pi_handler->pp_name, id->id_ident); - } - } - } - } - close(fd); - } - return(CMD_OK); -} -static int -pnp_scankernel(void) -{ - return(CMD_OK); -} -#endif /* * Add a unique identifier to (pi) */ ==== //depot/projects/linuxolator/src/sys/boot/forth/loader.conf#4 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.114 2006/12/13 02:48:22 yongari Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.117 2007/01/14 13:55:43 maxim Exp $ ############################################################## ### Basic configuration options ############################ @@ -147,13 +147,13 @@ # ggatec(8), ggated(8), ggatel(8)) geom_label_load="NO" # File system labels (see glabel(8)) geom_md_load="NO" # Memory disk driver (vnode/swap/malloc) (see + # md(4), mdconfig(8)) geom_mirror_load="NO" # RAID1 disk driver (see gmirror(8)) geom_nop_load="NO" # Transparent disk driver (see gnop(8)) geom_raid3_load="NO" # RAID3 disk driver (see graid3(8)) geom_shsec_load="NO" # Shared secret disk driver (see gshsec(8)) geom_stripe_load="NO" # RAID0 disk driver (see gstripe(8)) geom_uzip_load="NO" # Compressed disk images driver (see mkuzip(8)) - # md(4), mdconfig(8)) geom_vinum_load="NO" # Concatenated/mirror/raid driver (see vinum(4)) @@ -183,7 +183,8 @@ ############################################################## if_disc_load="NO" # Discard device -if_ef_load="NO" # pseudo-device providing support for multiple ethernet frame types +if_ef_load="NO" # pseudo-device providing support for multiple + # ethernet frame types if_faith_load="NO" # IPv6-to-IPv4 TCP relay capturing interface if_gif_load="NO" # generic tunnel interface if_gre_load="NO" # encapsulating network device @@ -217,21 +218,25 @@ if_cue_load="NO" # CATC USB-EL1210A USB Ethernet if_dc_load="NO" # DEC/Intel 21143 and various workalikes if_de_load="NO" # DEC DC21x4x Ethernet -if_ed_load="NO" # National Semiconductor DS8390/WD83C690 Ethernet +if_ed_load="NO" # National Semiconductor DS8390/WD83C690 + # Ethernet if_em_load="NO" # Intel(R) PRO/1000 Gigabit Ethernet if_en_load="NO" # Midway-based ATM interfaces if_ep_load="NO" # 3Com Etherlink III (3c5x9) if_ex_load="NO" # Intel EtherExpress Pro/10 Ethernet -if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet adapters +if_fe_load="NO" # Fujitsu MB86960A/MB86965A based Ethernet + # adapters if_fxp_load="NO" # Intel EtherExpress PRO/100B (82557, 82558) if_gem_load="NO" # Sun GEM/Sun ERI/Apple GMAC if_hme_load="NO" # Sun Microelectronics STP2002-STQ Ethernet if_ie_load="NO" # Intel 82586 if_ipw_load="NO" # Intel PRO/Wireless 2100 wireless -if_iwi_load="NO" # Intel PRO/Wireless 2200BG/2225BG/2915ABG wireless +if_iwi_load="NO" # Intel PRO/Wireless 2200BG/2225BG/2915ABG + # wireless if_ixgb_load="NO" # Intel PRO/10Gb Ethernet if_le_load="NO" # AMD Am7900 LANCE and Am79C9xx PCnet -if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI Gigabit Ethernet +if_lge_load="NO" # Level 1 LXT1001 NetCellerator PCI Gigabit + # Ethernet if_msk_load="NO" # Marvell/SysKonnect Yukon II Gigabit Ethernet if_mxge_load="NO" # Myricom Myri10GE 10Gb Ethernet if_my_load="NO" # Myson PCI Fast Ethernet @@ -289,18 +294,21 @@ ng_ksocket_load="NO" # kernel socket netgraph node type ng_l2tp_load="NO" # L2TP protocol netgraph node type ng_lmi_load="NO" # frame relay LMI protocol netgraph node type -ng_mppc_load="NO" # Microsoft MPPC/MPPE compression and encryption netgraph node type -ng_netflow_load="NO" # Cisco's NetFlow netgraph note type +ng_mppc_load="NO" # Microsoft MPPC/MPPE compression and + # encryption netgraph node type +ng_netflow_load="NO" # Cisco's NetFlow netgraph node type ng_one2many_load="NO" # packet multiplexing netgraph node type ng_ppp_load="NO" # PPP protocol netgraph node type ng_pppoe_load="NO" # RFC 2516 PPPOE protocol netgraph node type ng_pptpgre_load="NO" # PPTP GRE protocol netgraph node type ng_rfc1490_load="NO" # RFC 1490 netgraph node type ng_socket_load="NO" # Netgraph socket node type -ng_split_load="NO" # netgraph node to separate incoming and outgoing flows +ng_split_load="NO" # netgraph node to separate incoming and + # outgoing flows ng_sppp_load="NO" # sppp netgraph node type ng_tee_load="NO" # Netgraph ``tee'' node type -ng_tty_load="NO" # Netgraph node type that is also a line discipline +ng_tty_load="NO" # Netgraph node type that is also a line + # discipline ng_vjc_load="NO" # Van Jacobsen compression netgraph node type ng_vlan_load="NO" # IEEE 802.1Q VLAN tagging netgraph node type ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#20 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.10 2006/12/31 12:42:55 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.12 2007/01/07 19:09:20 netchild Exp $"); #include "opt_compat.h" ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.h#8 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/linux/linux_emul.h,v 1.5 2006/12/31 12:42:55 netchild Exp $ + * $FreeBSD: src/sys/compat/linux/linux_emul.h,v 1.6 2007/01/07 19:00:38 netchild Exp $ */ #ifndef _LINUX_EMUL_H_ ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#9 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.53 2006/12/20 20:08:45 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.54 2007/01/14 16:34:43 netchild Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_mib.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_mib.c,v 1.27 2006/12/31 12:39:10 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_mib.c,v 1.29 2007/01/14 16:07:01 netchild Exp $"); #include <sys/param.h> #include <sys/kernel.h> ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#52 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.202 2006/12/31 13:16:00 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.205 2007/01/07 19:30:19 netchild Exp $"); #include "opt_compat.h" #include "opt_mac.h" ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#11 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.63 2007/01/01 14:47:45 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.65 2007/01/07 19:14:06 netchild Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/linuxolator/src/sys/conf/NOTES#15 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1405 2007/01/03 11:12:54 piso Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1406 2007/01/10 18:45:17 marius Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1398,6 +1398,7 @@ options SC_NO_CUTPASTE options SC_NO_FONT_LOADING options SC_NO_HISTORY +options SC_NO_MODE_CHANGE options SC_NO_SYSMOUSE options SC_NO_SUSPEND_VTYSWITCH ==== //depot/projects/linuxolator/src/sys/conf/options#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.571 2007/01/03 11:12:54 piso Exp $ +# $FreeBSD: src/sys/conf/options,v 1.572 2007/01/10 18:45:17 marius Exp $ # # On the handling of kernel options # @@ -707,6 +707,7 @@ SC_NO_CUTPASTE opt_syscons.h SC_NO_FONT_LOADING opt_syscons.h SC_NO_HISTORY opt_syscons.h +SC_NO_MODE_CHANGE opt_syscons.h SC_NO_SUSPEND_VTYSWITCH opt_syscons.h SC_NO_SYSMOUSE opt_syscons.h SC_NORM_ATTR opt_syscons.h ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.229 2006/09/21 18:56:03 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.230 2007/01/07 21:53:42 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -1110,7 +1110,7 @@ /* Allocate an IO port or memory resource, given its GAS. */ int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, ACPI_GENERIC_ADDRESS *gas, - struct resource **res) + struct resource **res, u_int flags) { int error, res_type; @@ -1143,7 +1143,7 @@ bus_set_resource(dev, res_type, *rid, gas->Address, gas->RegisterBitWidth / 8); - *res = bus_alloc_resource_any(dev, res_type, rid, RF_ACTIVE); + *res = bus_alloc_resource_any(dev, res_type, rid, RF_ACTIVE | flags); if (*res != NULL) { *type = res_type; error = 0; ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_cpu.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.59 2005/10/25 21:15:47 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.61 2007/01/08 00:45:46 njl Exp $"); #include "opt_acpi.h" #include <sys/param.h> @@ -51,9 +51,6 @@ /* * Support for ACPI Processor devices, including C[1-3] sleep states. - * - * TODO: implement scans of all CPUs to be sure all Cx states are - * equivalent. */ /* Hooks for the ACPI CA debugging infrastructure */ @@ -80,10 +77,20 @@ int cpu_cx_count; /* Number of valid Cx states. */ int cpu_prev_sleep;/* Last idle sleep duration. */ int cpu_features; /* Child driver supported features. */ + /* Runtime state. */ + int cpu_non_c3; /* Index of lowest non-C3 state. */ + int cpu_short_slp; /* Count of < 1us sleeps. */ + u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ + /* Values for sysctl. */ + struct sysctl_ctx_list cpu_sysctl_ctx; + struct sysctl_oid *cpu_sysctl_tree; + int cpu_cx_lowest; + char cpu_cx_supported[64]; + int cpu_rid; }; struct acpi_cpu_device { - struct resource_list ad_rl; + struct resource_list ad_rl; }; #define CPU_GET_REG(reg, width) \ @@ -110,20 +117,17 @@ /* Platform hardware resource information. */ static uint32_t cpu_smi_cmd; /* Value to write to SMI_CMD. */ static uint8_t cpu_cst_cnt; /* Indicate we are _CST aware. */ -static int cpu_rid; /* Driver-wide resource id. */ static int cpu_quirks; /* Indicate any hardware bugs. */ /* Runtime state. */ -static int cpu_cx_count; /* Number of valid states */ -static int cpu_non_c3; /* Index of lowest non-C3 state. */ -static int cpu_short_slp; /* Count of < 1us sleeps. */ -static u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ +static int cpu_disable_idle; /* Disable entry to idle function */ +static int cpu_cx_count; /* Number of valid Cx states */ /* Values for sysctl. */ -static struct sysctl_ctx_list acpi_cpu_sysctl_ctx; -static struct sysctl_oid *acpi_cpu_sysctl_tree; +static struct sysctl_ctx_list cpu_sysctl_ctx; +static struct sysctl_oid *cpu_sysctl_tree; +static int cpu_cx_generic; static int cpu_cx_lowest; -static char cpu_cx_supported[64]; static device_t *cpu_devices; static int cpu_ndevices; @@ -140,15 +144,17 @@ static int acpi_cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result); static int acpi_cpu_shutdown(device_t dev); -static int acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); +static void acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); +static void acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_cst(struct acpi_cpu_softc *sc); static void acpi_cpu_startup(void *arg); -static void acpi_cpu_startup_cx(void); +static void acpi_cpu_startup_cx(struct acpi_cpu_softc *sc); static void acpi_cpu_idle(void); static void acpi_cpu_notify(ACPI_HANDLE h, UINT32 notify, void *context); -static int acpi_cpu_quirks(struct acpi_cpu_softc *sc); +static int acpi_cpu_quirks(void); static int acpi_cpu_usage_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_cpu_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_cpu_global_cx_lowest_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t acpi_cpu_methods[] = { /* Device interface */ @@ -288,11 +294,24 @@ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "acpi_cpu%d: P_BLK at %#x/%d\n", device_get_unit(dev), sc->cpu_p_blk, sc->cpu_p_blk_len)); - acpi_sc = acpi_device_get_parent_softc(dev); - sysctl_ctx_init(&acpi_cpu_sysctl_ctx); - acpi_cpu_sysctl_tree = SYSCTL_ADD_NODE(&acpi_cpu_sysctl_ctx, - SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu", - CTLFLAG_RD, 0, ""); + /* + * If this is the first cpu we attach, create and initialize the generic + * resources that will be used by all acpi cpu devices. + */ + if (device_get_unit(dev) == 0) { + /* Assume we won't be using generic Cx mode by default */ + cpu_cx_generic = FALSE; + + /* Install hw.acpi.cpu sysctl tree */ + acpi_sc = acpi_device_get_parent_softc(dev); + sysctl_ctx_init(&cpu_sysctl_ctx); + cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx, + SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu", + CTLFLAG_RD, 0, "node for CPU children"); + + /* Queue post cpu-probing task handler */ + AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cpu_startup, NULL); + } /* * Before calling any CPU methods, collect child driver feature hints @@ -327,17 +346,8 @@ AcpiEvaluateObject(sc->cpu_handle, "_PDC", &arglist, NULL); } - /* - * Probe for Cx state support. If it isn't present, free up unused - * resources. - */ - if (acpi_cpu_cx_probe(sc) == 0) { - status = AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY, - acpi_cpu_notify, sc); - if (device_get_unit(dev) == 0) - AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_cpu_startup, NULL); - } else - sysctl_ctx_free(&acpi_cpu_sysctl_ctx); + /* Probe for Cx state support. */ + acpi_cpu_cx_probe(sc); /* Finally, call identify and probe/attach for child devices. */ bus_generic_probe(dev); @@ -371,7 +381,7 @@ * return the pc_cpuid to reference this processor. */ if (pcpu_data->pc_acpi_id == 0xffffffff) - pcpu_data->pc_acpi_id = *acpi_id; + pcpu_data->pc_acpi_id = *acpi_id; else if (pcpu_data->pc_acpi_id != *acpi_id) *acpi_id = pcpu_data->pc_acpi_id; *cpu_id = pcpu_data->pc_cpuid; @@ -396,17 +406,17 @@ static device_t acpi_cpu_add_child(device_t dev, int order, const char *name, int unit) { - struct acpi_cpu_device *ad; - device_t child; + struct acpi_cpu_device *ad; + device_t child; if ((ad = malloc(sizeof(*ad), M_TEMP, M_NOWAIT | M_ZERO)) == NULL) - return (NULL); + return (NULL); resource_list_init(&ad->ad_rl); child = device_add_child_ordered(dev, order, name, unit); if (child != NULL) - device_set_ivars(child, ad); + device_set_ivars(child, ad); else free(ad, M_TEMP); return (child); @@ -440,7 +450,7 @@ bus_generic_shutdown(dev); /* Disable any entry to the idle function. */ - cpu_cx_count = 0; + cpu_disable_idle = TRUE; /* Signal and wait for all processors to exit acpi_cpu_idle(). */ smp_rendezvous(NULL, NULL, NULL, NULL); @@ -448,105 +458,99 @@ return_VALUE (0); } -static int +static void acpi_cpu_cx_probe(struct acpi_cpu_softc *sc) { - ACPI_GENERIC_ADDRESS gas; - struct acpi_cx *cx_ptr; - int error; + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + /* Use initial sleep value of 1 sec. to start with lowest idle state. */ + sc->cpu_prev_sleep = 1000000; + sc->cpu_cx_lowest = 0; /* - * Bus mastering arbitration control is needed to keep caches coherent - * while sleeping in C3. If it's not present but a working flush cache - * instruction is present, flush the caches before entering C3 instead. - * Otherwise, just disable C3 completely. + * Check for the ACPI 2.0 _CST sleep states object. If we can't find + * any, we'll revert to generic FADT/P_BLK Cx control method which will + * be handled by acpi_cpu_startup. We need to defer to after having + * probed all the cpus in the system before probing for generic Cx + * states as we may already have found cpus with valid _CST packages */ - if (AcpiGbl_FADT->V1_Pm2CntBlk == 0 || AcpiGbl_FADT->Pm2CntLen == 0) { - if (AcpiGbl_FADT->WbInvd && AcpiGbl_FADT->WbInvdFlush == 0) { - cpu_quirks |= CPU_QUIRK_NO_BM_CTRL; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "acpi_cpu%d: no BM control, using flush cache method\n", - device_get_unit(sc->cpu_dev))); - } else { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701141649.l0EGnxce031818>