From owner-p4-projects@FreeBSD.ORG Tue Jun 13 18:17:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ECD0D16A474; Tue, 13 Jun 2006 18:17:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C7CD116A41A for ; Tue, 13 Jun 2006 18:17:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 784E843D46 for ; Tue, 13 Jun 2006 18:17:10 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5DIEohp071852 for ; Tue, 13 Jun 2006 18:14:50 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5DIEmef071849 for perforce@freebsd.org; Tue, 13 Jun 2006 18:14:48 GMT (envelope-from jhb@freebsd.org) Date: Tue, 13 Jun 2006 18:14:48 GMT Message-Id: <200606131814.k5DIEmef071849@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 99150 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 18:17:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=99150 Change 99150 by jhb@jhb_mutex on 2006/06/13 18:13:54 IFC @99141. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#58 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#46 integrate .. //depot/projects/smpng/sys/amd64/conf/NOTES#32 integrate .. //depot/projects/smpng/sys/arm/arm/elf_trampoline.c#6 integrate .. //depot/projects/smpng/sys/arm/arm/inckern.S#3 integrate .. //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#4 integrate .. //depot/projects/smpng/sys/compat/ndis/winx32_wrap.S#5 integrate .. //depot/projects/smpng/sys/conf/Makefile.arm#21 integrate .. //depot/projects/smpng/sys/conf/NOTES#120 integrate .. //depot/projects/smpng/sys/conf/files#176 integrate .. //depot/projects/smpng/sys/conf/kern.post.mk#54 integrate .. //depot/projects/smpng/sys/conf/options#121 integrate .. //depot/projects/smpng/sys/dev/mfi/mfi.c#5 integrate .. //depot/projects/smpng/sys/dev/mxge/eth_z8e.dat.gz.uu#1 branch .. //depot/projects/smpng/sys/dev/mxge/ethp_z8e.dat.gz.uu#1 branch .. //depot/projects/smpng/sys/dev/mxge/if_mxge.c#1 branch .. //depot/projects/smpng/sys/dev/mxge/if_mxge_var.h#1 branch .. //depot/projects/smpng/sys/dev/mxge/mcp_gen_header.h#1 branch .. //depot/projects/smpng/sys/dev/mxge/mxge_mcp.h#1 branch .. //depot/projects/smpng/sys/i386/conf/DEFAULTS#6 integrate .. //depot/projects/smpng/sys/i386/conf/GENERIC#76 integrate .. //depot/projects/smpng/sys/i386/conf/NOTES#121 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#97 integrate .. //depot/projects/smpng/sys/isa/isa_common.c#19 integrate .. //depot/projects/smpng/sys/kern/kern_clock.c#50 integrate .. //depot/projects/smpng/sys/kern/kern_event.c#47 integrate .. //depot/projects/smpng/sys/kern/kern_switch.c#64 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#57 integrate .. //depot/projects/smpng/sys/kern/sched_core.c#1 branch .. //depot/projects/smpng/sys/kern/sched_ule.c#66 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#58 integrate .. //depot/projects/smpng/sys/modules/Makefile#123 integrate .. //depot/projects/smpng/sys/modules/mxge/Makefile#1 branch .. //depot/projects/smpng/sys/modules/mxge/mxge/Makefile#1 branch .. //depot/projects/smpng/sys/modules/mxge/mxge_eth_z8e/Makefile#1 branch .. //depot/projects/smpng/sys/modules/mxge/mxge_ethp_z8e/Makefile#1 branch .. //depot/projects/smpng/sys/net/if_bridge.c#29 integrate .. //depot/projects/smpng/sys/pc98/conf/DEFAULTS#6 integrate .. //depot/projects/smpng/sys/pc98/conf/NOTES#56 integrate .. //depot/projects/smpng/sys/powerpc/conf/DEFAULTS#4 integrate .. //depot/projects/smpng/sys/sys/sched.h#20 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#58 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.555 2006/06/05 20:35:25 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.556 2006/06/12 20:05:27 alc Exp $"); /* * Manages physical address maps. @@ -1006,17 +1006,22 @@ * Note: SMP coherent. Uses a ranged shootdown IPI. */ void -pmap_qenter(vm_offset_t sva, vm_page_t *m, int count) +pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) { - vm_offset_t va; + pt_entry_t *endpte, oldpte, *pte; - va = sva; - while (count-- > 0) { - pmap_kenter(va, VM_PAGE_TO_PHYS(*m)); - va += PAGE_SIZE; - m++; + oldpte = 0; + pte = vtopte(sva); + endpte = pte + count; + while (pte < endpte) { + oldpte |= *pte; + pte_store(pte, VM_PAGE_TO_PHYS(*ma) | PG_G | PG_RW | PG_V); + pte++; + ma++; } - pmap_invalidate_range(kernel_pmap, sva, va); + if ((oldpte & PG_V) != 0) + pmap_invalidate_range(kernel_pmap, sva, sva + count * + PAGE_SIZE); } /* ==== //depot/projects/smpng/sys/amd64/conf/GENERIC#46 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.458 2006/05/17 20:45:44 marius Exp $ +# $FreeBSD: src/sys/amd64/conf/GENERIC,v 1.459 2006/06/13 13:12:56 davidxu Exp $ cpu HAMMER ident GENERIC @@ -28,6 +28,7 @@ #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler +#options SCHED_CORE # CORE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols ==== //depot/projects/smpng/sys/amd64/conf/NOTES#32 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.55 2006/05/14 18:49:24 marius Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.56 2006/06/12 20:38:17 jhb Exp $ # # ==== //depot/projects/smpng/sys/arm/arm/elf_trampoline.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.6 2006/05/30 21:13:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.7 2006/06/12 22:58:50 cognet Exp $"); #include #include #include @@ -32,6 +32,7 @@ #include #include #include +#include #include @@ -41,6 +42,8 @@ extern char kernel_start[]; extern char kernel_end[]; +extern void *_end; + void __start(void); #define GZ_HEAD 0xa @@ -50,7 +53,7 @@ #elif defined(CPU_ARM8) #define cpu_idcache_wbinv_all arm8_cache_purgeID #elif defined(CPU_ARM9) -#define cpu_idcache_wbinv_all arm9_dcache_wbinv_all +#define cpu_idcache_wbinv_all arm9_idcache_wbinv_all #elif defined(CPU_ARM10) #define cpu_idcache_wbinv_all arm10_idcache_wbinv_all #elif defined(CPU_SA110) || defined(CPU_SA1110) || defined(CPU_SA1100) || \ @@ -60,8 +63,35 @@ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) #define cpu_idcache_wbinv_all xscale_cache_purgeID #endif -int arm_pdcache_line_size = 32; + +#ifdef KZIP +int arm_picache_size; +int arm_picache_line_size; +int arm_picache_ways; + +int arm_pdcache_size; /* and unified */ +int arm_pdcache_line_size = 32; +int arm_pdcache_ways; + +int arm_pcache_type; +int arm_pcache_unified; + +int arm_dcache_align; +int arm_dcache_align_mask; + +/* Additional cache information local to this file. Log2 of some of the + above numbers. */ +static int arm_dcache_l2_nsets; +static int arm_dcache_l2_assoc; +static int arm_dcache_l2_linesize; + + int block_userspace_access = 0; +extern int arm9_dcache_sets_inc; +extern int arm9_dcache_sets_max; +extern int arm9_dcache_index_max; +extern int arm9_dcache_index_inc; +#endif static __inline void * memcpy(void *dst, const void *src, int len) @@ -107,13 +137,18 @@ { int physaddr = KERNPHYSADDR; int tmp1; + unsigned int sp = (unsigned int)&_end; +#ifdef KZIP + sp += KERNSIZE + 0x100; + sp &= ~(L1_TABLE_SIZE - 1); + sp += 2 * L1_TABLE_SIZE; +#endif + sp += 1024 * 1024; /* Should be enough for a stack */ __asm __volatile("adr %0, 2f\n" "bic %0, %0, #0xff000000\n" - "bic sp, sp, #0xff000000\n" "and %1, %1, #0xff000000\n" "orr %0, %0, %1\n" - "orr sp, sp, %1\n" "mrc p15, 0, %1, c1, c0, 0\n" "bic %1, %1, #1\n" /* Disable MMU */ "orr %1, %1, #(4 | 8)\n" /* Add DC enable, @@ -127,11 +162,92 @@ "nop\n" "mov pc, %0\n" "2: nop\n" - : "=r" (tmp1), "+r" (physaddr)); + "mov sp, %2\n" + : "=r" (tmp1), "+r" (physaddr), "+r" (sp)); __start(); } #ifdef KZIP +static void +get_cachetype_cp15() +{ + u_int ctype, isize, dsize; + u_int multiplier; + + __asm __volatile("mrc p15, 0, %0, c0, c0, 1" + : "=r" (ctype)); + + /* + * ...and thus spake the ARM ARM: + * + * If an value corresponding to an unimplemented or + * reserved ID register is encountered, the System Control + * processor returns the value of the main ID register. + */ + if (ctype == cpufunc_id()) + goto out; + + if ((ctype & CPU_CT_S) == 0) + arm_pcache_unified = 1; + + /* + * If you want to know how this code works, go read the ARM ARM. + */ + + arm_pcache_type = CPU_CT_CTYPE(ctype); + if (arm_pcache_unified == 0) { + isize = CPU_CT_ISIZE(ctype); + multiplier = (isize & CPU_CT_xSIZE_M) ? 3 : 2; + arm_picache_line_size = 1U << (CPU_CT_xSIZE_LEN(isize) + 3); + if (CPU_CT_xSIZE_ASSOC(isize) == 0) { + if (isize & CPU_CT_xSIZE_M) + arm_picache_line_size = 0; /* not present */ + else + arm_picache_ways = 1; + } else { + arm_picache_ways = multiplier << + (CPU_CT_xSIZE_ASSOC(isize) - 1); + } + arm_picache_size = multiplier << (CPU_CT_xSIZE_SIZE(isize) + 8); + } + + dsize = CPU_CT_DSIZE(ctype); + multiplier = (dsize & CPU_CT_xSIZE_M) ? 3 : 2; + arm_pdcache_line_size = 1U << (CPU_CT_xSIZE_LEN(dsize) + 3); + if (CPU_CT_xSIZE_ASSOC(dsize) == 0) { + if (dsize & CPU_CT_xSIZE_M) + arm_pdcache_line_size = 0; /* not present */ + else + arm_pdcache_ways = 1; + } else { + arm_pdcache_ways = multiplier << + (CPU_CT_xSIZE_ASSOC(dsize) - 1); + } + arm_pdcache_size = multiplier << (CPU_CT_xSIZE_SIZE(dsize) + 8); + + arm_dcache_align = arm_pdcache_line_size; + + arm_dcache_l2_assoc = CPU_CT_xSIZE_ASSOC(dsize) + multiplier - 2; + arm_dcache_l2_linesize = CPU_CT_xSIZE_LEN(dsize) + 3; + arm_dcache_l2_nsets = 6 + CPU_CT_xSIZE_SIZE(dsize) - + CPU_CT_xSIZE_ASSOC(dsize) - CPU_CT_xSIZE_LEN(dsize); + out: + arm_dcache_align_mask = arm_dcache_align - 1; +} + +static void +arm9_setup(void) +{ + + get_cachetype_cp15(); + arm9_dcache_sets_inc = 1U << arm_dcache_l2_linesize; + arm9_dcache_sets_max = (1U << (arm_dcache_l2_linesize + + arm_dcache_l2_nsets)) - arm9_dcache_sets_inc; + arm9_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc); + arm9_dcache_index_max = 0U - arm9_dcache_index_inc; +} + + static unsigned char *orig_input, *i_input, *i_output; @@ -354,7 +470,6 @@ extern char func_end[]; -extern void *_end; #define PMAP_DOMAIN_KERNEL 15 /* * Just define it instead of including the @@ -404,6 +519,7 @@ void *curaddr; void *dst, *altdst; char *kernel = (char *)&kernel_start; + int sp; __asm __volatile("mov %0, pc" : "=r" (curaddr)); @@ -413,6 +529,11 @@ int pt_addr = (((int)&_end + KERNSIZE + 0x100) & ~(L1_TABLE_SIZE - 1)) + L1_TABLE_SIZE; +#ifdef CPU_ARM9 + /* So that idcache_wbinv works; */ + if ((cpufunc_id() & 0x0000f000) == 0x00009000) + arm9_setup(); +#endif setup_pagetables(pt_addr, (vm_paddr_t)curaddr, (vm_paddr_t)curaddr + 0x10000000); /* Gzipped kernel */ @@ -433,10 +554,10 @@ dst = 4 + load_kernel((unsigned int)&kernel_start, (unsigned int)curaddr, (unsigned int)&func_end, 0); + sp = (vm_offset_t)dst + 4096; + dst = (void *)sp; memcpy((void *)dst, (void *)&load_kernel, (unsigned int)&func_end - (unsigned int)&load_kernel); - ((void (*)())dst)((unsigned int)kernel, - (unsigned int)curaddr, - dst + (unsigned int)(&func_end) - - (unsigned int)(&load_kernel), 1); + do_call(dst, kernel, dst + (unsigned int)(&func_end) - + (unsigned int)(&load_kernel), sp); } ==== //depot/projects/smpng/sys/arm/arm/inckern.S#3 (text+ko) ==== @@ -25,7 +25,15 @@ #include "opt_kernname.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/inckern.S,v 1.2 2005/12/05 12:55:46 cognet Exp $") +__FBSDID("$FreeBSD: src/sys/arm/arm/inckern.S,v 1.3 2006/06/12 22:58:50 cognet Exp $") +ENTRY(do_call) + mov r6, r0 + mov r0, r1 + ldr r1, =0xfff00000 + and r1, pc, r1 + mov sp, r3 + mov r3, #1 + mov pc, r6 .section ".real_kernel","aw" .globl kernel_start; kernel_start: ==== //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#4 (text) ==== @@ -47,7 +47,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.5 2006/06/07 05:36:10 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.6 2006/06/12 22:57:24 cognet Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -96,7 +96,7 @@ #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_KERN 1 -#define KERNEL_PT_KERN_NUM 8 +#define KERNEL_PT_KERN_NUM 22 #define KERNEL_PT_AFKERNEL KERNEL_PT_KERN + KERNEL_PT_KERN_NUM /* L2 table for mapping after kernel */ #define KERNEL_PT_AFKERNEL_NUM 5 ==== //depot/projects/smpng/sys/compat/ndis/winx32_wrap.S#5 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/ndis/winx32_wrap.S,v 1.4 2005/11/02 18:01:04 wpaul Exp $ + * $FreeBSD: src/sys/compat/ndis/winx32_wrap.S,v 1.5 2006/06/12 20:35:59 jhb Exp $ */ /* The 'ret' macro doesn't work in this file if GPROF is enabled. */ ==== //depot/projects/smpng/sys/conf/Makefile.arm#21 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.27 2006/05/30 21:13:47 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.28 2006/06/12 22:58:50 cognet Exp $ # # Makefile for FreeBSD # @@ -62,7 +62,7 @@ FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_arm7tdmi.S \ $S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \ $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \ - $S/$M/$M/cpufunc_asm_xscale.S + $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S trampoline: ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp: ${KERNEL_KO} echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h @@ -71,6 +71,8 @@ ldscript.$M.tramp.noheader ${OBJCOPY} --strip-symbol '$$d' --strip-symbol '$$a' \ -g --strip-symbol '$$t' ${FULLKERNEL} ${KERNEL_KO}.tmp + eval $$(stat -s ${KERNEL_KO}.tmp) && \ + echo "#define KERNSIZE $$st_size" >>opt_kernname.h ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ $S/$M/$M/elf_trampoline.c $S/$M/$M/inckern.S -o ${KERNEL_KO}.tramp ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ ==== //depot/projects/smpng/sys/conf/NOTES#120 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1365 2006/06/03 23:30:16 kris Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1366 2006/06/13 13:12:55 davidxu Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -166,6 +166,7 @@ # over time. # options SCHED_4BSD +#options SCHED_CORE #options SCHED_ULE ##################################################################### ==== //depot/projects/smpng/sys/conf/files#176 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1122 2006/06/12 04:21:49 imp Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1124 2006/06/13 13:12:55 davidxu Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1245,8 +1245,8 @@ isa/isa_common.c optional isa isa/isahint.c optional isa isa/orm.c optional isa -isa/pnp.c optional isa -isa/pnpparse.c optional isa +isa/pnp.c optional isa isapnp +isa/pnpparse.c optional isa isapnp isofs/cd9660/cd9660_bmap.c optional cd9660 isofs/cd9660/cd9660_lookup.c optional cd9660 isofs/cd9660/cd9660_node.c optional cd9660 @@ -1324,6 +1324,7 @@ kern/md4c.c optional netsmb kern/md5c.c standard kern/sched_4bsd.c optional sched_4bsd +kern/sched_core.c optional sched_core kern/sched_ule.c optional sched_ule kern/serdev_if.m optional puc | scc kern/subr_autoconf.c standard ==== //depot/projects/smpng/sys/conf/kern.post.mk#54 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.post.mk,v 1.93 2006/05/12 02:45:12 jmg Exp $ +# $FreeBSD: src/sys/conf/kern.post.mk,v 1.94 2006/06/13 00:57:10 cognet Exp $ # Part of a unified Makefile for building kernels. This part includes all # the definitions that need to be after all the % directives except %RULES @@ -68,15 +68,6 @@ ${FULLKERNEL} ${.TARGET} ${KERNEL_KO}.symbols: ${FULLKERNEL} ${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET} -.if defined(MFS_IMAGE) - @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \ - obs=`strings -at d "${KERNEL_KO}" | \ - grep "MFS Filesystem goes here" | awk '{print $$1}'` \ - oseek=1 conv=notrunc 2>/dev/null && \ - strings ${KERNEL_KO} | \ - grep 'MFS Filesystem had better STOP here' > /dev/null || \ - (rm ${KERNEL_KO} && echo 'MFS image too large' && false) -.endif install.debug reinstall.debug: gdbinit cd ${.CURDIR}; ${MAKE} ${.TARGET:R} @@ -99,6 +90,15 @@ ${OBJCOPY} --strip-debug ${.TARGET} .endif ${SYSTEM_LD_TAIL} +.if defined(MFS_IMAGE) + @dd if="${MFS_IMAGE}" ibs=8192 of="${KERNEL_KO}" \ + obs=`strings -at d "${KERNEL_KO}" | \ + grep "MFS Filesystem goes here" | awk '{print $$1}'` \ + oseek=1 conv=notrunc 2>/dev/null && \ + strings ${KERNEL_KO} | \ + grep 'MFS Filesystem had better STOP here' > /dev/null || \ + (rm ${KERNEL_KO} && echo 'MFS image too large' && false) +.endif .if !exists(${.OBJDIR}/.depend) ${SYSTEM_OBJS}: assym.s vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} ==== //depot/projects/smpng/sys/conf/options#121 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.544 2006/06/07 17:53:15 sam Exp $ +# $FreeBSD: src/sys/conf/options,v 1.546 2006/06/13 13:12:55 davidxu Exp $ # # On the handling of kernel options # @@ -128,6 +128,7 @@ PREEMPTION opt_sched.h QUOTA SCHED_4BSD opt_sched.h +SCHED_CORE opt_sched.h SCHED_ULE opt_sched.h SHOW_BUSYBUFS SLEEPQUEUE_PROFILING @@ -615,13 +616,16 @@ ACPI_NO_SEMAPHORES opt_acpi.h ACPICA_PEDANTIC opt_acpi.h +# ISA support +DEV_ISA opt_isa.h +ISAPNP opt_isa.h + # options for DEVFS, see sys/fs/devfs/devfs.h NDEVFSINO opt_devfs.h NDEVFSOVERFLOW opt_devfs.h # various 'device presence' options. DEV_BPF opt_bpf.h -DEV_ISA opt_isa.h DEV_MCA opt_mca.h DEV_CARP opt_carp.h DEV_SPLASH opt_splash.h ==== //depot/projects/smpng/sys/dev/mfi/mfi.c#5 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.5 2006/05/18 23:30:47 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.6 2006/06/13 14:27:52 ambrisko Exp $"); #include "opt_mfi.h" @@ -59,7 +59,9 @@ static int mfi_get_controller_info(struct mfi_softc *); static int mfi_get_log_state(struct mfi_softc *, struct mfi_evt_log_state *); +#ifdef NOTYET static int mfi_get_entry(struct mfi_softc *, int); +#endif static void mfi_data_cb(void *, bus_dma_segment_t *, int, int); static void mfi_startup(void *arg); static void mfi_intr(void *arg); @@ -608,7 +610,7 @@ * the AEN mechanism via setting it lower then * current. The firmware will iterate through them. */ -#if 0 +#ifdef NOTYET for (seq = log_state.shutdown_seq_num; seq <= log_state.newest_seq_num; seq++) { mfi_get_entry(sc, seq); @@ -930,7 +932,7 @@ mfi_ldprobe_capacity(sc, hdr->target_id); } -#ifndef MFI_DECODE_LOG +#ifdef NOTYET static void mfi_decode_log(struct mfi_softc *sc, struct mfi_log_detail *detail) { @@ -943,9 +945,6 @@ break; } } -#else -#include -#include #endif static void @@ -953,12 +952,14 @@ { switch (detail->arg_type) { case MR_EVT_ARGS_NONE: - /* Try to get info from log entry */ - mfi_get_entry(sc, detail->seq); + device_printf(sc->mfi_dev, "%d - %s\n", + detail->seq, + detail->description + ); break; case MR_EVT_ARGS_CDB_SENSE: device_printf(sc->mfi_dev, "%d - PD %02d(e%d/s%d) CDB %*D" - "Sense %*D\n: %s", + "Sense %*D\n: %s\n", detail->seq, detail->args.cdb_sense.pd.device_id, detail->args.cdb_sense.pd.enclosure_index, @@ -1284,6 +1285,7 @@ } } +#ifdef NOTYET static int mfi_get_entry(struct mfi_softc *sc, int seq) { @@ -1349,6 +1351,7 @@ mtx_unlock(&sc->mfi_io_lock); return (0); } +#endif static int mfi_ldprobe_capacity(struct mfi_softc *sc, int id) ==== //depot/projects/smpng/sys/i386/conf/DEFAULTS#6 (text+ko) ==== @@ -1,12 +1,13 @@ # # DEFAULTS -- Default kernel configuration file for FreeBSD/i386 # -# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.5 2006/06/12 04:21:50 imp Exp $ +# $FreeBSD: src/sys/i386/conf/DEFAULTS,v 1.6 2006/06/12 21:07:12 marius Exp $ machine i386 # Bus support. device isa +options ISAPNP # Floating point support. device npx ==== //depot/projects/smpng/sys/i386/conf/GENERIC#76 (text+ko) ==== @@ -16,7 +16,7 @@ # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # -# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.448 2006/05/17 20:44:00 marius Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.449 2006/06/13 13:12:56 davidxu Exp $ cpu I486_CPU cpu I586_CPU @@ -30,6 +30,7 @@ #options SCHED_ULE # ULE scheduler options SCHED_4BSD # 4BSD scheduler +#options SCHED_CORE # CORE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols ==== //depot/projects/smpng/sys/i386/conf/NOTES#121 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1227 2006/05/17 21:25:23 marius Exp $ +# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1228 2006/06/12 20:38:17 jhb Exp $ # # ==== //depot/projects/smpng/sys/i386/i386/pmap.c#97 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.559 2006/06/05 20:35:26 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.560 2006/06/12 20:05:27 alc Exp $"); /* * Manages physical address maps. @@ -1057,17 +1057,22 @@ * Note: SMP coherent. Uses a ranged shootdown IPI. */ void -pmap_qenter(vm_offset_t sva, vm_page_t *m, int count) +pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) { - vm_offset_t va; + pt_entry_t *endpte, oldpte, *pte; - va = sva; - while (count-- > 0) { - pmap_kenter(va, VM_PAGE_TO_PHYS(*m)); - va += PAGE_SIZE; - m++; + oldpte = 0; + pte = vtopte(sva); + endpte = pte + count; + while (pte < endpte) { + oldpte |= *pte; + pte_store(pte, VM_PAGE_TO_PHYS(*ma) | pgeflag | PG_RW | PG_V); + pte++; + ma++; } - pmap_invalidate_range(kernel_pmap, sva, va); + if ((oldpte & PG_V) != 0) + pmap_invalidate_range(kernel_pmap, sva, sva + count * + PAGE_SIZE); } /* ==== //depot/projects/smpng/sys/isa/isa_common.c#19 (text+ko) ==== @@ -58,7 +58,9 @@ */ #include -__FBSDID("$FreeBSD: src/sys/isa/isa_common.c,v 1.44 2006/05/12 05:04:44 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/isa/isa_common.c,v 1.45 2006/06/12 21:07:12 marius Exp $"); + +#include "opt_isa.h" #include #include @@ -652,8 +654,10 @@ retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%ld"); if (device_get_flags(dev)) retval += printf(" flags %#x", device_get_flags(dev)); +#ifdef ISAPNP if (idev->id_vendorid) retval += printf(" pnpid %s", pnp_eisaformat(idev->id_vendorid)); +#endif return (retval); } @@ -1062,11 +1066,13 @@ isa_child_pnpinfo_str(device_t bus, device_t child, char *buf, size_t buflen) { +#ifdef ISAPNP struct isa_device *idev = DEVTOISA(child); if (idev->id_vendorid) snprintf(buf, buflen, "pnpid=%s", pnp_eisaformat(idev->id_vendorid)); +#endif return (0); } ==== //depot/projects/smpng/sys/kern/kern_clock.c#50 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.188 2006/04/17 20:14:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_clock.c,v 1.189 2006/06/13 13:12:56 davidxu Exp $"); #include "opt_device_polling.h" #include "opt_hwpmc_hooks.h" @@ -201,6 +201,7 @@ * Run current process's virtual and profile time, as needed. */ mtx_lock_spin_flags(&sched_lock, MTX_QUIET); + sched_tick(); if (p->p_flag & P_SA) { /* XXXKSE What to do? */ } else { ==== //depot/projects/smpng/sys/kern/kern_event.c#47 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_event.c,v 1.102 2006/06/02 13:23:39 pjd Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_event.c,v 1.103 2006/06/12 21:46:23 jhb Exp $"); #include #include ==== //depot/projects/smpng/sys/kern/kern_switch.c#64 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.121 2006/06/01 22:45:56 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.122 2006/06/13 13:12:56 davidxu Exp $"); #include "opt_sched.h" @@ -308,7 +308,12 @@ if ((td->td_proc->p_flag & P_HADTHREADS) == 0) { /* We only care about the kse in the run queue. */ td->td_priority = newpri; - if (ke->ke_rqindex != (newpri / RQ_PPQ)) { +#ifndef SCHED_CORE + if (ke->ke_rqindex != (newpri / RQ_PPQ)) +#else + if (ke->ke_rqindex != newpri) +#endif + { sched_rem(td); sched_add(td, SRQ_BORING); } ==== //depot/projects/smpng/sys/kern/sched_4bsd.c#57 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.81 2006/06/06 12:26:17 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.82 2006/06/13 13:12:56 davidxu Exp $"); #include "opt_hwpmc_hooks.h" @@ -1386,5 +1386,10 @@ return (0); } + +void +sched_tick(void) +{ +} #define KERN_SWITCH_INCLUDE 1 #include "kern/kern_switch.c" ==== //depot/projects/smpng/sys/kern/sched_ule.c#66 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.162 2006/06/06 12:26:17 davidxu Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_ule.c,v 1.163 2006/06/13 13:12:56 davidxu Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_sched.h" @@ -2007,5 +2007,10 @@ { return (sizeof(struct thread) + sizeof(struct td_sched)); } + +void +sched_tick(void) +{ +} #define KERN_SWITCH_INCLUDE 1 #include "kern/kern_switch.c" ==== //depot/projects/smpng/sys/kern/uipc_usrreq.c#58 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.167 2006/04/24 19:09:33 maxim Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.168 2006/06/13 14:33:35 maxim Exp $"); #include "opt_mac.h" @@ -1498,8 +1498,9 @@ struct mbuf * unp_addsockcred(struct thread *td, struct mbuf *control) { - struct mbuf *m, *n; + struct mbuf *m, *n, *n_prev; struct sockcred *sc; + const struct cmsghdr *cm; int ngroups; int i; @@ -1508,7 +1509,6 @@ m = sbcreatecontrol(NULL, SOCKCREDSIZE(ngroups), SCM_CREDS, SOL_SOCKET); if (m == NULL) return (control); - m->m_next = NULL; sc = (struct sockcred *) CMSG_DATA(mtod(m, struct cmsghdr *)); sc->sc_uid = td->td_ucred->cr_ruid; @@ -1520,16 +1520,30 @@ sc->sc_groups[i] = td->td_ucred->cr_groups[i]; /* - * If a control message already exists, append us to the end. + * Unlink SCM_CREDS control messages (struct cmsgcred), since + * just created SCM_CREDS control message (struct sockcred) has + * another format. */ - if (control != NULL) { - for (n = control; n->m_next != NULL; n = n->m_next) - ; - n->m_next = m; - } else - control = m; + if (control != NULL) + for (n = control, n_prev = NULL; n != NULL;) { + cm = mtod(n, struct cmsghdr *); + if (cm->cmsg_level == SOL_SOCKET && + cm->cmsg_type == SCM_CREDS) { + if (n_prev == NULL) + control = n->m_next; + else + n_prev->m_next = n->m_next; + n = m_free(n); + } else { + n_prev = n; + n = n->m_next; + } + } + + /* Prepend it to the head. */ + m->m_next = control; - return (control); + return (m); } /* ==== //depot/projects/smpng/sys/modules/Makefile#123 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.497 2006/06/08 23:35:58 sam Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.498 2006/06/13 13:53:52 gallatin Exp $ .include @@ -160,6 +160,7 @@ msdosfs \ msdosfs_iconv \ ${_mse} \ + ${_mxge} \ my \ ${_ncp} \ ${_ncv} \ @@ -413,6 +414,7 @@ _ipw= ipw _iwi= iwi _mly= mly +_mxge= mxge _nve= nve .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../crypto/via) @@ -469,6 +471,7 @@ _ipw= ipw _iwi= iwi _mly= mly +_mxge= mxge _ndis= ndis _nve= nve _pccard= pccard ==== //depot/projects/smpng/sys/net/if_bridge.c#29 (text+ko) ==== @@ -80,7 +80,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.62 2006/06/08 23:40:16 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/net/if_bridge.c,v 1.63 2006/06/12 22:43:37 thompsa Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -501,8 +501,8 @@ ifp->if_hdrlen = ETHER_HDR_LEN; /* >>> TRUNCATED FOR MAIL (1000 lines) <<<