From owner-p4-projects Thu Jul 11 0:53:31 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90E1537B405; Thu, 11 Jul 2002 00:52:58 -0700 (PDT) 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 1E17337B400 for ; Thu, 11 Jul 2002 00:52:58 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4399943E52 for ; Thu, 11 Jul 2002 00:52:55 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6B7qtJU051269 for ; Thu, 11 Jul 2002 00:52:55 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6B7qsHe051265 for perforce@freebsd.org; Thu, 11 Jul 2002 00:52:54 -0700 (PDT) Date: Thu, 11 Jul 2002 00:52:54 -0700 (PDT) Message-Id: <200207110752.g6B7qsHe051265@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 14078 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14078 Change 14078 by peter@peter_daintree on 2002/07/11 00:51:57 IFC @14077 Affected files ... .. //depot/projects/pmap/sys/conf/NOTES#2 integrate .. //depot/projects/pmap/sys/conf/files#10 integrate .. //depot/projects/pmap/sys/conf/options#5 integrate .. //depot/projects/pmap/sys/dev/isp/isp_freebsd.c#6 integrate .. //depot/projects/pmap/sys/dev/isp/isp_freebsd.h#4 integrate .. //depot/projects/pmap/sys/dev/isp/isp_inline.h#6 integrate .. //depot/projects/pmap/sys/dev/isp/isp_pci.c#4 integrate .. //depot/projects/pmap/sys/dev/isp/isp_sbus.c#1 branch .. //depot/projects/pmap/sys/dev/ispfw/asm_1000.h#1 branch .. //depot/projects/pmap/sys/dev/ispfw/ispfw.c#3 integrate .. //depot/projects/pmap/sys/kern/kern_fork.c#9 integrate .. //depot/projects/pmap/sys/kern/kern_prot.c#8 integrate .. //depot/projects/pmap/sys/kern/subr_trap.c#9 integrate .. //depot/projects/pmap/sys/sys/cdefs.h#3 integrate .. //depot/projects/pmap/sys/vm/vm_kern.c#3 integrate .. //depot/projects/pmap/sys/vm/vm_map.c#5 integrate .. //depot/projects/pmap/sys/vm/vm_map.h#4 integrate Differences ... ==== //depot/projects/pmap/sys/conf/NOTES#2 (text+ko) ==== @@ -14,7 +14,7 @@ # This file contains machine independent kernel configuration notes. For # machine dependent notes, look in /sys//conf/NOTES. # -# $FreeBSD: src/sys/conf/NOTES,v 1.1043 2002/07/08 22:00:43 mp Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1044 2002/07/11 04:15:53 ken Exp $ # # @@ -1684,6 +1684,15 @@ # only works for Tigon II chips, and has no effect for Tigon I chips. options TI_JUMBO_HDRSPLIT +# These two options allow manipulating the mbuf cluster size and mbuf size, +# respectively. Be very careful with NIC driver modules when changing +# these from their default values, because that can potentially cause a +# mismatch between the mbuf size assumed by the kernel and the mbuf size +# assumed by a module. The only driver that currently has the ability to +# detect a mismatch is ti(4). +options MCLSHIFT=12 # mbuf cluster shift in bits, 12 == 4KB +options MSIZE=512 # mbuf size in bytes + # # ATM related options (Cranor version) # (note: this driver cannot be used with the HARP ATM stack) @@ -2269,8 +2278,6 @@ options NBUF=512 # Number of buffer headers -options MSIZE=256 # mbuf size in bytes -options MCLSHIFT=12 # mbuf cluster shift in bits, 12 == 4KB options NMBCLUSTERS=1024 # Number of mbuf clusters options SCSI_NCR_DEBUG ==== //depot/projects/pmap/sys/conf/files#10 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.659 2002/07/09 17:53:47 iwasaki Exp $ +# $FreeBSD: src/sys/conf/files,v 1.660 2002/07/11 03:26:39 mjacob Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -408,10 +408,11 @@ dev/iir/iir.c optional iir dev/iir/iir_ctrl.c optional iir dev/iir/iir_pci.c optional iir pci -dev/isp/isp.c optional isp nowerror +dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_target.c optional isp -dev/isp/isp_pci.c optional isp nowerror +dev/isp/isp_pci.c optional isp pci +dev/isp/isp_sbus.c optional isp sbus dev/ispfw/ispfw.c optional ispfw dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa ==== //depot/projects/pmap/sys/conf/options#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.329 2002/07/08 22:00:43 mp Exp $ +# $FreeBSD: src/sys/conf/options,v 1.330 2002/07/11 04:15:53 ken Exp $ # # On the handling of kernel options # @@ -407,11 +407,11 @@ ENABLE_VFS_IOOPT opt_global.h INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h +MCLSHIFT opt_global.h +MSIZE opt_global.h REGRESSION opt_global.h RESTARTABLE_PANICS opt_global.h VFS_BIO_DEBUG opt_global.h -MSIZE opt_global.h -MCLSHIFT opt_global.h # These are VM related options VM_KMEM_SIZE opt_vm.h ==== //depot/projects/pmap/sys/dev/isp/isp_freebsd.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.80 2002/07/08 17:42:47 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.81 2002/07/11 03:25:04 mjacob Exp $ */ /* * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. * @@ -34,6 +34,9 @@ #include +int isp_announced = 0; +ispfwfunc *isp_get_firmware_p = NULL; + static d_ioctl_t ispioctl; static void isp_intr_enable(void *); static void isp_cam_async(void *, u_int32_t, struct cam_path *, void *); @@ -2075,7 +2078,6 @@ } cv_signal(&isp->isp_osinfo.kthread_cv); isp_freeze_loopdown(isp, "isp_action(RQLATER)"); - isp->isp_osinfo.simqfrozen |= SIMQFRZ_LOOPDOWN; XS_SETERR(ccb, CAM_REQUEUE_REQ); ISPLOCK_2_CAMLOCK(isp); xpt_done(ccb); ==== //depot/projects/pmap/sys/dev/isp/isp_freebsd.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.65 2002/07/08 17:48:39 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.66 2002/07/11 03:25:04 mjacob Exp $ */ /* * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 by Matthew Jacob @@ -365,6 +365,11 @@ extern void isp_uninit(struct ispsoftc *); /* + * driver global data + */ +extern int isp_announced; + +/* * Platform private flags */ #define ISP_SPRIV_ERRSET 0x1 ==== //depot/projects/pmap/sys/dev/isp/isp_inline.h#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_inline.h,v 1.26 2002/06/16 05:00:20 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_inline.h,v 1.27 2002/07/11 03:25:04 mjacob Exp $ */ /* * Qlogic Host Adapter Inline Functions * @@ -31,6 +31,7 @@ */ #ifndef _ISP_INLINE_H #define _ISP_INLINE_H + /* * Handle Functions. * For each outstanding command there will be a non-zero handle. ==== //depot/projects/pmap/sys/dev/isp/isp_pci.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.83 2002/07/08 17:34:32 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.84 2002/07/11 03:25:04 mjacob Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * FreeBSD Version. @@ -62,10 +62,6 @@ static void isp_pci_reset1(struct ispsoftc *); static void isp_pci_dumpregs(struct ispsoftc *, const char *); -#ifndef ISP_CODE_ORG -#define ISP_CODE_ORG 0x1000 -#endif - static struct ispmdvec mdvec = { isp_pci_rd_isr, isp_pci_rd_reg, @@ -266,7 +262,7 @@ bus_dma_tag_t dmat; bus_dmamap_t *dmaps; }; -ispfwfunc *isp_get_firmware_p = NULL; +extern ispfwfunc *isp_get_firmware_p; static device_method_t isp_pci_methods[] = { /* Device interface */ @@ -281,7 +277,6 @@ }; static devclass_t isp_devclass; DRIVER_MODULE(isp, pci, isp_pci_driver, isp_devclass, 0, 0); -MODULE_VERSION(isp, 1); static int isp_pci_probe(device_t dev) @@ -320,11 +315,12 @@ default: return (ENXIO); } - if (device_get_unit(dev) == 0 && bootverbose) { + if (isp_announced == 0 && bootverbose) { printf("Qlogic ISP Driver, FreeBSD Version %d.%d, " "Core Version %d.%d\n", ISP_PLATFORM_VERSION_MAJOR, ISP_PLATFORM_VERSION_MINOR, ISP_CORE_VERSION_MAJOR, ISP_CORE_VERSION_MINOR); + isp_announced++; } /* * XXXX: Here is where we might load the f/w module @@ -689,7 +685,6 @@ } isp_debug = 0; - isp_debug = 0; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "debug", &isp_debug); ==== //depot/projects/pmap/sys/dev/ispfw/ispfw.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/ispfw/ispfw.c,v 1.7 2002/03/20 02:07:25 alfred Exp $ */ +/* $FreeBSD: src/sys/dev/ispfw/ispfw.c,v 1.8 2002/07/11 01:55:15 mjacob Exp $ */ /* * ISP Firmware Helper Pseudo Device for FreeBSD * @@ -37,6 +37,9 @@ #include #include #include +#if _MACHINE_ARCH == sparc64 +#include +#endif #define ISPFW_VERSION 0 @@ -49,6 +52,9 @@ #define PCI_PRODUCT_QLOGIC_ISP2200 0x2200 #define PCI_PRODUCT_QLOGIC_ISP2300 0x2300 #define PCI_PRODUCT_QLOGIC_ISP2312 0x2312 +#if _MACHINE_ARCH == sparc64 +#define SBUS_PRODUCT_QLOGIC_ISP1000 0x1000 +#endif typedef void ispfwfunc(int, int, int, const u_int16_t **); extern ispfwfunc *isp_get_firmware_p; @@ -119,6 +125,13 @@ case PCI_PRODUCT_QLOGIC_ISP2312: rp = isp_2300_risc_code; break; +#if _MACHINE_ARCH == sparc64 + case SBUS_PRODUCT_QLOGIC_ISP1000: + if (tgtmode) + break; + rp = isp_1000_risc_code; + break; +#endif default: break; } ==== //depot/projects/pmap/sys/kern/kern_fork.c#9 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_fork.c 8.6 (Berkeley) 4/8/94 - * $FreeBSD: src/sys/kern/kern_fork.c,v 1.151 2002/06/29 17:26:18 julian Exp $ + * $FreeBSD: src/sys/kern/kern_fork.c,v 1.152 2002/07/11 02:18:33 mini Exp $ */ #include "opt_ktrace.h" @@ -875,6 +875,9 @@ kthread_exit(0); } PROC_UNLOCK(p); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/pmap/sys/kern/kern_prot.c#8 (text+ko) ==== @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_prot.c 8.6 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/kern/kern_prot.c,v 1.160 2002/06/29 01:50:25 alfred Exp $ + * $FreeBSD: src/sys/kern/kern_prot.c,v 1.161 2002/07/11 02:18:33 mini Exp $ */ /* @@ -1765,6 +1765,19 @@ return (newcr); } +#ifdef DIAGNOSTIC +void +cred_free_thread(struct thread *td) +{ + struct ucred *cred; + + cred = td->td_ucred; + td->td_ucred = NULL; + if (cred != NULL) + crfree(cred); +} +#endif + /* * Fill in a struct xucred based on a struct ucred. */ ==== //depot/projects/pmap/sys/kern/subr_trap.c#9 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/kern/subr_trap.c,v 1.220 2002/07/10 06:40:22 julian Exp $ + * $FreeBSD: src/sys/kern/subr_trap.c,v 1.221 2002/07/11 02:18:33 mini Exp $ */ #ifdef __i386__ @@ -236,5 +236,8 @@ } userret(td, framep, sticks); +#ifdef DIAGNOSTIC + cred_free_thread(td); +#endif mtx_assert(&Giant, MA_NOTOWNED); } ==== //depot/projects/pmap/sys/sys/cdefs.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)cdefs.h 8.8 (Berkeley) 1/9/95 - * $FreeBSD: src/sys/sys/cdefs.h,v 1.56 2002/07/08 16:43:35 mike Exp $ + * $FreeBSD: src/sys/sys/cdefs.h,v 1.57 2002/07/11 02:51:02 dillon Exp $ */ #ifndef _SYS_CDEFS_H_ @@ -175,7 +175,7 @@ #endif /* Compiler-dependent macros that rely on FreeBSD-specific extensions. */ -#if __FreeBSD_cc_version >= 300001 +#if __FreeBSD_cc_version >= 300001 && __FreeBSD_cc_version < 500003 #define __printf0like(fmtarg, firstvararg) \ __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) #else @@ -240,7 +240,7 @@ * Embed the rcs id of a source file in the resulting library. Note that in * more recent ELF binutils, we use .ident allowing the ID to be stripped. * Usage: - * __FBSDID("$FreeBSD: src/sys/sys/cdefs.h,v 1.56 2002/07/08 16:43:35 mike Exp $"); + * __FBSDID("$FreeBSD: src/sys/sys/cdefs.h,v 1.57 2002/07/11 02:51:02 dillon Exp $"); */ #ifndef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) ==== //depot/projects/pmap/sys/vm/vm_kern.c#3 (text+ko) ==== @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/vm_kern.c,v 1.81 2002/06/23 18:07:40 alc Exp $ + * $FreeBSD: src/sys/vm/vm_kern.c,v 1.82 2002/07/11 02:39:24 alc Exp $ */ /* @@ -473,10 +473,10 @@ vm_map_unlock(map); return (0); } - vm_map_unlock(map); - tsleep(map, PVM, "kmaw", 0); + map->needs_wakeup = TRUE; + vm_map_unlock_and_wait(map, FALSE); } - vm_map_insert(map, NULL, (vm_offset_t) 0, addr, addr + size, VM_PROT_ALL, VM_PROT_ALL, 0); + vm_map_insert(map, NULL, 0, addr, addr + size, VM_PROT_ALL, VM_PROT_ALL, 0); vm_map_unlock(map); return (addr); } @@ -497,7 +497,10 @@ vm_map_lock(map); (void) vm_map_delete(map, trunc_page(addr), round_page(addr + size)); - wakeup(map); + if (map->needs_wakeup) { + map->needs_wakeup = FALSE; + vm_map_wakeup(map); + } vm_map_unlock(map); } ==== //depot/projects/pmap/sys/vm/vm_map.c#5 (text+ko) ==== @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/vm_map.c,v 1.260 2002/07/03 19:16:37 alc Exp $ + * $FreeBSD: src/sys/vm/vm_map.c,v 1.261 2002/07/11 02:39:24 alc Exp $ */ /* @@ -418,7 +418,7 @@ /* * vm_map_unlock_and_wait: */ -static __inline int +int vm_map_unlock_and_wait(vm_map_t map, boolean_t user_wait) { int retval; @@ -433,7 +433,7 @@ /* * vm_map_wakeup: */ -static __inline void +void vm_map_wakeup(vm_map_t map) { @@ -482,6 +482,7 @@ { map->header.next = map->header.prev = &map->header; + map->needs_wakeup = FALSE; map->system_map = 0; map->min_offset = min; map->max_offset = max; ==== //depot/projects/pmap/sys/vm/vm_map.h#4 (text+ko) ==== @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $FreeBSD: src/sys/vm/vm_map.h,v 1.88 2002/06/25 18:14:38 alc Exp $ + * $FreeBSD: src/sys/vm/vm_map.h,v 1.89 2002/07/11 02:39:24 alc Exp $ */ /* @@ -164,6 +164,7 @@ struct lock lock; /* Lock for map data */ int nentries; /* Number of entries */ vm_size_t size; /* virtual size */ + u_char needs_wakeup; u_char system_map; /* Am I a system map? */ u_char infork; /* Am I in fork processing? */ vm_map_entry_t root; @@ -245,6 +246,8 @@ int _vm_map_trylock(vm_map_t map, const char *file, int line); int _vm_map_lock_upgrade(vm_map_t map, const char *file, int line); void _vm_map_lock_downgrade(vm_map_t map, const char *file, int line); +int vm_map_unlock_and_wait(vm_map_t map, boolean_t user_wait); +void vm_map_wakeup(vm_map_t map); #define vm_map_lock(map) _vm_map_lock(map, LOCK_FILE, LOCK_LINE) #define vm_map_unlock(map) _vm_map_unlock(map, LOCK_FILE, LOCK_LINE) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message