CVS commit: src/sys/arch/evbmips/gdium
Module Name:src Committed By: matt Date: Tue Aug 11 04:46:21 UTC 2009 Modified Files: src/sys/arch/evbmips/gdium: machdep.c Log Message: Remove declaration of physmem since uvm_page.c declares it. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbmips/gdium/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/gdium/machdep.c diff -u src/sys/arch/evbmips/gdium/machdep.c:1.6 src/sys/arch/evbmips/gdium/machdep.c:1.7 --- src/sys/arch/evbmips/gdium/machdep.c:1.6 Tue Aug 11 03:56:34 2009 +++ src/sys/arch/evbmips/gdium/machdep.c Tue Aug 11 04:46:21 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.6 2009/08/11 03:56:34 cliff Exp $ */ +/* $NetBSD: machdep.c,v 1.7 2009/08/11 04:46:21 matt Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2009/08/11 03:56:34 cliff Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.7 2009/08/11 04:46:21 matt Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -172,7 +172,6 @@ struct vm_map *mb_map = NULL; struct vm_map *phys_map = NULL; -int physmem; /* Total physical memory */ int netboot; /* Are we netbooting? */ phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX];
CVS commit: src/sys/arch/evbmips/gdium
Module Name:src Committed By: cliff Date: Tue Aug 11 03:56:34 UTC 2009 Modified Files: src/sys/arch/evbmips/gdium: machdep.c Log Message: #ifdef around boot args parsing for now, so won't kill autobooting the gdium To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbmips/gdium/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/gdium/machdep.c diff -u src/sys/arch/evbmips/gdium/machdep.c:1.5 src/sys/arch/evbmips/gdium/machdep.c:1.6 --- src/sys/arch/evbmips/gdium/machdep.c:1.5 Tue Aug 11 02:35:15 2009 +++ src/sys/arch/evbmips/gdium/machdep.c Tue Aug 11 03:56:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.5 2009/08/11 02:35:15 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.6 2009/08/11 03:56:34 cliff Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2009/08/11 02:35:15 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2009/08/11 03:56:34 cliff Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -250,8 +250,11 @@ struct gdium_config *gc = &gdium_configuration; void *kernend, *v; u_long first, last; +#ifdef NOTYET char *cp; - int i, howto; + int howto; +#endif + int i; psize_t memsize; extern char edata[], end[]; @@ -355,6 +358,7 @@ * Look at arguments passed to us and compute boothowto. */ boothowto = RB_AUTOBOOT; +#ifdef NOTYET for (i = 1; i < argc; i++) { for (cp = argv[i]; *cp; cp++) { /* Ignore superfluous '-', if there is one */ @@ -369,6 +373,7 @@ boothowto |= howto; } } +#endif /* * Load the rest of the available pages into the VM system.
CVS commit: src/sys/arch/algor/conf
Module Name:src Committed By: matt Date: Tue Aug 11 03:37:26 UTC 2009 Modified Files: src/sys/arch/algor/conf: files.algor Log Message: Use arch/mips/files.bonito To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/algor/conf/files.algor Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/algor/conf/files.algor diff -u src/sys/arch/algor/conf/files.algor:1.24 src/sys/arch/algor/conf/files.algor:1.25 --- src/sys/arch/algor/conf/files.algor:1.24 Wed Feb 20 21:43:33 2008 +++ src/sys/arch/algor/conf/files.algor Tue Aug 11 03:37:26 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.algor,v 1.24 2008/02/20 21:43:33 drochner Exp $ +# $NetBSD: files.algor,v 1.25 2009/08/11 03:37:26 matt Exp $ # Algorithmics evaluation board specific configuration info. @@ -101,11 +101,7 @@ attach vtpbc at mainbus with vtpbc_mainbus file arch/algor/dev/vtpbc_mainbus.c vtpbc_mainbus -device bonito: pcibus -file arch/mips/bonito/bonito_pci.c bonito -file arch/mips/bonito/bonito_iobc.c bonito - -attach bonito at mainbus with bonito_mainbus +include "arch/mips/conf/files.bonito" file arch/algor/dev/bonito_mainbus.c bonito_mainbus device pcib: isabus
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Tue Aug 11 02:38:30 UTC 2009 Modified Files: src/sys/arch/mips/mips: cache.c Log Message: Fix loongson2 sdcache init. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mips/mips/cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.41 src/sys/arch/mips/mips/cache.c:1.42 --- src/sys/arch/mips/mips/cache.c:1.41 Tue Aug 11 00:34:29 2009 +++ src/sys/arch/mips/mips/cache.c Tue Aug 11 02:38:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.41 2009/08/11 00:34:29 matt Exp $ */ +/* $NetBSD: cache.c,v 1.42 2009/08/11 02:38:30 matt Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.41 2009/08/11 00:34:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.42 2009/08/11 02:38:30 matt Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -661,7 +661,7 @@ mips3_get_cache_config(csizebase); - mips_sdcache_size = 0; /* don't trust config reg */ + mips_sdcache_line_size = 32; /* don't trust config reg */ if (mips_picache_size / mips_picache_ways > PAGE_SIZE || mips_pdcache_size / mips_pdcache_ways > PAGE_SIZE) @@ -840,7 +840,6 @@ case MIPS_LOONGSON2: mips_sdcache_ways = 4; mips_sdcache_size = 512*1024; - mips_sdcache_line_size = 32; mips_scache_unified = 1; mips_cache_ops.mco_sdcache_wbinv_all =
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: matt Date: Tue Aug 11 02:37:29 UTC 2009 Modified Files: src/sys/arch/evbmips/evbmips: cpu.c Log Message: Use aprint_normal To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbmips/evbmips/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/evbmips/cpu.c diff -u src/sys/arch/evbmips/evbmips/cpu.c:1.1 src/sys/arch/evbmips/evbmips/cpu.c:1.2 --- src/sys/arch/evbmips/evbmips/cpu.c:1.1 Sun Aug 2 17:12:29 2009 +++ src/sys/arch/evbmips/evbmips/cpu.c Tue Aug 11 02:37:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.1 2009/08/02 17:12:29 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.2 2009/08/11 02:37:29 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1 2009/08/02 17:12:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2009/08/11 02:37:29 matt Exp $"); #include #include @@ -61,11 +61,11 @@ { struct cpu_info * const ci = curcpu(); - printf(": %lu.%02luMHz (hz cycles = %lu, delay divisor = %lu)\n", + aprint_normal(": %lu.%02luMHz (hz cycles = %lu, delay divisor = %lu)\n", ci->ci_cpu_freq / 100, (ci->ci_cpu_freq % 100) / 1, ci->ci_cycles_per_hz, ci->ci_divisor_delay); - printf("%s: ", device_xname(self)); + aprint_normal("%s: ", device_xname(self)); cpu_identify(); }
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Aug 11 02:36:43 UTC 2009 Modified Files: src/sys/arch/evbmips/conf: GDIUM Log Message: Enable DIAGNOSTIC Add cpu0 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/conf/GDIUM Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/conf/GDIUM diff -u src/sys/arch/evbmips/conf/GDIUM:1.4 src/sys/arch/evbmips/conf/GDIUM:1.5 --- src/sys/arch/evbmips/conf/GDIUM:1.4 Sun Aug 9 22:25:41 2009 +++ src/sys/arch/evbmips/conf/GDIUM Tue Aug 11 02:36:43 2009 @@ -1,4 +1,4 @@ -# $NetBSD: GDIUM,v 1.4 2009/08/09 22:25:41 matt Exp $ +# $NetBSD: GDIUM,v 1.5 2009/08/11 02:36:43 matt Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GDIUM-$Revision: 1.4 $" +#ident "GDIUM-$Revision: 1.5 $" maxusers 16 @@ -33,7 +33,7 @@ #options DDB_ONPANIC=0 # don't enter debugger on panic options DDB_HISTORY_SIZE=512 # enable history editing in DDB #options KGDB # remote debugger -#options DIAGNOSTIC # extra kernel debugging checks +options DIAGNOSTIC # extra kernel debugging checks #options DEBUG # extra kernel debugging support makeoptions DEBUG="-g" options KTRACE # system call tracing support @@ -148,12 +148,14 @@ #options PCKBD_LAYOUT="(KB_US | KB_SWAPCTRLCAPS | KB_MACHDEP)" mainbus0 at root +cpu0 at mainbus0 bonito0 at mainbus0 pci0 at bonito0 #voyagerfb0 at pci0 dev ? function ? genfb0 at pci0 dev ? function ? wsdisplay0 at genfb0 ehci* at pci0 dev ? function ? +#options EHCI_DEBUG ohci* at pci0 dev ? function ? #options OHCI_DEBUG, USB_DEBUG, UHUB_DEBUG
CVS commit: src/sys/arch/evbmips/gdium
Module Name:src Committed By: matt Date: Tue Aug 11 02:35:15 UTC 2009 Modified Files: src/sys/arch/evbmips/gdium: machdep.c Log Message: Disable 2nd PCI Windows @ 8MB To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/gdium/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/gdium/machdep.c diff -u src/sys/arch/evbmips/gdium/machdep.c:1.4 src/sys/arch/evbmips/gdium/machdep.c:1.5 --- src/sys/arch/evbmips/gdium/machdep.c:1.4 Sat Aug 8 20:49:58 2009 +++ src/sys/arch/evbmips/gdium/machdep.c Tue Aug 11 02:35:15 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.4 2009/08/08 20:49:58 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.5 2009/08/11 02:35:15 matt Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2009/08/08 20:49:58 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2009/08/11 02:35:15 matt Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -225,6 +225,20 @@ * Set the mapreg. */ pci_conf_write(pba->pba_pc, ralink_dev, PCI_MAPREG_START, v); + +#if 0 + /* + * Why does linux do this? + */ + for (int dev = 15; dev <= 17; dev +=2) { + for (int func = 0; func <= 1; func++) { + pcitag_t usb_dev = pci_make_tag(pba->pba_pc, 0, dev, func); + v = pci_conf_read(pba->pba_pc, usb_dev, 0xe0); + v |= 3; + pci_conf_write(pba->pba_pc, usb_dev, 0xe0, v); + } + } +#endif } /* @@ -275,6 +289,13 @@ gdium_cnattach(gc); /* + * Disable the 2nd PCI window since we don't need it. + */ + REGVAL(BONITO_REGBASE + 0x158) = 0xe; + REGVAL(BONITO_REGBASE + 0x15c) = 0; + pci_conf_write(&gc->gc_pc, pci_make_tag(&gc->gc_pc, 0, 0, 0), 18, 0); + + /* * Get the timer from PMON. */ for (i = 0; envp[i] != NULL; i++) { @@ -305,7 +326,6 @@ #ifdef DEBUG printf("Timer calibration: %lu cycles/sec\n", curcpu()->ci_cpu_freq); - delay(100); #endif #if NCOM > 0
CVS commit: src/sys/arch/evbmips/gdium
Module Name:src Committed By: matt Date: Tue Aug 11 02:32:38 UTC 2009 Modified Files: src/sys/arch/evbmips/gdium: mainbus.c Log Message: Fix mainbus_print and don't pass a NULL name. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/gdium/mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/gdium/mainbus.c diff -u src/sys/arch/evbmips/gdium/mainbus.c:1.2 src/sys/arch/evbmips/gdium/mainbus.c:1.3 --- src/sys/arch/evbmips/gdium/mainbus.c:1.2 Thu Aug 6 16:37:01 2009 +++ src/sys/arch/evbmips/gdium/mainbus.c Tue Aug 11 02:32:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.2 2009/08/06 16:37:01 matt Exp $ */ +/* $NetBSD: mainbus.c,v 1.3 2009/08/11 02:32:38 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2009/08/06 16:37:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2009/08/11 02:32:38 matt Exp $"); #include "opt_pci.h" @@ -79,7 +79,6 @@ "i2c", "gpio", #endif - NULL, }; static int @@ -118,7 +117,7 @@ for (i = 0; i < __arraycount(mainbusdevs); i++) { struct mainbus_attach_args maa; maa.maa_name = mainbusdevs[i]; - (void) config_found_ia(self, "mainbus", &maa, mainbus_print); + (void) config_found(self, &maa, mainbus_print); } } @@ -127,9 +126,6 @@ { struct mainbus_attach_args *maa = aux; - if (pnp != 0) - return QUIET; - if (pnp) aprint_normal("%s at %s", maa->maa_name, pnp);
CVS commit: src/sys/arch/mips
Module Name:src Committed By: matt Date: Tue Aug 11 00:34:29 UTC 2009 Modified Files: src/sys/arch/mips/include: cache_ls2.h src/sys/arch/mips/mips: cache.c cache_ls2.c Log Message: Flush by increasing way, then increasing addr. flush L1 before L2 (even though according to the specification it should be needed). Reset mips_sdcache_size to 0 so we will configure it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/include/cache_ls2.h cvs rdiff -u -r1.40 -r1.41 src/sys/arch/mips/mips/cache.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/mips/cache_ls2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cache_ls2.h diff -u src/sys/arch/mips/include/cache_ls2.h:1.1 src/sys/arch/mips/include/cache_ls2.h:1.2 --- src/sys/arch/mips/include/cache_ls2.h:1.1 Fri Aug 7 18:39:10 2009 +++ src/sys/arch/mips/include/cache_ls2.h Tue Aug 11 00:34:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_ls2.h,v 1.1 2009/08/07 18:39:10 matt Exp $ */ +/* $NetBSD: cache_ls2.h,v 1.2 2009/08/11 00:34:29 matt Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -51,22 +51,22 @@ #define cache_op_ls2_8line_4way(va, op) \ __asm volatile( \ ".set noreorder \n\t" \ -"cache %1, 0x00(%0); cache %1, 0x01(%0) \n\t" \ -"cache %1, 0x02(%0); cache %1, 0x03(%0) \n\t" \ -"cache %1, 0x20(%0); cache %1, 0x21(%0) \n\t" \ -"cache %1, 0x22(%0); cache %1, 0x23(%0) \n\t" \ -"cache %1, 0x40(%0); cache %1, 0x41(%0) \n\t" \ -"cache %1, 0x42(%0); cache %1, 0x43(%0) \n\t" \ -"cache %1, 0x60(%0); cache %1, 0x61(%0) \n\t" \ -"cache %1, 0x62(%0); cache %1, 0x63(%0) \n\t" \ -"cache %1, 0x80(%0); cache %1, 0x81(%0) \n\t" \ -"cache %1, 0x82(%0); cache %1, 0x83(%0) \n\t" \ -"cache %1, 0xa0(%0); cache %1, 0xa1(%0) \n\t" \ -"cache %1, 0xa2(%0); cache %1, 0xa3(%0) \n\t" \ -"cache %1, 0xc0(%0); cache %1, 0xc1(%0) \n\t" \ -"cache %1, 0xc2(%0); cache %1, 0xc3(%0) \n\t" \ -"cache %1, 0xe0(%0); cache %1, 0xe1(%0) \n\t" \ -"cache %1, 0xe2(%0); cache %1, 0xe3(%0) \n\t" \ +"cache %1, 0x00(%0); cache %1, 0x20(%0) \n\t" \ +"cache %1, 0x40(%0); cache %1, 0x60(%0) \n\t" \ +"cache %1, 0x80(%0); cache %1, 0xa0(%0) \n\t" \ +"cache %1, 0xc0(%0); cache %1, 0xe0(%0) \n\t" \ +"cache %1, 0x01(%0); cache %1, 0x21(%0) \n\t" \ +"cache %1, 0x41(%0); cache %1, 0x61(%0) \n\t" \ +"cache %1, 0x81(%0); cache %1, 0xa1(%0) \n\t" \ +"cache %1, 0xc1(%0); cache %1, 0xe1(%0) \n\t" \ +"cache %1, 0x02(%0); cache %1, 0x22(%0) \n\t" \ +"cache %1, 0x42(%0); cache %1, 0x62(%0) \n\t" \ +"cache %1, 0x82(%0); cache %1, 0xa2(%0) \n\t" \ +"cache %1, 0xc2(%0); cache %1, 0xe2(%0) \n\t" \ +"cache %1, 0x03(%0); cache %1, 0x23(%0) \n\t" \ +"cache %1, 0x43(%0); cache %1, 0x63(%0) \n\t" \ +"cache %1, 0x83(%0); cache %1, 0xa3(%0) \n\t" \ +"cache %1, 0xc3(%0); cache %1, 0xe3(%0) \n\t" \ ".set reorder" \ :\ : "r" (va), "i" (op) \ Index: src/sys/arch/mips/mips/cache.c diff -u src/sys/arch/mips/mips/cache.c:1.40 src/sys/arch/mips/mips/cache.c:1.41 --- src/sys/arch/mips/mips/cache.c:1.40 Sun Aug 9 04:05:03 2009 +++ src/sys/arch/mips/mips/cache.c Tue Aug 11 00:34:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cache.c,v 1.40 2009/08/09 04:05:03 matt Exp $ */ +/* $NetBSD: cache.c,v 1.41 2009/08/11 00:34:29 matt Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.40 2009/08/09 04:05:03 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cache.c,v 1.41 2009/08/11 00:34:29 matt Exp $"); #include "opt_cputype.h" #include "opt_mips_cache.h" @@ -661,6 +661,8 @@ mips3_get_cache_config(csizebase); + mips_sdcache_size = 0; /* don't trust config reg */ + if (mips_picache_size / mips_picache_ways > PAGE_SIZE || mips_pdcache_size / mips_pdcache_ways > PAGE_SIZE) mips_cache_virtual_alias = 1; Index: src/sys/arch/mips/mips/cache_ls2.c diff -u src/sys/arch/mips/mips/cache_ls2.c:1.2 src/sys/arch/mips/mips/cache_ls2.c:1.3 --- src/sys/arch/mips/mips/cache_ls2.c:1.2 Fri Aug 7 23:23:58 2009 +++ src/sys/arch/mips/mips/cache_ls2.c Tue Aug 11 00:34:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cache_ls2.c,v 1.2 2009/08/07 23:23:58 matt Exp $ */ +/* $NetBSD: cache_ls2.c,v 1.3 2009/08/11 00:34:29 matt Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation,
CVS commit: src/sys/uvm
Module Name:src Committed By: haad Date: Mon Aug 10 23:17:29 UTC 2009 Modified Files: src/sys/uvm: uvm_extern.h uvm_page.c uvm_pdaemon.c Log Message: Add uvm_reclaim_hooks support for reclaiming kernel KVA space and memory. This is used only by zfs where uvm_reclaim hook is added from arc cache. Oked a...@. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.145 -r1.146 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.97 -r1.98 src/sys/uvm/uvm_pdaemon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.157 src/sys/uvm/uvm_extern.h:1.158 --- src/sys/uvm/uvm_extern.h:1.157 Wed Aug 5 14:11:32 2009 +++ src/sys/uvm/uvm_extern.h Mon Aug 10 23:17:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.157 2009/08/05 14:11:32 pooka Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.158 2009/08/10 23:17:29 haad Exp $ */ /* * @@ -534,6 +534,19 @@ #define UVM_COREDUMP_STACK 0x01 /* region is user stack */ /* + * Structure containig uvm reclaim hooks, uvm_reclaim_list is guarded by + * uvm_reclaim_lock. + */ +struct uvm_reclaim_hook { + void (*uvm_reclaim_hook)(void); + SLIST_ENTRY(uvm_reclaim_hook) uvm_reclaim_next; +}; + +voiduvm_reclaim_init(void); +void uvm_reclaim_hook_add(struct uvm_reclaim_hook *); +voiduvm_reclaim_hook_del(struct uvm_reclaim_hook *); + +/* * the various kernel maps, owned by MD code */ extern struct vm_map *kernel_map; Index: src/sys/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.145 src/sys/uvm/uvm_page.c:1.146 --- src/sys/uvm/uvm_page.c:1.145 Thu Mar 12 12:55:16 2009 +++ src/sys/uvm/uvm_page.c Mon Aug 10 23:17:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.145 2009/03/12 12:55:16 abs Exp $ */ +/* $NetBSD: uvm_page.c,v 1.146 2009/08/10 23:17:29 haad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.145 2009/03/12 12:55:16 abs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.146 2009/08/10 23:17:29 haad Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -116,6 +116,9 @@ */ int vm_page_reserve_kernel = 5; +/* Physical memory size */ +uintptr_t physmem; + /* * local variables */ @@ -349,6 +352,7 @@ */ curcpu()->ci_data.cpu_uvm = &uvm.cpus[0]; + uvm_reclaim_init(); uvmpdpol_init(); mutex_init(&uvm_pageqlock, MUTEX_DRIVER, IPL_NONE); mutex_init(&uvm_fpageqlock, MUTEX_DRIVER, IPL_VM); Index: src/sys/uvm/uvm_pdaemon.c diff -u src/sys/uvm/uvm_pdaemon.c:1.97 src/sys/uvm/uvm_pdaemon.c:1.98 --- src/sys/uvm/uvm_pdaemon.c:1.97 Sat Dec 13 11:26:57 2008 +++ src/sys/uvm/uvm_pdaemon.c Mon Aug 10 23:17:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pdaemon.c,v 1.97 2008/12/13 11:26:57 ad Exp $ */ +/* $NetBSD: uvm_pdaemon.c,v 1.98 2009/08/10 23:17:29 haad Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.97 2008/12/13 11:26:57 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.98 2009/08/10 23:17:29 haad Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -114,6 +114,11 @@ */ u_int uvm_extrapages; +static kmutex_t uvm_reclaim_lock; + +SLIST_HEAD(uvm_reclaim_hooks, uvm_reclaim_hook) uvm_reclaim_list; + + /* * uvm_wait: wait (sleep) for the page daemon to free some pages * @@ -233,6 +238,8 @@ int extrapages = 0; struct pool *pp; uint64_t where; + struct uvm_reclaim_hook *hook; + UVMHIST_FUNC("uvm_pageout"); UVMHIST_CALLED(pdhist); UVMHIST_LOG(pdhist,"", 0, 0, 0, 0); @@ -340,6 +347,13 @@ buf_drain(bufcnt << PAGE_SHIFT); mutex_exit(&bufcache_lock); + mutex_enter(&uvm_reclaim_lock); + SLIST_FOREACH(hook, &uvm_reclaim_list, uvm_reclaim_next) { + (*hook->uvm_reclaim_hook)(); + } + mutex_exit(&uvm_reclaim_lock); + + /* * complete draining the pools. */ @@ -1039,3 +1053,45 @@ uvmpdpol_estimatepageable(active, inactive); } + +void +uvm_reclaim_init(void) +{ + + /* Initialize UVM reclaim hooks. */ + mutex_init(&uvm_reclaim_lock, MUTEX_DEFAULT, IPL_NONE); + SLIST_INIT(&uvm_reclaim_list); + +} + +void +uvm_reclaim_hook_add(struct uvm_reclaim_hook *hook) +{ + + KASSERT(hook != NULL); + + mutex_enter(&uvm_reclaim_lock); + SLIST_INSERT_HEAD(&uvm_reclaim_list, hook, uvm_reclaim_next); + mutex_exit(&uvm_reclaim_lock); +} + +void +uvm_reclaim_hook_del(struct uvm_reclaim_hook *hook_entry) +{ + struct uvm_reclaim_hook *hook; + + KASSERT(hook_entry != NULL); + + mutex_enter(&uvm_reclaim_lock); + SLIST_FOREACH(hook, &uvm_reclaim_list, uvm_reclaim_next) { + if (hook != hook_entry) { + continue; + } + + SLIST_REMOVE(&uvm_reclaim_list, hook, uvm_reclaim_hook, + uvm_reclaim_next); + break; + } + + mutex_exit(&uvm_reclaim_lock); +}
CVS commit: src/sys/arch/arm/xscale
Module Name:src Committed By: kiyohara Date: Mon Aug 10 23:08:12 UTC 2009 Modified Files: src/sys/arch/arm/xscale: pxa2x0_ohci.c Log Message: Remove unused variable powman_ioh. It is used in GUMSTIX ohci patch. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/xscale/pxa2x0_ohci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/xscale/pxa2x0_ohci.c diff -u src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.6 src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.7 --- src/sys/arch/arm/xscale/pxa2x0_ohci.c:1.6 Sun Aug 9 06:12:34 2009 +++ src/sys/arch/arm/xscale/pxa2x0_ohci.c Mon Aug 10 23:08:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pxa2x0_ohci.c,v 1.6 2009/08/09 06:12:34 kiyohara Exp $ */ +/* $NetBSD: pxa2x0_ohci.c,v 1.7 2009/08/10 23:08:12 kiyohara Exp $ */ /* $OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */ /* @@ -70,7 +70,6 @@ { struct pxaohci_softc *sc = device_private(self); struct pxaip_attach_args *pxa = aux; - bus_space_handle_t powman_ioh; usbd_status r; #ifdef USB_DEBUG
CVS commit: src/sys/modules/solaris
Module Name:src Committed By: haad Date: Mon Aug 10 22:55:08 UTC 2009 Modified Files: src/sys/modules/solaris: Makefile Log Message: Enable taskq which was disabled during testing. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/modules/solaris/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/solaris/Makefile diff -u src/sys/modules/solaris/Makefile:1.2 src/sys/modules/solaris/Makefile:1.3 --- src/sys/modules/solaris/Makefile:1.2 Mon Aug 10 22:38:59 2009 +++ src/sys/modules/solaris/Makefile Mon Aug 10 22:55:08 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/08/10 22:38:59 haad Exp $ +# $NetBSD: Makefile,v 1.3 2009/08/10 22:55:08 haad Exp $ .include "../Makefile.inc" @@ -62,7 +62,7 @@ SRCS+= ddi.c SRCS+= mod.c SRCS+= printf.c -#SRCS+= taskq.c +SRCS+= taskq.c SRCS+= vfs.c WARNS= 0
CVS commit: src/external/cddl/osnet/dist/uts/common/sys
Module Name:src Committed By: haad Date: Mon Aug 10 22:47:09 UTC 2009 Added Files: src/external/cddl/osnet/dist/uts/common/sys: priv_names.h Log Message: Add missing header file. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 \ src/external/cddl/osnet/dist/uts/common/sys/priv_names.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/cddl/osnet/dist/uts/common/sys/priv_names.h diff -u /dev/null src/external/cddl/osnet/dist/uts/common/sys/priv_names.h:1.1 --- /dev/null Mon Aug 10 22:47:09 2009 +++ src/external/cddl/osnet/dist/uts/common/sys/priv_names.h Mon Aug 10 22:47:09 2009 @@ -0,0 +1,681 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Privilege constant definitions. Privileges and privilege sets + * are only known by name and should be mapped at runtime. + * + * THIS FILE WAS GENERATED; DO NOT EDIT + */ + + +#ifndef _SYS_PRIV_NAMES_H +#define _SYS_PRIV_NAMES_H + + + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __PRIV_CONST_IMPL +/* + * Privilege names + */ +/* + * Allows a process to request critical events without limitation. + * Allows a process to request reliable delivery of all events on + * any event queue. + */ +#define PRIV_CONTRACT_EVENT ((const char *)"contract_event") + +/* + * Allows a process to set the service FMRI value of a process + * contract template. + */ +#define PRIV_CONTRACT_IDENTITY ((const char *)"contract_identity") + +/* + * Allows a process to observe contract events generated by + * contracts created and owned by users other than the process's + * effective user ID. + * Allows a process to open contract event endpoints belonging to + * contracts created and owned by users other than the process's + * effective user ID. + */ +#define PRIV_CONTRACT_OBSERVER ((const char *)"contract_observer") + +/* + * Allow a process to access per-CPU hardware performance counters. + */ +#define PRIV_CPC_CPU ((const char *)"cpc_cpu") + +/* + * Allows DTrace kernel-level tracing. + */ +#define PRIV_DTRACE_KERNEL ((const char *)"dtrace_kernel") + +/* + * Allows DTrace process-level tracing. + * Allows process-level tracing probes to be placed and enabled in + * processes to which the user has permissions. + */ +#define PRIV_DTRACE_PROC ((const char *)"dtrace_proc") + +/* + * Allows DTrace user-level tracing. + * Allows use of the syscall and profile DTrace providers to + * examine processes to which the user has permissions. + */ +#define PRIV_DTRACE_USER ((const char *)"dtrace_user") + +/* + * Allows a process to change a file's owner user ID. + * Allows a process to change a file's group ID to one other than + * the process' effective group ID or one of the process' + * supplemental group IDs. + */ +#define PRIV_FILE_CHOWN ((const char *)"file_chown") + +/* + * Allows a process to give away its files; a process with this + * privilege will run as if {_POSIX_CHOWN_RESTRICTED} is not + * in effect. + */ +#define PRIV_FILE_CHOWN_SELF ((const char *)"file_chown_self") + +/* + * Allows a process to execute an executable file whose permission + * bits or ACL do not allow the process execute permission. + */ +#define PRIV_FILE_DAC_EXECUTE ((const char *)"file_dac_execute") + +/* + * Allows a process to read a file or directory whose permission + * bits or ACL do not allow the process read permission. + */ +#define PRIV_FILE_DAC_READ ((const char *)"file_dac_read") + +/* + * Allows a process to search a directory whose permission bits or + * ACL do not allow the process search permission. + */ +#define PRIV_FILE_DAC_SEARCH ((const char *)"file_dac_search") + +/* + * Allows a process to write a file or directory whose permission + * bits or ACL do not allow the process write permission. + * In order to write files owned by uid 0 in the absence of an + * effective uid of 0 ALL privileges are required. + */ +#define PRIV_FILE_DAC_WRITE ((const char *)"file_dac_write") + +/* + * Allows a process to set the sensitivity label of a file or + * directory to a sensitivit
CVS commit: src/external/cddl/osnet/lib/libzfs
Module Name:src Committed By: haad Date: Mon Aug 10 22:44:41 UTC 2009 Modified Files: src/external/cddl/osnet/lib/libzfs: fsshare.c Log Message: Rename getline to zgetline to avoid clashes with NetBSD getline. Problem found by za...@. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/lib/libzfs/fsshare.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/lib/libzfs/fsshare.c diff -u src/external/cddl/osnet/lib/libzfs/fsshare.c:1.1 src/external/cddl/osnet/lib/libzfs/fsshare.c:1.2 --- src/external/cddl/osnet/lib/libzfs/fsshare.c:1.1 Fri Aug 7 20:57:56 2009 +++ src/external/cddl/osnet/lib/libzfs/fsshare.c Mon Aug 10 22:44:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fsshare.c,v 1.1 2009/08/07 20:57:56 haad Exp $ */ +/* $NetBSD: fsshare.c,v 1.2 2009/08/10 22:44:41 haad Exp $ */ /*- * Copyright (c) 2007 Pawel Jakub Dawidek @@ -28,7 +28,7 @@ #include /* __FBSDID("$FreeBSD: src/compat/opensolaris/misc/fsshare.c,v 1.2 2007/04/21 13:17:23 pjd Exp $"); */ -__RCSID("$NetBSD: fsshare.c,v 1.1 2009/08/07 20:57:56 haad Exp $"); +__RCSID("$NetBSD: fsshare.c,v 1.2 2009/08/10 22:44:41 haad Exp $"); #include #include @@ -65,7 +65,7 @@ * mountpoint specified in the 'skip' argument. */ static char * -getline(FILE *fd, const char *skip) +zgetline(FILE *fd, const char *skip) { static char line[MAXLINESIZE]; size_t len, skiplen; @@ -196,7 +196,7 @@ /* Place big, fat warning at the begining of the file. */ fprintf(newfd, "%s", FILE_HEADER); - while (oldfd != NULL && (line = getline(oldfd, mountpoint)) != NULL) + while (oldfd != NULL && (line = zgetline(oldfd, mountpoint)) != NULL) fprintf(newfd, "%s\n", line); if (oldfd != NULL && ferror(oldfd) != 0) { error = ferror(oldfd);
CVS commit: src/external/cddl/osnet/sys/kern
Module Name:src Committed By: haad Date: Mon Aug 10 22:41:51 UTC 2009 Modified Files: src/external/cddl/osnet/sys/kern: ddi.c Log Message: Fix number of arguments passed to do_sys_mkdir. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/cddl/osnet/sys/kern/ddi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/sys/kern/ddi.c diff -u src/external/cddl/osnet/sys/kern/ddi.c:1.1 src/external/cddl/osnet/sys/kern/ddi.c:1.2 --- src/external/cddl/osnet/sys/kern/ddi.c:1.1 Fri Aug 7 20:57:57 2009 +++ src/external/cddl/osnet/sys/kern/ddi.c Mon Aug 10 22:41:51 2009 @@ -105,7 +105,7 @@ break; strlcpy(here, path, e - path + 1); - error = do_sys_mkdir(l, (const char *)here, mode, &ret, UIO_SYSSPACE); + error = do_sys_mkdir((const char *)here, mode, UIO_SYSSPACE); } PNBUF_PUT(here);
CVS commit: src/sys/modules/zfs
Module Name:src Committed By: haad Date: Mon Aug 10 22:39:38 UTC 2009 Modified Files: src/sys/modules/zfs: Makefile Log Message: Remove strange looking -I entries. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/zfs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/zfs/Makefile diff -u src/sys/modules/zfs/Makefile:1.1 src/sys/modules/zfs/Makefile:1.2 --- src/sys/modules/zfs/Makefile:1.1 Mon Aug 10 07:16:06 2009 +++ src/sys/modules/zfs/Makefile Mon Aug 10 22:39:38 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/08/10 07:16:06 haad Exp $ +# $NetBSD: Makefile,v 1.2 2009/08/10 22:39:38 haad Exp $ .include "../Makefile.inc" @@ -112,8 +112,6 @@ CWARNFLAGS+= -Wno-missing-prototypes CWARNFLAGS+= -Wno-format -CPPFLAGS+= -I${.CURDIR}/../.. -CPPFLAGS+= -I${.CURDIR}/../../../../include CPPFLAGS+= -I${ZFSDIR}/sys CPPFLAGS+= -I${ZFSDIR}/dist/common/acl CPPFLAGS+= -I${ZFSDIR}/dist/common/zfs @@ -123,7 +121,7 @@ CPPFLAGS+= -I${ZFSDIR}/dist/uts/common/zfs CPPFLAGS+= -I${ZFSDIR}/dist/uts/common -CPPFLAGS+= -Dcaddr_t=__caddr_t "-D__va_list=va_list" +CPPFLAGS+= -Dcaddr_t=__caddr_t "-D__va_list=va_list" -D__NetBSD__ CPPFLAGS+= -std=c99 CPPFLAGS+= -D_NFS_NFS_H_ CPPFLAGS+= -D_PROPLIB_ZFS_CONFLICT
CVS commit: src/sys/modules/solaris
Module Name:src Committed By: haad Date: Mon Aug 10 22:38:59 UTC 2009 Modified Files: src/sys/modules/solaris: Makefile Log Message: Remove strange looking -I entries. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/modules/solaris/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/solaris/Makefile diff -u src/sys/modules/solaris/Makefile:1.1 src/sys/modules/solaris/Makefile:1.2 --- src/sys/modules/solaris/Makefile:1.1 Mon Aug 10 07:16:06 2009 +++ src/sys/modules/solaris/Makefile Mon Aug 10 22:38:59 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/08/10 07:16:06 haad Exp $ +# $NetBSD: Makefile,v 1.2 2009/08/10 22:38:59 haad Exp $ .include "../Makefile.inc" @@ -62,7 +62,7 @@ SRCS+= ddi.c SRCS+= mod.c SRCS+= printf.c -SRCS+= taskq.c +#SRCS+= taskq.c SRCS+= vfs.c WARNS= 0 @@ -79,8 +79,6 @@ CWARNFLAGS+= -Wno-missing-prototypes CWARNFLAGS+= -Wno-format -CPPFLAGS+= -I${.CURDIR}/../.. -CPPFLAGS+= -I${.CURDIR}/../../../../include CPPFLAGS+= -I${ZFSDIR}/sys CPPFLAGS+= -I${ZFSDIR}/dist/common/acl CPPFLAGS+= -I${ZFSDIR}/dist/uts/common/zmod
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: haad Date: Mon Aug 10 22:38:02 UTC 2009 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: arc.c dmu.c spa_history.c zfs_dir.c zfs_vfsops.c src/external/cddl/osnet/dist/uts/common/fs/zfs/sys: vdev_disk.h zfs_znode.h zvol.h Log Message: Add some NetBSD fixes which I have forgot to commit during first round. With these patches I can build solaris and zfs module again. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c \ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/vdev_disk.h \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zvol.h cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/sys/zfs_znode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.3 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c:1.2 Fri Aug 7 20:16:45 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Mon Aug 10 22:38:02 2009 @@ -133,6 +133,42 @@ #include #include +#ifdef __NetBSD__ +#include +#define btop(x) ((x) / PAGE_SIZE) +#define needfree (uvmexp.free < uvmexp.freetarg ? uvmexp.freetarg : 0) +#define buf_init arc_buf_init +#define freemem uvmexp.free +#define minfree uvmexp.freemin +#define desfree uvmexp.freetarg +#define lotsfree (desfree * 2) +#define availrmem desfree +#define swapfs_minfree 0 +#define swapfs_reserve 0 +#undef curproc +#define curproc curlwp +#define proc_pageout uvm.pagedaemon_lwp + +#define heap_arena kernel_map +#define VMEM_ALLOC 1 +#define VMEM_FREE 2 +static inline size_t +vmem_size(struct vm_map *map, int flag) +{ + switch (flag) { + case VMEM_ALLOC: + return map->size; + case VMEM_FREE: + return vm_map_max(map) - vm_map_min(map) - map->size; + case VMEM_FREE|VMEM_ALLOC: + return vm_map_max(map) - vm_map_min(map); + default: + panic("vmem_size"); + } +} +static void *zio_arena; +#endif /* __NetBSD__ */ + static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; @@ -3233,10 +3269,8 @@ static uint64_t page_load = 0; static uint64_t last_txg = 0; -#if defined(__i386) available_memory = MIN(available_memory, vmem_size(heap_arena, VMEM_FREE)); -#endif if (available_memory >= zfs_write_limit_max) return (0); Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.2 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.3 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.2 Fri Aug 7 20:16:45 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c Mon Aug 10 22:38:02 2009 @@ -35,7 +35,6 @@ #include #include #include -#include "fs/fs_subr.h" #include #include #include @@ -51,11 +50,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.1.1.1 src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c:1.1.1.1 Fri Aug 7 18:32:54 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dmu.c Mon Aug 10 22:38:02 2009 @@ -751,6 +751,7 @@ return (err); } +#ifndef __NetBSD__ int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, page_t *pp, dmu_tx_t *tx) @@ -808,6 +809,7 @@ dmu_buf_rele_array(dbp, numbufs, FTAG); return (err); } +#endif /* __NetBSD__ */ #endif typedef struct { Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c:1.1.1.1 src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c:1.2 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c:1.1.1.1 Fri Aug 7 18:33:07 2009 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c Mon Aug 10 22:38:02 2009 @@ -178,7 +178,7 @@ static char * spa_history_zone() { -#ifdef _KERNEL +#if defined(_KERNEL) && !defined(__NetBSD__) return (curproc->p_zone->zone_name); #else return ("global"); Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_dir.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Aug 10 22:36:37 UTC 2009 Modified Files: src/share/man/man9: kauth.9 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/share/man/man9/kauth.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/kauth.9 diff -u src/share/man/man9/kauth.9:1.87 src/share/man/man9/kauth.9:1.88 --- src/share/man/man9/kauth.9:1.87 Mon Aug 10 20:22:06 2009 +++ src/share/man/man9/kauth.9 Mon Aug 10 22:36:37 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: kauth.9,v 1.87 2009/08/10 20:22:06 plunky Exp $ +.\" $NetBSD: kauth.9,v 1.88 2009/08/10 22:36:37 wiz Exp $ .\" .\" Copyright (c) 2005, 2006 Elad Efrat .\" All rights reserved. @@ -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. .\" -.Dd May 7, 2009 +.Dd August 10, 2009 .Dt KAUTH 9 .Os .Sh NAME
CVS commit: src/sys/sys
Module Name:src Committed By: haad Date: Mon Aug 10 22:29:30 UTC 2009 Modified Files: src/sys/sys: unistd.h Log Message: Add _PC_ACL_EXTENDED and _PC_MIN_HOLE_SIZE which are needed by zfs. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/sys/unistd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/unistd.h diff -u src/sys/sys/unistd.h:1.48 src/sys/sys/unistd.h:1.49 --- src/sys/sys/unistd.h:1.48 Sat Aug 8 22:53:16 2009 +++ src/sys/sys/unistd.h Mon Aug 10 22:29:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: unistd.h,v 1.48 2009/08/08 22:53:16 christos Exp $ */ +/* $NetBSD: unistd.h,v 1.49 2009/08/10 22:29:29 haad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -162,6 +162,10 @@ #define _PC_FILESIZEBITS 11 #define _PC_SYMLINK_MAX 12 #define _PC_2_SYMLINKS 13 +#define _PC_ACL_EXTENDED14 + +/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */ +#define _PC_MIN_HOLE_SIZE 15 /* configurable system variables; use as argument to sysconf(3) */ /*
CVS commit: src/doc
Module Name:src Committed By: matt Date: Mon Aug 10 21:27:46 UTC 2009 Modified Files: src/doc: BRANCHES Log Message: Add matt-nb5-mips64 branch To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/doc/BRANCHES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BRANCHES diff -u src/doc/BRANCHES:1.283 src/doc/BRANCHES:1.284 --- src/doc/BRANCHES:1.283 Thu Jul 23 10:53:19 2009 +++ src/doc/BRANCHES Mon Aug 10 21:27:46 2009 @@ -1,4 +1,4 @@ -# $NetBSD: BRANCHES,v 1.283 2009/07/23 10:53:19 yamt Exp $ +# $NetBSD: BRANCHES,v 1.284 2009/08/10 21:27:46 matt Exp $ # # This file contains a list of branches that exist in the NetBSD CVS # tree and their current state. @@ -421,13 +421,23 @@ Branch: matt-mips64 Description: Rototill the mips code to support LP64 mips and N32/N64 ABIs -Status: Active +Status: Mostly dead Start Date: 2007-07-17 End Date: Base Tag: matt-mips64-base Maintainer: Matt Thomas Scope: kernel & userland -Notes: +Notes: + +Branch: matt-nb5-mips64 +Description: Rototill the mips code to support LP64 mips and N32/N64 ABIs +Status: Mostly dead +Start Date: 2009-08-01 +End Date: +Base Tag: netbsd-5-0-1-RELEASE +Maintainer: Matt Thomas +Scope: kernel & userland +Notes: Branch: mjf-devfs2 Description: device file system supporting dynamic device nodes
CVS commit: src
Module Name:src Committed By: plunky Date: Mon Aug 10 20:22:06 UTC 2009 Modified Files: src/share/man/man9: kauth.9 src/sys/netbt: hci_socket.c src/sys/secmodel/bsd44: secmodel_bsd44_suser.c src/sys/sys: kauth.h Log Message: reduce the number of KAUTH_DEVICE_BLUETOOTH_SEND/RECV requests by passing the packet type as an argument rather than having a different request for each type. (from a suggestion by mrg) To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/share/man/man9/kauth.9 cvs rdiff -u -r1.18 -r1.19 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.69 -r1.70 src/sys/secmodel/bsd44/secmodel_bsd44_suser.c cvs rdiff -u -r1.61 -r1.62 src/sys/sys/kauth.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/kauth.9 diff -u src/share/man/man9/kauth.9:1.86 src/share/man/man9/kauth.9:1.87 --- src/share/man/man9/kauth.9:1.86 Mon Aug 10 18:25:20 2009 +++ src/share/man/man9/kauth.9 Mon Aug 10 20:22:06 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: kauth.9,v 1.86 2009/08/10 18:25:20 plunky Exp $ +.\" $NetBSD: kauth.9,v 1.87 2009/08/10 20:22:06 plunky Exp $ .\" .\" Copyright (c) 2005, 2006 Elad Efrat .\" All rights reserved. @@ -978,23 +978,28 @@ .Xr btuart 4 device is allowed. .El -.It KAUTH_DEVICE_BLUETOOTH_RECV_COMMAND -Check if a command packet can be received from the device. -.Pp -.Ar arg0 -is the command opcode. -.It KAUTH_DEVICE_BLUETOOTH_RECV_DATA -Check if a data packet can be received from the device. +.It KAUTH_DEVICE_BLUETOOTH_RECV +Check if a packet can be received from the device. .Pp .Ar arg0 is the packet type. -.It KAUTH_DEVICE_BLUETOOTH_RECV_EVENT -Check if a event packet can be received from the device. -.Pp -.Ar arg0 -is the event ID. -.It KAUTH_DEVICE_BLUETOOTH_SEND_COMMAND -Check if a command packet can be sent to the device. +For +.Dv HCI_CMD_PKT +packets, +.Ar arg1 +is the opcode, for +.Dv HCI_EVENT_PKT +packets, +.Ar arg1 +is the event ID, and for +.Dv HCI_ACLDATA_PKT +or +.Dv HCI_SCODATA_PKT +packets, +.Ar arg1 +is the connection handle. +.It KAUTH_DEVICE_BLUETOOTH_SEND +Check if a packet can be sent to the device. .Pp .Ar arg0 is a @@ -1003,7 +1008,7 @@ .Ar arg1 is a .Ft hci_cmd_hdr_t * -describing the command packet header. +describing the packet header. .It KAUTH_DEVICE_BLUETOOTH_SETPRIV Check if privileged settings can be changed. .Pp Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.18 src/sys/netbt/hci_socket.c:1.19 --- src/sys/netbt/hci_socket.c:1.18 Mon Aug 10 18:25:20 2009 +++ src/sys/netbt/hci_socket.c Mon Aug 10 20:22:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.18 2009/08/10 18:25:20 plunky Exp $ */ +/* $NetBSD: hci_socket.c,v 1.19 2009/08/10 20:22:06 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.18 2009/08/10 18:25:20 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.19 2009/08/10 20:22:06 plunky Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -208,7 +208,7 @@ result = KAUTH_RESULT_DEFER; switch (action) { - case KAUTH_DEVICE_BLUETOOTH_SEND_COMMAND: { + case KAUTH_DEVICE_BLUETOOTH_SEND: { struct hci_unit *unit = (struct hci_unit *)arg0; hci_cmd_hdr_t *hdr = (hci_cmd_hdr_t *)arg1; @@ -217,6 +217,9 @@ * is correct and the unit claims to support it */ + if (hdr->type != HCI_CMD_PKT) + break; + for (i = 0; i < __arraycount(hci_cmds); i++) { if (hdr->opcode == hci_cmds[i].opcode && hdr->length == hci_cmds[i].length @@ -229,51 +232,62 @@ break; } - case KAUTH_DEVICE_BLUETOOTH_RECV_COMMAND: { - uint16_t opcode = (uint16_t)(uintptr_t)arg0; + case KAUTH_DEVICE_BLUETOOTH_RECV: + switch((uint8_t)(uintptr_t)arg0) { + case HCI_CMD_PKT: { + uint16_t opcode = (uint16_t)(uintptr_t)arg1; + + /* + * Allow to see any unprivileged command packet + */ + + for (i = 0; i < __arraycount(hci_cmds); i++) { +if (opcode == hci_cmds[i].opcode) { + result = KAUTH_RESULT_ALLOW; + break; +} + } - /* - * Allow to see any unprivileged command packet - */ + break; + } - for (i = 0; i < __arraycount(hci_cmds); i++) { - if (opcode == hci_cmds[i].opcode) { + case HCI_EVENT_PKT: { + uint8_t event = (uint8_t)(uintptr_t)arg1; + + /* + * Allow to receive most events + */ + + switch (event) { + case HCI_EVENT_RETURN_LINK_KEYS: + case HCI_EVENT_LINK_KEY_NOTIFICATION: + case HCI_EVENT_USER_CONFIRM_REQ: + case HCI_EVENT_USER_PASSKEY_NOTIFICATION: + case HCI_EVENT_VENDOR: +break; + + default: result = KAUTH_RESULT_ALLOW; break; } - } - - break; - } - case KAUTH_DEVICE_BLUETOOTH_RECV_EVENT: { - uint8_t event = (uint8_t)(uintptr_t)arg0; - - /* - * Allow to receive most events - */ + break; + } - switch (event) { - case HCI_EVENT_RETURN_LI
CVS commit: src
Module Name:src Committed By: plunky Date: Mon Aug 10 18:25:20 UTC 2009 Modified Files: src/share/man/man9: kauth.9 src/sys/netbt: bt_proto.c hci.h hci_socket.c src/sys/secmodel/bsd44: secmodel_bsd44_suser.c src/sys/sys: kauth.h Log Message: remove last usage of KAUTH_ISSUSER in bluetooth code by adding some requests to the device scope: KAUTH_DEVICE_BLUETOOTH_SEND_COMMAND KAUTH_DEVICE_BLUETOOTH_RECV_COMMAND KAUTH_DEVICE_BLUETOOTH_RECV_EVENT KAUTH_DEVICE_BLUETOOTH_RECV_DATA and a listener tied to the HCI protocol that will approve the basic minimum to be sent and received. handle the requests in the bsd44_suser listener by approving all when the credential is root. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/share/man/man9/kauth.9 cvs rdiff -u -r1.10 -r1.11 src/sys/netbt/bt_proto.c cvs rdiff -u -r1.29 -r1.30 src/sys/netbt/hci.h cvs rdiff -u -r1.17 -r1.18 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.68 -r1.69 src/sys/secmodel/bsd44/secmodel_bsd44_suser.c cvs rdiff -u -r1.60 -r1.61 src/sys/sys/kauth.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/kauth.9 diff -u src/share/man/man9/kauth.9:1.85 src/share/man/man9/kauth.9:1.86 --- src/share/man/man9/kauth.9:1.85 Fri May 8 21:52:20 2009 +++ src/share/man/man9/kauth.9 Mon Aug 10 18:25:20 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: kauth.9,v 1.85 2009/05/08 21:52:20 wiz Exp $ +.\" $NetBSD: kauth.9,v 1.86 2009/08/10 18:25:20 plunky Exp $ .\" .\" Copyright (c) 2005, 2006 Elad Efrat .\" All rights reserved. @@ -978,6 +978,32 @@ .Xr btuart 4 device is allowed. .El +.It KAUTH_DEVICE_BLUETOOTH_RECV_COMMAND +Check if a command packet can be received from the device. +.Pp +.Ar arg0 +is the command opcode. +.It KAUTH_DEVICE_BLUETOOTH_RECV_DATA +Check if a data packet can be received from the device. +.Pp +.Ar arg0 +is the packet type. +.It KAUTH_DEVICE_BLUETOOTH_RECV_EVENT +Check if a event packet can be received from the device. +.Pp +.Ar arg0 +is the event ID. +.It KAUTH_DEVICE_BLUETOOTH_SEND_COMMAND +Check if a command packet can be sent to the device. +.Pp +.Ar arg0 +is a +.Ft struct hci_unit * +describing the HCI unit, +.Ar arg1 +is a +.Ft hci_cmd_hdr_t * +describing the command packet header. .It KAUTH_DEVICE_BLUETOOTH_SETPRIV Check if privileged settings can be changed. .Pp Index: src/sys/netbt/bt_proto.c diff -u src/sys/netbt/bt_proto.c:1.10 src/sys/netbt/bt_proto.c:1.11 --- src/sys/netbt/bt_proto.c:1.10 Thu Apr 24 11:38:37 2008 +++ src/sys/netbt/bt_proto.c Mon Aug 10 18:25:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_proto.c,v 1.10 2008/04/24 11:38:37 ad Exp $ */ +/* $NetBSD: bt_proto.c,v 1.11 2009/08/10 18:25:20 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bt_proto.c,v 1.10 2008/04/24 11:38:37 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bt_proto.c,v 1.11 2009/08/10 18:25:20 plunky Exp $"); #include #include @@ -78,6 +78,7 @@ .pr_domain = &btdomain, .pr_protocol = BTPROTO_HCI, .pr_flags = (PR_ADDR | PR_ATOMIC), + .pr_init = hci_init, .pr_ctloutput = hci_ctloutput, .pr_usrreq = hci_usrreq, }, Index: src/sys/netbt/hci.h diff -u src/sys/netbt/hci.h:1.29 src/sys/netbt/hci.h:1.30 --- src/sys/netbt/hci.h:1.29 Thu May 14 15:34:38 2009 +++ src/sys/netbt/hci.h Mon Aug 10 18:25:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: hci.h,v 1.29 2009/05/14 15:34:38 plunky Exp $ */ +/* $NetBSD: hci.h,v 1.30 2009/08/10 18:25:20 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -54,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: hci.h,v 1.29 2009/05/14 15:34:38 plunky Exp $ + * $Id: hci.h,v 1.30 2009/08/10 18:25:20 plunky Exp $ * $FreeBSD: src/sys/netgraph/bluetooth/include/ng_hci.h,v 1.6 2005/01/07 01:45:43 imp Exp $ */ @@ -2543,6 +2543,7 @@ /* hci_socket.c */ void hci_drop(void *); +void hci_init(void); int hci_usrreq(struct socket *, int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *); int hci_ctloutput(int, struct socket *, struct sockopt *); void hci_mtap(struct mbuf *, struct hci_unit *); Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.17 src/sys/netbt/hci_socket.c:1.18 --- src/sys/netbt/hci_socket.c:1.17 Wed Aug 6 15:01:24 2008 +++ src/sys/netbt/hci_socket.c Mon Aug 10 18:25:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.17 2008/08/06 15:01:24 plunky Exp $ */ +/* $NetBSD: hci_socket.c,v 1.18 2009/08/10 18:25:20 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.17 2008/08/06 15:01:24 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.18 2009/08/10 18:25:20 plunky Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -64,6 +64,7 @
CVS commit: src/sys/compat/svr4_32
Module Name:src Committed By: rjs Date: Mon Aug 10 17:36:00 UTC 2009 Modified Files: src/sys/compat/svr4_32: svr4_32_misc.c Log Message: Add enum uio_seg argument to do_sys_mknod(). To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/compat/svr4_32/svr4_32_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/svr4_32/svr4_32_misc.c diff -u src/sys/compat/svr4_32/svr4_32_misc.c:1.64 src/sys/compat/svr4_32/svr4_32_misc.c:1.65 --- src/sys/compat/svr4_32/svr4_32_misc.c:1.64 Sun Jan 11 13:14:14 2009 +++ src/sys/compat/svr4_32/svr4_32_misc.c Mon Aug 10 17:36:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_misc.c,v 1.64 2009/01/11 13:14:14 nakayama Exp $ */ +/* $NetBSD: svr4_32_misc.c,v 1.65 2009/08/10 17:36:00 rjs Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.64 2009/01/11 13:14:14 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.65 2009/08/10 17:36:00 rjs Exp $"); #include #include @@ -535,7 +535,7 @@ SCARG(&ap, mode) = mode; return sys_mkfifo(l, &ap, retval); } else { - return do_sys_mknod(l, path, mode, dev, retval); + return do_sys_mknod(l, path, mode, dev, retval, UIO_USERSPACE); } }
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Mon Aug 10 16:50:18 UTC 2009 Modified Files: src/sys/uvm: uvm_glue.c Log Message: Revent change to printf. (why can't __func__ concat with other string?) To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.139 src/sys/uvm/uvm_glue.c:1.140 --- src/sys/uvm/uvm_glue.c:1.139 Sun Aug 9 22:19:09 2009 +++ src/sys/uvm/uvm_glue.c Mon Aug 10 16:50:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.139 2009/08/09 22:19:09 matt Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.140 2009/08/10 16:50:18 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.139 2009/08/09 22:19:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.140 2009/08/10 16:50:18 matt Exp $"); #include "opt_kgdb.h" #include "opt_kstack.h" @@ -742,7 +742,7 @@ l = outl2; #ifdef DEBUG if (swapdebug & SDB_SWAPOUT) - printf(__func__ ": no duds, try procp %p\n", l); + printf("%s: no duds, try procp %p\n", __func__, l); #endif if (l) { mutex_enter(&l->l_swaplock);
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Mon Aug 10 16:49:30 UTC 2009 Modified Files: src/sys/uvm: uvm_map.c Log Message: Compare vaddr_t against 0, not NULL. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/uvm/uvm_map.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_map.c diff -u src/sys/uvm/uvm_map.c:1.276 src/sys/uvm/uvm_map.c:1.277 --- src/sys/uvm/uvm_map.c:1.276 Sun Aug 9 22:13:07 2009 +++ src/sys/uvm/uvm_map.c Mon Aug 10 16:49:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_map.c,v 1.276 2009/08/09 22:13:07 matt Exp $ */ +/* $NetBSD: uvm_map.c,v 1.277 2009/08/10 16:49:30 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.276 2009/08/09 22:13:07 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.277 2009/08/10 16:49:30 matt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -4691,7 +4691,7 @@ #ifdef PMAP_MAP_POOLPAGE va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg)); - KASSERT(va != NULL); + KASSERT(va != 0); #else error = uvm_map_prepare(map, 0, PAGE_SIZE, NULL, UVM_UNKNOWN_OFFSET, 0, mapflags, &args);
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: martin Date: Mon Aug 10 12:04:17 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: pmap_stub.c Log Message: Use __sparc_v9__ instead of __sparc64__ - this hack is due to arch dependend pmap peculiarities, and does not cover sparc64 code when compiled with -m32. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpkern/pmap_stub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/pmap_stub.c diff -u src/sys/rump/librump/rumpkern/pmap_stub.c:1.16 src/sys/rump/librump/rumpkern/pmap_stub.c:1.17 --- src/sys/rump/librump/rumpkern/pmap_stub.c:1.16 Sun Aug 9 09:22:16 2009 +++ src/sys/rump/librump/rumpkern/pmap_stub.c Mon Aug 10 12:04:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_stub.c,v 1.16 2009/08/09 09:22:16 skrll Exp $ */ +/* $NetBSD: pmap_stub.c,v 1.17 2009/08/10 12:04:17 martin Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.16 2009/08/09 09:22:16 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_stub.c,v 1.17 2009/08/10 12:04:17 martin Exp $"); #include @@ -45,7 +45,7 @@ * specified with something else than a .h and autogenerated into C. */ -#if defined(__sparc__) && !defined(__sparc64__) +#if defined(__sparc__) && !defined(__sparc_v9__) #undef pmap_is_modified #undef pmap_clear_modify #undef pmap_kenter_pa @@ -258,7 +258,7 @@ } #endif -#if defined(__sparc__) && !defined(__sparc64__) +#if defined(__sparc__) && !defined(__sparc_v9__) bool (*pmap_clear_modify_p)(struct vm_page *) = pmap_clear_modify; bool (*pmap_is_modified_p)(struct vm_page *) = pmap_is_modified; void (*pmap_kenter_pa_p)(vaddr_t, paddr_t, vm_prot_t) = pmap_kenter_pa;
CVS commit: src/sys/conf
Module Name:src Committed By: simonb Date: Mon Aug 10 11:46:42 UTC 2009 Modified Files: src/sys/conf: std Log Message: Tab police. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/conf/std Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/std diff -u src/sys/conf/std:1.11 src/sys/conf/std:1.12 --- src/sys/conf/std:1.11 Sun Aug 9 21:58:03 2009 +++ src/sys/conf/std Mon Aug 10 11:46:42 2009 @@ -1,4 +1,4 @@ -# $NetBSD: std,v 1.11 2009/08/09 21:58:03 matt Exp $ +# $NetBSD: std,v 1.12 2009/08/10 11:46:42 simonb Exp $ # # standard MI 'options' # @@ -8,7 +8,7 @@ # the following options are on-by-default to keep # kernel config file compatibility. options VMSWAP # Swap device/file support -options VMSWAP_UAREA # Swap uarea's +options VMSWAP_UAREA # Swap uarea's options BUFQ_FCFS # First-come First-serve strategy options BUFQ_DISKSORT # Traditional min seek sort strategy options RFC2292 # Previous version of Adv. Sockets API for IPv6 @@ -20,7 +20,7 @@ # # Security model. # -options secmodel_bsd44 # Traditional 4.4BSD security model +options secmodel_bsd44 # Traditional 4.4BSD security model # # Scheduling algorithm
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: tteras Date: Mon Aug 10 08:22:13 UTC 2009 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: pfkey.c Log Message: Don't print EAGAIN error from pfkey_handler(), it can occur normally under some code paths and is not a hard error in any case. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/crypto/dist/ipsec-tools/src/racoon/pfkey.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/pfkey.c diff -u src/crypto/dist/ipsec-tools/src/racoon/pfkey.c:1.49 src/crypto/dist/ipsec-tools/src/racoon/pfkey.c:1.50 --- src/crypto/dist/ipsec-tools/src/racoon/pfkey.c:1.49 Wed Aug 5 13:16:01 2009 +++ src/crypto/dist/ipsec-tools/src/racoon/pfkey.c Mon Aug 10 08:22:13 2009 @@ -1,6 +1,6 @@ -/* $NetBSD: pfkey.c,v 1.49 2009/08/05 13:16:01 tteras Exp $ */ +/* $NetBSD: pfkey.c,v 1.50 2009/08/10 08:22:13 tteras Exp $ */ -/* $Id: pfkey.c,v 1.49 2009/08/05 13:16:01 tteras Exp $ */ +/* $Id: pfkey.c,v 1.50 2009/08/10 08:22:13 tteras Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -214,6 +214,13 @@ msg = (struct sadb_msg *) pk_recv(fd, &len); if (msg == NULL) { if (len < 0) { + /* do not report EAGAIN as error; well get + * called from main loop later. and it's normal + * when spd dump is received during reload and + * this function is called in loop. */ + if (errno == EAGAIN) + goto end; + plog(LLV_ERROR, LOCATION, NULL, "failed to recv from pfkey (%s)\n", strerror(errno));
CVS commit: src/sys/arch/vax/include
Module Name:src Committed By: matt Date: Mon Aug 10 08:05:33 UTC 2009 Modified Files: src/sys/arch/vax/include: pte.h Log Message: Change kvtopte and kvtophys from ({ }) to static inline and while there make them tolerable of rump. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/vax/include/pte.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/vax/include/pte.h diff -u src/sys/arch/vax/include/pte.h:1.22 src/sys/arch/vax/include/pte.h:1.23 --- src/sys/arch/vax/include/pte.h:1.22 Fri Aug 29 18:25:02 2008 +++ src/sys/arch/vax/include/pte.h Mon Aug 10 08:05:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.22 2008/08/29 18:25:02 matt Exp $ */ +/* $NetBSD: pte.h,v 1.23 2009/08/10 08:05:32 matt Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -77,17 +77,49 @@ #endif #ifdef __GNUC__ -#define kvtopte(va) ({ \ - struct pte *r; \ - __asm("extzv $9,$21,%1,%0;moval *Sysmap[%0],%0" : "=r"(r) : "g"(va)); \ - r; \ -}) -#define kvtophys(va) ({ \ - paddr_t r; \ - __asm("extzv $9,$21,%1,%0;ashl $9,*Sysmap[%0],%0;insv %1,$0,$9,%0" \ - : "=&r"(r) : "g"(va) : "cc"); \ - r; \ -}) +#define kvtopte(va) kvtopte0((vaddr_t) (va)) +static inline struct pte * +kvtopte0(vaddr_t va) +{ + struct pte *pt; +#ifdef _RUMPKERNEL + __asm( + "extzv $9,$21,%1,%0\n\t" + "moval %2[%0],%0\n\t" + : "=r"(pt) + : "g"(va), "o"(*Sysmap)); +#else + __asm( + "extzv $9,$21,%1,%0\n\t" + "moval *Sysmap[%0],%0\n\t" + : "=r"(pt) + : "g"(va)); +#endif + return pt; +} + +#define kvtophys(va) kvtophys0((vaddr_t) (va)) +static inline paddr_t +kvtophys0(vaddr_t va) +{ + paddr_t pa; +#ifdef _RUMPKERNEL + __asm( + "extzv $9,$21,%1,%0\n\t" + "ashl $9,%2[%0],%0\n\t" + "insv %1,$0,$9,%0\n\t" + : "=&r"(pa) + : "g"(va), "o"(*Sysmap) : "cc"); +#else + __asm( + "extzv $9,$21,%1,%0\n\t" + "ashl $9,*Sysmap[%0],%0\n\t" + "insv %1,$0,$9,%0\n\t" + : "=&r"(pa) + : "g"(va) : "cc"); +#endif + return pa; +} #else /* __GNUC__ */ #define kvtophys(va) \ (((kvtopte(va))->pg_pfn << VAX_PGSHIFT) | ((paddr_t)(va) & VAX_PGOFSET))
CVS commit: src/sys/modules/raidframe
Module Name:src Committed By: haad Date: Mon Aug 10 07:19:11 UTC 2009 Added Files: src/sys/modules/raidframe: Makefile Log Message: Add raidframe module dir. Rf needs some fixes before it can be used as a kernel module. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/raidframe/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/raidframe/Makefile diff -u /dev/null src/sys/modules/raidframe/Makefile:1.1 --- /dev/null Mon Aug 10 07:19:11 2009 +++ src/sys/modules/raidframe/Makefile Mon Aug 10 07:19:11 2009 @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1 2009/08/10 07:19:11 haad Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/dev/raidframe + +KMOD= raidframe +SRCS= rf_dagffwr.c rf_dagfuncs.c rf_dagutils.c rf_debugMem.c rf_debugprint.c \ + rf_decluster.c rf_declusterPQ.c rf_diskqueue.c rf_disks.c rf_driver.c \ + rf_engine.c rf_evenodd.c rf_evenodd_dagfuncs.c rf_evenodd_dags.c \ + rf_fifo.c rf_interdecluster.c rf_invertq.c rf_layout.c rf_map.c \ + rf_mcpair.c rf_netbsdkintf.c rf_nwayxor.c rf_options.c rf_paritylog.c \ + rf_paritylogDiskMgr.c rf_paritylogging.c rf_parityloggingdags.c \ + rf_parityscan.c rf_pq.c rf_pqdeg.c rf_pqdegdags.c rf_psstatus.c \ + rf_raid0.c rf_raid1.c rf_raid4.c rf_raid5.c rf_raid5_rotatedspare.c \ + rf_reconbuffer.c rf_reconmap.c rf_reconstruct.c rf_reconutil.c \ + rf_revent.c rf_shutdown.c rf_sstf.c rf_states.c rf_stripelocks.c \ + rf_strutils.c rf_utils.c + +.include
CVS commit: src/sys/modules
Module Name:src Committed By: haad Date: Mon Aug 10 07:16:06 UTC 2009 Added Files: src/sys/modules/solaris: Makefile src/sys/modules/zfs: Makefile Log Message: Add solaris and zfs kernel modules build directories. These modules will not be built during release build until we import other kernel patches needed. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/solaris/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/zfs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/solaris/Makefile diff -u /dev/null src/sys/modules/solaris/Makefile:1.1 --- /dev/null Mon Aug 10 07:16:06 2009 +++ src/sys/modules/solaris/Makefile Mon Aug 10 07:16:06 2009 @@ -0,0 +1,96 @@ +# $NetBSD: Makefile,v 1.1 2009/08/10 07:16:06 haad Exp $ + +.include "../Makefile.inc" + +CFLAGS+= -g -fno-inline + +KMOD= solaris + +ZFSDIR= ${S}/../external/cddl/osnet + +.PATH: ${ZFSDIR}/dist/common/avl + +SRCS= avl.c + +.PATH: ${ZFSDIR}/dist/common/nvpair + +SRCS+= nvpair.c +SRCS+= nvpair_alloc_fixed.c + +.PATH: ${ZFSDIR}/dist/common/unicode + +SRCS+= u8_textprep.c + +.PATH: ${ZFSDIR}/dist/uts/common/os + +SRCS+= fm.c +SRCS+= list.c +SRCS+= nvpair_alloc_system.c + +.PATH: ${ZFSDIR}/dist/uts/common/rpc + +SRCS+= xdr.c +SRCS+= xdr_array.c +SRCS+= xdr_mem.c + +.PATH: ${ZFSDIR}/dist/uts/common/zmod + +SRCS+= adler32.c +SRCS+= crc32.c +SRCS+= deflate.c +SRCS+= inffast.c +SRCS+= inflate.c +SRCS+= inftrees.c +SRCS+= trees.c +SRCS+= zmod.c +SRCS+= zmod_subr.c +SRCS+= zutil.c + +.PATH: ${ZFSDIR}/dist/common/acl + +SRCS+= acl_common.c + +.PATH: ${ZFSDIR}/sys/kern + +SRCS+= kobj.c +SRCS+= kstat.c +SRCS+= misc.c +SRCS+= policy.c +SRCS+= string.c +SRCS+= zone.c +SRCS+= callb.c +SRCS+= ddi.c +SRCS+= mod.c +SRCS+= printf.c +SRCS+= taskq.c +SRCS+= vfs.c + +WARNS= 0 +NOGCCERROR= yes + +CWARNFLAGS+= -Wall +CWARNFLAGS+= -Wno-unknown-pragmas +CWARNFLAGS+= -Wno-missing-braces +CWARNFLAGS+= -Wno-parentheses +CWARNFLAGS+= -Wno-uninitialized +CWARNFLAGS+= -Wno-unused +CWARNFLAGS+= -Wno-switch +CWARNFLAGS+= -Wno-strict-prototypes +CWARNFLAGS+= -Wno-missing-prototypes +CWARNFLAGS+= -Wno-format + +CPPFLAGS+= -I${.CURDIR}/../.. +CPPFLAGS+= -I${.CURDIR}/../../../../include +CPPFLAGS+= -I${ZFSDIR}/sys +CPPFLAGS+= -I${ZFSDIR}/dist/common/acl +CPPFLAGS+= -I${ZFSDIR}/dist/uts/common/zmod +CPPFLAGS+= -I${ZFSDIR}/dist/uts/common +CPPFLAGS+= -I${ZFSDIR}/sys/sys + +CPPFLAGS+= -Dcaddr_t=__caddr_t "-D__va_list=va_list" +CPPFLAGS+= -std=c99 +# CPPFLAGS+= -D_NFS_NFS_H_ +# CPPFLAGS+= -D_PROPLIB_ZFS_CONFLICT + +CFLAGS+= -g -O0 -DDIAGNOSTIC +.include Index: src/sys/modules/zfs/Makefile diff -u /dev/null src/sys/modules/zfs/Makefile:1.1 --- /dev/null Mon Aug 10 07:16:06 2009 +++ src/sys/modules/zfs/Makefile Mon Aug 10 07:16:06 2009 @@ -0,0 +1,134 @@ +# $NetBSD: Makefile,v 1.1 2009/08/10 07:16:06 haad Exp $ + +.include "../Makefile.inc" + +KMOD= zfs + +ZFSDIR= ${S}/../external/cddl/osnet + +.PATH: ${ZFSDIR}/dist/common/zfs + +SRCS+= zfs_comutil.c +SRCS+= zfs_deleg.c +SRCS+= zfs_namecheck.c +SRCS+= zfs_prop.c +SRCS+= zpool_prop.c +SRCS+= zprop_common.c + +.PATH: ${ZFSDIR}/dist/uts/common/fs + +#SRCS+= gfs.c + +.PATH: ${ZFSDIR}/dist/uts/common/zmod + +SRCS+= trees.c + +.PATH: ${ZFSDIR}/dist/uts/common/fs/zfs + +SRCS+= arc.c +SRCS+= bplist.c +SRCS+= dbuf.c +SRCS+= dmu.c +SRCS+= dmu_object.c +SRCS+= dmu_objset.c +SRCS+= dmu_send.c +SRCS+= dmu_traverse.c +SRCS+= dmu_tx.c +SRCS+= dmu_zfetch.c +SRCS+= dnode.c +SRCS+= dnode_sync.c +SRCS+= dsl_dataset.c +SRCS+= dsl_deleg.c +SRCS+= dsl_dir.c +SRCS+= dsl_pool.c +SRCS+= dsl_prop.c +SRCS+= dsl_scrub.c +SRCS+= dsl_synctask.c +SRCS+= fletcher.c +SRCS+= gzip.c +SRCS+= lzjb.c +SRCS+= metaslab.c +SRCS+= refcount.c +SRCS+= rrwlock.c +SRCS+= sha256.c +SRCS+= spa.c +SRCS+= spa_config.c +SRCS+= spa_errlog.c +SRCS+= spa_history.c +SRCS+= spa_misc.c +SRCS+= space_map.c +SRCS+= txg.c +SRCS+= uberblock.c +SRCS+= unique.c +SRCS+= vdev.c +SRCS+= vdev_cache.c +SRCS+= vdev_disk.c +SRCS+= vdev_file.c +SRCS+= vdev_label.c +SRCS+= vdev_mirror.c +SRCS+= vdev_missing.c +SRCS+= vdev_queue.c +SRCS+= vdev_raidz.c +SRCS+= vdev_root.c +SRCS+= zap.c +SRCS+= zap_leaf.c +SRCS+= zap_micro.c +SRCS+= zfs_byteswap.c +#SRCS+= zfs_ctldir.c +SRCS+= zfs_dir.c +SRCS+= zfs_fuid.c +SRCS+= zfs_fm.c +SRCS+= zfs_ioctl.c +SRCS+= zfs_log.c +SRCS+= zfs_replay.c +SRCS+= zfs_rlock.c +SRCS+= zfs_vfsops.c +SRCS+= zfs_vnops.c +SRCS+= zfs_znode.c +SRCS+= zfs_acl.c +SRCS+= zil.c +SRCS+= zio.c +SRCS+= zio_checksum.c +SRCS+= zio_compress.c +SRCS+= zio_inject.c +SRCS+= zutil.c +SRCS+= zvol.c + +.PATH: ${ZFSDIR}/sys/kern + +SRCS+= zfs_stub.c + +WARNS= 0 +NOGCCERROR= yes + +CWARNFLAGS+= -Wall +CWARNFLAGS+= -Wno-unknown-pragmas +CWARNFLAGS+= -Wno-missing-braces +CWARNFLAGS+= -Wno-parentheses +CWARNFLAGS+= -Wno-uninitialized +CWARNFLAGS+= -Wno-unused +CWARNFLAGS+= -Wno-switch +CWARNFLAGS+= -Wno-strict-prototypes +CWARNFLAGS+= -Wno-missing-prot