From owner-p4-projects@FreeBSD.ORG Thu May 20 23:23:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3FD0016A4D0; Thu, 20 May 2004 23:23:56 -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 1858116A4CE for ; Thu, 20 May 2004 23:23:56 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1094A43D2D for ; Thu, 20 May 2004 23:23:56 -0700 (PDT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4L6NiL7056727 for ; Thu, 20 May 2004 23:23:44 -0700 (PDT) (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4L6NhxW056724 for perforce@freebsd.org; Thu, 20 May 2004 23:23:43 -0700 (PDT) (envelope-from imp@freebsd.org) Date: Thu, 20 May 2004 23:23:43 -0700 (PDT) Message-Id: <200405210623.i4L6NhxW056724@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Subject: PERFORCE change 53150 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2004 06:23:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=53150 Change 53150 by imp@imp_pacopaco on 2004/05/20 23:23:32 IFC @53147 Affected files ... .. //depot/projects/power/sys/alpha/include/profile.h#2 integrate .. //depot/projects/power/sys/amd64/amd64/machdep.c#9 integrate .. //depot/projects/power/sys/amd64/amd64/pmap.c#11 integrate .. //depot/projects/power/sys/amd64/include/profile.h#4 integrate .. //depot/projects/power/sys/arm/include/profile.h#2 integrate .. //depot/projects/power/sys/boot/pc98/boot2/serial_16550.S#4 integrate .. //depot/projects/power/sys/boot/pc98/boot2/serial_8251.S#4 integrate .. //depot/projects/power/sys/boot/pc98/btx/btx/btx.S#4 integrate .. //depot/projects/power/sys/boot/pc98/btx/btxldr/btxldr.S#4 integrate .. //depot/projects/power/sys/conf/NOTES#18 integrate .. //depot/projects/power/sys/conf/files#15 integrate .. //depot/projects/power/sys/conf/options#18 integrate .. //depot/projects/power/sys/dev/ata/ata-all.c#9 integrate .. //depot/projects/power/sys/dev/em/if_em.c#7 integrate .. //depot/projects/power/sys/dev/iir/iir.c#3 integrate .. //depot/projects/power/sys/dev/iir/iir.h#4 integrate .. //depot/projects/power/sys/dev/iir/iir_ctrl.c#4 integrate .. //depot/projects/power/sys/dev/pccbb/pccbb.c#13 integrate .. //depot/projects/power/sys/dev/pccbb/pccbbvar.h#3 integrate .. //depot/projects/power/sys/dev/pci/pci.c#17 integrate .. //depot/projects/power/sys/dev/usb/umodem.c#3 integrate .. //depot/projects/power/sys/dev/usb/usbdevs#13 integrate .. //depot/projects/power/sys/dev/usb/usbdevs.h#13 integrate .. //depot/projects/power/sys/dev/usb/usbdevs_data.h#13 integrate .. //depot/projects/power/sys/geom/concat/g_concat.c#4 integrate .. //depot/projects/power/sys/geom/concat/g_concat.h#2 integrate .. //depot/projects/power/sys/geom/nop/g_nop.c#1 branch .. //depot/projects/power/sys/geom/nop/g_nop.h#1 branch .. //depot/projects/power/sys/geom/stripe/g_stripe.c#1 branch .. //depot/projects/power/sys/geom/stripe/g_stripe.h#1 branch .. //depot/projects/power/sys/i386/include/profile.h#5 integrate .. //depot/projects/power/sys/ia64/include/profile.h#2 integrate .. //depot/projects/power/sys/kern/kern_jail.c#4 integrate .. //depot/projects/power/sys/kern/kern_sig.c#12 integrate .. //depot/projects/power/sys/kern/link_elf.c#3 integrate .. //depot/projects/power/sys/kern/subr_prof.c#4 integrate .. //depot/projects/power/sys/kern/uipc_socket2.c#7 integrate .. //depot/projects/power/sys/modules/geom/Makefile#4 integrate .. //depot/projects/power/sys/modules/geom/geom_nop/Makefile#1 branch .. //depot/projects/power/sys/modules/geom/geom_stripe/Makefile#1 branch .. //depot/projects/power/sys/netgraph/ng_hole.c#2 integrate .. //depot/projects/power/sys/netgraph/ng_hole.h#3 integrate .. //depot/projects/power/sys/netinet/in_pcb.c#10 integrate .. //depot/projects/power/sys/pci/agp_sis.c#4 integrate .. //depot/projects/power/sys/pci/if_sk.c#10 integrate .. //depot/projects/power/sys/powerpc/include/profile.h#2 integrate .. //depot/projects/power/sys/powerpc/powerpc/trap.c#2 integrate .. //depot/projects/power/sys/sparc64/include/profile.h#2 integrate .. //depot/projects/power/sys/sparc64/sparc64/vm_machdep.c#6 integrate .. //depot/projects/power/sys/sys/ata.h#3 integrate .. //depot/projects/power/sys/sys/gmon.h#3 integrate .. //depot/projects/power/sys/ufs/ffs/ffs_alloc.c#6 integrate Differences ... ==== //depot/projects/power/sys/alpha/include/profile.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.5 2002/03/20 18:58:45 obrien Exp $ */ +/* $FreeBSD: src/sys/alpha/include/profile.h,v 1.6 2004/05/19 15:41:25 bde Exp $ */ /* From: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp */ /* @@ -220,18 +220,6 @@ #define MCOUNT_EXIT(s) \ (void)_alpha_pal_swpipl(s); #define MCOUNT_DECL(s) u_long s; -#ifdef GUPROF -struct gmonparam; - -void nullfunc_loop_profiled(void); -void nullfunc_profiled(void); -void startguprof(struct gmonparam *p); -void stopguprof(struct gmonparam *p); -#else -#define startguprof(p) -#define stopguprof(p) -#endif /* GUPROF */ - #else /* !_KERNEL */ typedef u_long uintfptr_t; #endif ==== //depot/projects/power/sys/amd64/amd64/machdep.c#9 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.606 2004/05/18 05:30:06 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.607 2004/05/19 01:23:48 peter Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1138,8 +1138,10 @@ kmdp = preload_search_by_type("elf64 kernel"); boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *) + KERNBASE; +#ifdef DDB ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, void *); ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, void *); +#endif /* Init basic tunables, hz etc */ init_param1(); ==== //depot/projects/power/sys/amd64/amd64/pmap.c#11 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.459 2004/05/16 22:11:50 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.460 2004/05/19 21:55:37 peter Exp $"); /* * Manages physical address maps. @@ -1296,11 +1296,16 @@ LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + + pmap->pm_pml4[KPML4I] = 0; /* KVA */ + pmap->pm_pml4[DMPML4I] = 0; /* Direct Map */ + pmap->pm_pml4[PML4PML4I] = 0; /* Recursive Mapping */ + vm_page_lock_queues(); - m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_free(m); + vm_page_free_zero(m); vm_page_unlock_queues(); } ==== //depot/projects/power/sys/amd64/include/profile.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)profile.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/amd64/include/profile.h,v 1.34 2004/04/05 21:25:51 imp Exp $ + * $FreeBSD: src/sys/amd64/include/profile.h,v 1.39 2004/05/20 16:22:57 bde Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -50,14 +50,29 @@ #define MCOUNT #ifdef GUPROF -#define CALIB_SCALE 1000 -#define KCOUNT(p,index) ((p)->kcount[(index) \ - / (HISTFRACTION * sizeof(HISTCOUNTER))]) #define MCOUNT_DECL(s) #define MCOUNT_ENTER(s) #define MCOUNT_EXIT(s) -#define PC_TO_I(p, pc) ((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc) +#ifdef __GNUC__ +#define MCOUNT_OVERHEAD(label) \ + __asm __volatile("pushq %0; call __mcount; popq %%rcx" \ + : \ + : "i" (profil) \ + : "ax", "dx", "cx", "di", "si", "r8", "r9", "memory") +#define MEXITCOUNT_OVERHEAD() \ + __asm __volatile("call .mexitcount; 1:" \ + : : \ + : "ax", "dx", "cx", "di", "si", "r8", "r9", "memory") +#define MEXITCOUNT_OVERHEAD_GETLABEL(labelp) \ + __asm __volatile("movq $1b,%0" : "=rm" (labelp)) +#elif defined(lint) +#define MCOUNT_OVERHEAD(label) +#define MEXITCOUNT_OVERHEAD() +#define MEXITCOUNT_OVERHEAD_GETLABEL() #else +#error +#endif /* __GNUC */ +#else /* !GUPROF */ #define MCOUNT_DECL(s) u_long s; #ifdef SMP extern int mcount_lock; @@ -76,9 +91,43 @@ #define FUNCTION_ALIGNMENT 4 -#define _MCOUNT_DECL static __inline void _mcount +#define _MCOUNT_DECL \ +static void _mcount(uintfptr_t frompc, uintfptr_t selfpc) __unused; \ +static void _mcount #ifdef __GNUC__ +#define MCOUNT __asm(" \n\ + .globl .mcount \n\ + .type .mcount @function \n\ +.mcount: \n\ + pushq %rbp \n\ + movq %rsp,%rbp \n\ + pushq %rdi \n\ + pushq %rsi \n\ + pushq %rdx \n\ + pushq %rcx \n\ + pushq %r8 \n\ + pushq %r9 \n\ + movq 8(%rbp),%rsi \n\ + movq (%rbp),%rdi \n\ + movq 8(%rdi),%rdi \n\ + call _mcount \n\ + popq %r9 \n\ + popq %r8 \n\ + popq %rcx \n\ + popq %rdx \n\ + popq %rsi \n\ + popq %rdi \n\ + leave \n\ + ret \n\ + .size .mcount, . - .mcount"); +#if 0 +/* + * We could use this, except it doesn't preserve the registers that were + * being passed with arguments to the function that we were inserted + * into. I've left it here as documentation of what the code above is + * supposed to do. + */ #define MCOUNT \ void \ mcount() \ @@ -93,23 +142,24 @@ __asm("movq 8(%%rbp),%0" : "=r" (selfpc)); \ /* \ * frompc = pc pushed by call to mcount's caller. \ - * The caller's stack frame has already been built, so %ebp is \ + * The caller's stack frame has already been built, so %rbp is \ * the caller's frame pointer. The caller's raddr is in the \ * caller's frame following the caller's caller's frame pointer.\ */ \ - __asm("movq (%%rbp),%0" : "=r" (frompc)); \ + __asm("movq (%%rbp),%0" : "=r" (frompc)); \ frompc = ((uintfptr_t *)frompc)[1]; \ _mcount(frompc, selfpc); \ } -#else /* __GNUC__ */ -#define MCOUNT \ -void \ -mcount() \ -{ \ +#endif +#else /* !__GNUC__ */ +#define MCOUNT \ +void \ +mcount() \ +{ \ } -#endif /* __GNUC__ */ +#endif /* __GNUC__ */ -typedef unsigned long uintfptr_t; +typedef u_long uintfptr_t; #endif /* _KERNEL */ @@ -117,24 +167,11 @@ * An unsigned integral type that can hold non-negative difference between * function pointers. */ -typedef u_int fptrdiff_t; +typedef u_long fptrdiff_t; #ifdef _KERNEL void mcount(uintfptr_t frompc, uintfptr_t selfpc); -void kmupetext(uintfptr_t nhighpc); - -#ifdef GUPROF -struct gmonparam; - -void nullfunc_loop_profiled(void); -void nullfunc_profiled(void); -void startguprof(struct gmonparam *p); -void stopguprof(struct gmonparam *p); -#else -#define startguprof(p) -#define stopguprof(p) -#endif /* GUPROF */ #else /* !_KERNEL */ @@ -148,17 +185,4 @@ #endif /* _KERNEL */ -#ifdef GUPROF -/* XXX doesn't quite work outside kernel yet. */ -extern int cputime_bias; - -__BEGIN_DECLS -int cputime(void); -void empty_loop(void); -void mexitcount(uintfptr_t selfpc); -void nullfunc(void); -void nullfunc_loop(void); -__END_DECLS -#endif - #endif /* !_MACHINE_PROFILE_H_ */ ==== //depot/projects/power/sys/arm/include/profile.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)profile.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/arm/include/profile.h,v 1.1 2004/05/14 11:46:44 cognet Exp $ + * $FreeBSD: src/sys/arm/include/profile.h,v 1.2 2004/05/19 15:41:25 bde Exp $ */ #ifndef _MACHINE_PROFILE_H_ @@ -54,13 +54,9 @@ #define MCOUNT #ifdef GUPROF -#define CALIB_SCALE 1000 -#define KCOUNT(p,index) ((p)->kcount[(index) \ - / (HISTFRACTION * sizeof(HISTCOUNTER))]) #define MCOUNT_DECL(s) #define MCOUNT_ENTER(s) #define MCOUNT_EXIT(s) -#define PC_TO_I(p, pc) ((uintfptr_t)(pc) - (uintfptr_t)(p)->lowpc) #else #define MCOUNT_DECL(s) u_long s; #ifdef SMP @@ -97,19 +93,6 @@ #ifdef _KERNEL void mcount(uintfptr_t frompc, uintfptr_t selfpc); -void kmupetext(uintfptr_t nhighpc); - -#ifdef GUPROF -struct gmonparam; - -void nullfunc_loop_profiled(void); -void nullfunc_profiled(void); -void startguprof(struct gmonparam *p); -void stopguprof(struct gmonparam *p); -#else -#define startguprof(p) -#define stopguprof(p) -#endif /* GUPROF */ #else /* !_KERNEL */ @@ -123,17 +106,4 @@ #endif /* _KERNEL */ -#ifdef GUPROF -/* XXX doesn't quite work outside kernel yet. */ -extern int cputime_bias; - -__BEGIN_DECLS -int cputime(void); -void empty_loop(void); -void mexitcount(uintfptr_t selfpc); -void nullfunc(void); -void nullfunc_loop(void); -__END_DECLS -#endif - #endif /* !_MACHINE_PROFILE_H_ */ ==== //depot/projects/power/sys/boot/pc98/boot2/serial_16550.S#4 (text+ko) ==== @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:34:26 rpd - * $FreeBSD: src/sys/boot/pc98/boot2/serial_16550.S,v 1.6 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/pc98/boot2/serial_16550.S,v 1.7 2004/05/20 20:48:29 markm Exp $ */ /* ==== //depot/projects/power/sys/boot/pc98/boot2/serial_8251.S#4 (text+ko) ==== @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * from: Mach, Revision 2.2 92/04/04 11:34:26 rpd - * $FreeBSD: src/sys/boot/pc98/boot2/serial_8251.S,v 1.3 2004/05/14 20:29:30 ru Exp $ + * $FreeBSD: src/sys/boot/pc98/boot2/serial_8251.S,v 1.4 2004/05/20 20:52:04 markm Exp $ */ /* ==== //depot/projects/power/sys/boot/pc98/btx/btx/btx.S#4 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/pc98/btx/btx/btx.S,v 1.18 2004/05/14 20:29:31 ru Exp $ + * $FreeBSD: src/sys/boot/pc98/btx/btx/btx.S,v 1.19 2004/05/20 20:30:59 markm Exp $ */ /* ==== //depot/projects/power/sys/boot/pc98/btx/btxldr/btxldr.S#4 (text+ko) ==== @@ -12,7 +12,7 @@ * warranties of merchantability and fitness for a particular * purpose. * - * $FreeBSD: src/sys/boot/pc98/btx/btxldr/btxldr.S,v 1.10 2004/05/14 20:29:31 ru Exp $ + * $FreeBSD: src/sys/boot/pc98/btx/btxldr/btxldr.S,v 1.11 2004/05/20 20:24:18 markm Exp $ */ /* ==== //depot/projects/power/sys/conf/NOTES#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1225 2004/05/03 22:35:27 ambrisko Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1226 2004/05/20 10:37:10 pjd Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -126,7 +126,9 @@ options GEOM_GATE # Userland services. options GEOM_GPT # GPT partitioning options GEOM_MBR # DOS/MBR partitioning +options GEOM_NOP # Test class. options GEOM_PC98 # NEC PC9800 partitioning +options GEOM_STRIPE # Disk striping. options GEOM_SUNLABEL # Sun/Solaris partitioning options GEOM_VOL # Volume names from UFS superblock ==== //depot/projects/power/sys/conf/files#15 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.893 2004/05/03 21:18:56 pjd Exp $ +# $FreeBSD: src/sys/conf/files,v 1.894 2004/05/20 10:37:11 pjd Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -919,6 +919,8 @@ crypto/sha2/sha2.c optional geom_bde geom/concat/g_concat.c optional geom_concat geom/gate/g_gate.c optional geom_gate +geom/nop/g_nop.c optional geom_nop +geom/stripe/g_stripe.c optional geom_stripe geom/geom_aes.c optional geom_aes geom/geom_apple.c optional geom_apple geom/geom_bsd.c optional geom_bsd ==== //depot/projects/power/sys/conf/options#18 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.450 2004/05/13 03:15:04 imp Exp $ +# $FreeBSD: src/sys/conf/options,v 1.451 2004/05/20 10:37:11 pjd Exp $ # # On the handling of kernel options # @@ -74,7 +74,9 @@ GEOM_GPT opt_geom.h GEOM_MBR opt_geom.h GEOM_MIRROR opt_geom.h +GEOM_NOP opt_geom.h GEOM_PC98 opt_geom.h +GEOM_STRIPE opt_geom.h GEOM_SUNLABEL opt_geom.h GEOM_VOL opt_geom.h HW_WDOG ==== //depot/projects/power/sys/dev/ata/ata-all.c#9 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.209 2004/04/30 16:21:34 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.210 2004/05/20 14:49:12 des Exp $"); #include "opt_ata.h" #include @@ -58,7 +58,7 @@ /* device structures */ static d_ioctl_t ata_ioctl; -static struct cdevsw ata_cdevsw = { +static struct cdevsw ata_cdevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, .d_ioctl = ata_ioctl, @@ -80,7 +80,7 @@ struct intr_config_hook *ata_delayed_attach = NULL; devclass_t ata_devclass; uma_zone_t ata_zone; -int ata_wc = 1; +int ata_wc = 1; /* local vars */ static int ata_dma = 1; @@ -179,7 +179,7 @@ ata_detach(device_t dev) { struct ata_channel *ch; - + if (!dev || !(ch = device_get_softc(dev)) || !ch->r_irq) return ENXIO; @@ -229,7 +229,7 @@ { struct ata_request *request = ch->running; int devices, misdev, newdev; - + if (!ch->r_irq) return ENXIO; @@ -271,7 +271,7 @@ ch->device[SLAVE].param = NULL; } } - + /* identify what is present on the channel now */ ata_identify_devices(ch); @@ -382,7 +382,7 @@ error = ENXIO; break; } - iocmd->u.param.type[MASTER] = + iocmd->u.param.type[MASTER] = ch->devices & (ATA_ATA_MASTER | ATA_ATAPI_MASTER); iocmd->u.param.type[SLAVE] = ch->devices & (ATA_ATA_SLAVE | ATA_ATAPI_SLAVE); @@ -418,7 +418,7 @@ ch->device[MASTER].setmode(&ch->device[MASTER], iocmd->u.mode.mode[MASTER]); iocmd->u.mode.mode[MASTER] = ch->device[MASTER].mode; - if (iocmd->u.mode.mode[SLAVE] >= 0 && ch->device[SLAVE].param) + if (iocmd->u.mode.mode[SLAVE] >= 0 && ch->device[SLAVE].param) ch->device[SLAVE].setmode(&ch->device[SLAVE], iocmd->u.mode.mode[SLAVE]); iocmd->u.mode.mode[SLAVE] = ch->device[SLAVE].mode; @@ -451,7 +451,7 @@ break; } } - + request->device = atadev; if (iocmd->u.request.flags & ATA_CMD_ATAPI) { @@ -518,25 +518,25 @@ error = ata_detach(device); /* SOS should disable channel HW on controller XXX */ break; - + #ifdef DEV_ATARAID case ATARAIDCREATE: error = ata_raid_create(&iocmd->u.raid_setup); break; - + case ATARAIDDELETE: error = ata_raid_delete(iocmd->channel); break; - + case ATARAIDSTATUS: error = ata_raid_status(iocmd->channel, &iocmd->u.raid_status); break; - + case ATARAIDADDSPARE: error = ata_raid_addspare(iocmd->channel, iocmd->u.raid_spare.disk); break; - + case ATARAIDREBUILD: error = ata_raid_rebuild(iocmd->channel); break; @@ -549,7 +549,7 @@ /* * device probe functions */ -static int +static int ata_getparam(struct ata_device *atadev, u_int8_t command) { struct ata_request *request; @@ -558,7 +558,7 @@ if (!atadev->param) atadev->param = malloc(sizeof(struct ata_params), M_ATA, M_NOWAIT); if (atadev->param) { - request = ata_alloc_request(); + request = ata_alloc_request(); if (request) { int retries = 2; while (retries-- > 0) { @@ -689,7 +689,7 @@ ch->device[MASTER].setmode(&ch->device[MASTER], ATA_PIO_MAX); if ((((ch->devices & ATA_ATAPI_MASTER) && atapi_dma && (ch->device[MASTER].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR)|| - ((ch->devices & ATA_ATA_MASTER) && ata_dma)) && ch->dma) + ((ch->devices & ATA_ATA_MASTER) && ata_dma)) && ch->dma) ch->device[MASTER].setmode(&ch->device[MASTER], ATA_DMA_MAX); } @@ -697,12 +697,12 @@ ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_PIO_MAX); if ((((ch->devices & ATA_ATAPI_SLAVE) && atapi_dma && (ch->device[SLAVE].param->config&ATA_DRQ_MASK) != ATA_DRQ_INTR) || - ((ch->devices & ATA_ATA_SLAVE) && ata_dma)) && ch->dma) + ((ch->devices & ATA_ATA_SLAVE) && ata_dma)) && ch->dma) ch->device[SLAVE].setmode(&ch->device[SLAVE], ATA_DMA_MAX); } } -static void +static void ata_boot_attach(void) { struct ata_channel *ch; @@ -742,17 +742,17 @@ bswap(int8_t *buf, int len) { u_int16_t *ptr = (u_int16_t*)(buf + len); - + while (--ptr >= (u_int16_t*)buf) *ptr = ntohs(*ptr); } static void btrim(int8_t *buf, int len) -{ +{ int8_t *ptr; - for (ptr = buf; ptr < buf+len; ++ptr) + for (ptr = buf; ptr < buf+len; ++ptr) if (!*ptr) *ptr = ' '; for (ptr = buf + len - 1; ptr >= buf && *ptr == ' '; --ptr) @@ -778,7 +778,7 @@ } dst[j++] = src[i]; } - if (j < len) + if (j < len) dst[j] = 0x00; } @@ -835,7 +835,7 @@ free(atadev->name, M_ATA); atadev->name = NULL; } - + int ata_get_lun(u_int32_t *map) { @@ -856,7 +856,7 @@ { *map &= ~(1 << lun); } - + char * ata_mode2str(int mode) { @@ -889,9 +889,9 @@ if (ap->atavalid & ATA_FLAG_64_70) { if (ap->apiomodes & 0x02) return ATA_PIO4; - if (ap->apiomodes & 0x01) + if (ap->apiomodes & 0x01) return ATA_PIO3; - } + } if (ap->mwdmamodes & 0x04) return ATA_PIO4; if (ap->mwdmamodes & 0x02) @@ -904,8 +904,8 @@ return ATA_PIO1; if ((ap->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x000) return ATA_PIO0; - return ATA_PIO0; -} + return ATA_PIO0; +} int ata_wmode(struct ata_params *ap) @@ -953,7 +953,7 @@ if (mode >= ATA_WDMA0 && ata_wmode(atadev->param) > 0) return min(mode, ata_wmode(atadev->param)); - if (mode > ata_pmode(atadev->param)) + if (mode > ata_pmode(atadev->param)) return min(mode, ata_pmode(atadev->param)); return mode; ==== //depot/projects/power/sys/dev/em/if_em.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.39 2004/04/11 21:01:12 ru Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.41 2004/05/20 11:04:09 yar Exp $*/ #include @@ -1855,9 +1855,11 @@ ether_ifattach(ifp, adapter->interface_data.ac_enaddr); #endif + ifp->if_capabilities = ifp->if_capenable = 0; + if (adapter->hw.mac_type >= em_82543) { - ifp->if_capabilities = IFCAP_HWCSUM; - ifp->if_capenable = ifp->if_capabilities; + ifp->if_capabilities |= IFCAP_HWCSUM; + ifp->if_capenable |= IFCAP_HWCSUM; } /* @@ -1865,7 +1867,8 @@ */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); #if __FreeBSD_version >= 500000 - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; #endif #ifdef DEVICE_POLLING ==== //depot/projects/power/sys/dev/iir/iir.c#3 (text+ko) ==== @@ -1,7 +1,7 @@ /* - * Copyright (c) 2000-03 ICP vortex GmbH - * Copyright (c) 2002-03 Intel Corporation - * Copyright (c) 2003 Adaptec Inc. + * Copyright (c) 2000-04 ICP vortex GmbH + * Copyright (c) 2002-04 Intel Corporation + * Copyright (c) 2003-04 Adaptec Inc. * All Rights Reserved * * Redistribution and use in source and binary forms, with or without @@ -39,11 +39,11 @@ * Mike Smith; Some driver source code. * FreeBSD.ORG; Great O/S to work on and for. * - * $Id: iir.c 1.4 2003/08/26 12:29:44 achim Exp $" + * $Id: iir.c 1.5 2004/03/30 10:17:53 achim Exp $" */ #include -__FBSDID("$FreeBSD: src/sys/dev/iir/iir.c,v 1.9 2003/09/26 15:36:47 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iir/iir.c,v 1.10 2004/05/19 17:46:34 scottl Exp $"); #define _IIR_C_ @@ -291,27 +291,12 @@ return (1); } - if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, - GDT_LINUX_OS, 0, 0)) { - printf("iir%d: Cache service initialization error %d\n", - gdt->sc_hanum, gdt->sc_status); - gdt_free_ccb(gdt, gccb); - return (1); - } gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_UNFREEZE_IO, 0, 0, 0); - if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_MOUNT, - 0xffff, 1, 0)) { - printf("iir%d: Cache service mount error %d\n", - gdt->sc_hanum, gdt->sc_status); - gdt_free_ccb(gdt, gccb); - return (1); - } - if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, GDT_LINUX_OS, 0, 0)) { - printf("iir%d: Cache service post-mount initialization error %d\n", + printf("iir%d: Cache service initialization error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); ==== //depot/projects/power/sys/dev/iir/iir.h#4 (text+ko) ==== @@ -1,8 +1,8 @@ -/* $FreeBSD: src/sys/dev/iir/iir.h,v 1.8 2004/03/20 19:02:46 scottl Exp $ */ +/* $FreeBSD: src/sys/dev/iir/iir.h,v 1.9 2004/05/19 17:46:34 scottl Exp $ */ /* - * Copyright (c) 2000-03 ICP vortex GmbH - * Copyright (c) 2002-03 Intel Corporation - * Copyright (c) 2003 Adaptec Inc. + * Copyright (c) 2000-04 ICP vortex GmbH + * Copyright (c) 2002-04 Intel Corporation + * Copyright (c) 2003-04 Adaptec Inc. * All Rights Reserved * * Redistribution and use in source and binary forms, with or without @@ -41,14 +41,14 @@ * credits: Niklas Hallqvist; OpenBSD driver for the ICP Controllers. * FreeBSD.ORG; Great O/S to work on and for. * - * $Id: iir.h 1.5 2003/08/26 12:28:21 achim Exp $" + * $Id: iir.h 1.6 2004/03/30 10:19:44 achim Exp $" */ #ifndef _IIR_H #define _IIR_H #define IIR_DRIVER_VERSION 1 -#define IIR_DRIVER_SUBVERSION 4 +#define IIR_DRIVER_SUBVERSION 5 /* OEM IDs */ #define OEM_ID_ICP 0x941c @@ -152,8 +152,10 @@ /* IOCTLs */ #define GDT_IOCTL_GENERAL _IOWR('J', 0, gdt_ucmd_t) /* general IOCTL */ -#define GDT_IOCTL_DRVERS _IOWR('J', 1, int) /* get driver version */ -#define GDT_IOCTL_CTRTYPE _IOR('J', 2, gdt_ctrt_t) /* get ctr. type */ +#define GDT_IOCTL_DRVERS _IOR('J', 1, int) /* get driver version */ +#define GDT_IOCTL_CTRTYPE _IOWR('J', 2, gdt_ctrt_t) /* get ctr. type */ +#define GDT_IOCTL_DRVERS_OLD _IOWR('J', 1, int) /* get driver version */ +#define GDT_IOCTL_CTRTYPE_OLD _IOR('J', 2, gdt_ctrt_t) /* get ctr. type */ #define GDT_IOCTL_OSVERS _IOR('J', 3, gdt_osv_t) /* get OS version */ #define GDT_IOCTL_CTRCNT _IOR('J', 5, int) /* get ctr. count */ #define GDT_IOCTL_EVENT _IOWR('J', 8, gdt_event_t) /* get event */ ==== //depot/projects/power/sys/dev/iir/iir_ctrl.c#4 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iir/iir_ctrl.c,v 1.13 2004/02/21 21:10:42 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iir/iir_ctrl.c,v 1.14 2004/05/19 17:46:34 scottl Exp $"); #include #include @@ -261,11 +261,13 @@ } case GDT_IOCTL_DRVERS: + case GDT_IOCTL_DRVERS_OLD: *(int *)cmdarg = (IIR_DRIVER_VERSION << 8) | IIR_DRIVER_SUBVERSION; break; case GDT_IOCTL_CTRTYPE: + case GDT_IOCTL_CTRTYPE_OLD: { gdt_ctrt_t *p; struct gdt_softc *gdt; ==== //depot/projects/power/sys/dev/pccbb/pccbb.c#13 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.110 2004/05/04 02:25:00 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.111 2004/05/21 06:10:13 imp Exp $"); #include #include @@ -687,7 +687,7 @@ static int cbb_attach(device_t brdev) { - static int curr_bus_number = 1; /* XXX EVILE BAD (see below) */ + static int curr_bus_number = 2; /* XXX EVILE BAD (see below) */ struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); int rid, bus, pribus; device_t parent; ==== //depot/projects/power/sys/dev/pccbb/pccbbvar.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pccbb/pccbbvar.h,v 1.19 2003/06/12 03:37:28 imp Exp $ + * $FreeBSD: src/sys/dev/pccbb/pccbbvar.h,v 1.20 2004/05/21 06:10:13 imp Exp $ */ /* ==== //depot/projects/power/sys/dev/pci/pci.c#17 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pci/pci.c,v 1.250 2004/04/28 13:43:11 tmm Exp $ + * $FreeBSD: src/sys/dev/pci/pci.c,v 1.251 2004/05/21 06:03:26 imp Exp $ * */ @@ -1091,7 +1091,8 @@ struct pci_devinfo *dinfo; int i; - device_printf(dev, "driver added\n"); + if (bootverbose) + device_printf(dev, "driver added\n"); DEVICE_IDENTIFY(driver, dev); device_get_children(dev, &devlist, &numdevs); for (i = 0; i < numdevs; i++) { @@ -1101,8 +1102,9 @@ dinfo = device_get_ivars(child); pci_print_verbose(dinfo); /*XXX???*/ /* resource_list_init(&dinfo->cfg.resources); */ - printf("pci%d:%d:%d: reprobing on driver added\n", - dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func); + if (bootverbose) + printf("pci%d:%d:%d: reprobing on driver added\n", + dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func); pci_cfg_restore(child, dinfo); if (device_probe_and_attach(child) != 0) pci_cfg_save(child, dinfo, 1); @@ -1582,9 +1584,10 @@ if (rle == NULL) panic("pci_alloc_map: unexpedly can't find resource."); rle->res = res; - /* if (bootverbose) */ - device_printf(child, "Lazy allocation of %#lx bytes rid %#x type %d at %#lx\n", - count, *rid, type, rman_get_start(res)); + if (bootverbose) + device_printf(child, + "Lazy allocation of %#lx bytes rid %#x type %d at %#lx\n", + count, *rid, type, rman_get_start(res)); map = rman_get_start(res); out:; pci_write_config(child, *rid, map, 4); @@ -1653,11 +1656,11 @@ */ rle = resource_list_find(rl, type, *rid); if (rle != NULL && rle->res != NULL) { - /* if (bootverbose) */ - device_printf(child, + if (bootverbose) + device_printf(child, "Reserved %#lx bytes for rid %#x type %d at %#lx\n", - rman_get_size(rle->res), *rid, type, - rman_get_start(rle->res)); + rman_get_size(rle->res), *rid, type, + rman_get_start(rle->res)); if ((flags & RF_ACTIVE) && bus_generic_activate_resource(dev, child, type, *rid, rle->res) != 0) @@ -1817,9 +1820,11 @@ * state D0. */ if (pci_do_powerstate && (pci_get_powerstate(dev) != PCI_POWERSTATE_D0)) { - printf("pci%d:%d:%d: Transition from D%d to D0\n", dinfo->cfg.bus, - dinfo->cfg.slot, dinfo->cfg.func, - pci_get_powerstate(dev)); + if (bootverbose) + printf( + "pci%d:%d:%d: Transition from D%d to D0\n", + dinfo->cfg.bus, dinfo->cfg.slot, dinfo->cfg.func, + pci_get_powerstate(dev)); pci_set_powerstate(dev, PCI_POWERSTATE_D0); } for (i = 0; i < dinfo->cfg.nummaps; i++) @@ -1888,13 +1893,19 @@ */ ps = pci_get_powerstate(dev); if (ps != PCI_POWERSTATE_D0 && ps != PCI_POWERSTATE_D3) { - printf("pci%d:%d:%d: Transition from D%d to D0\n", dinfo->cfg.bus, - dinfo->cfg.slot, dinfo->cfg.func, ps); + if (bootverbose) >>> TRUNCATED FOR MAIL (1000 lines) <<<