Date: Mon, 12 Nov 2012 12:24:36 +0000 (UTC) From: Andre Oppermann <andre@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r242912 - in user/andre/tcp_workqueue/sys: boot/pc98 boot/pc98/boot2 boot/pc98/btx/btx boot/pc98/libpc98 cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/opensolaris/uts/common/f... Message-ID: <201211121224.qACCOaPf013085@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andre Date: Mon Nov 12 12:24:36 2012 New Revision: 242912 URL: http://svnweb.freebsd.org/changeset/base/242912 Log: Integrate from HEAD @242911. Modified: user/andre/tcp_workqueue/sys/boot/pc98/Makefile.inc user/andre/tcp_workqueue/sys/boot/pc98/boot2/boot2.c user/andre/tcp_workqueue/sys/boot/pc98/btx/btx/btx.S user/andre/tcp_workqueue/sys/boot/pc98/libpc98/comconsole.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c user/andre/tcp_workqueue/sys/conf/Makefile.pc98 user/andre/tcp_workqueue/sys/conf/files user/andre/tcp_workqueue/sys/conf/kern.pre.mk user/andre/tcp_workqueue/sys/dev/ath/if_ath.c user/andre/tcp_workqueue/sys/dev/ath/if_ath_sysctl.c user/andre/tcp_workqueue/sys/dev/ath/if_ath_tx_edma.c user/andre/tcp_workqueue/sys/dev/ath/if_athvar.h user/andre/tcp_workqueue/sys/dev/ct/bshw_machdep.c user/andre/tcp_workqueue/sys/dev/ct/ct.c user/andre/tcp_workqueue/sys/dev/ct/ct_isa.c user/andre/tcp_workqueue/sys/dev/ct/ct_machdep.h user/andre/tcp_workqueue/sys/dev/nve/if_nve.c user/andre/tcp_workqueue/sys/dev/snc/dp83932.c user/andre/tcp_workqueue/sys/dev/snc/dp83932subr.c user/andre/tcp_workqueue/sys/dev/snc/if_snc.c user/andre/tcp_workqueue/sys/dev/snc/if_snc_cbus.c user/andre/tcp_workqueue/sys/dev/usb/serial/u3g.c user/andre/tcp_workqueue/sys/dev/usb/usbdevs user/andre/tcp_workqueue/sys/dev/xen/netback/netback_unit_tests.c user/andre/tcp_workqueue/sys/fs/cd9660/cd9660_vfsops.c user/andre/tcp_workqueue/sys/fs/devfs/devfs_vfsops.c user/andre/tcp_workqueue/sys/fs/ext2fs/ext2_vfsops.c user/andre/tcp_workqueue/sys/fs/fdescfs/fdesc_vfsops.c user/andre/tcp_workqueue/sys/fs/fuse/fuse_vfsops.c user/andre/tcp_workqueue/sys/fs/msdosfs/msdosfs_vfsops.c user/andre/tcp_workqueue/sys/fs/nandfs/nandfs_vfsops.c user/andre/tcp_workqueue/sys/fs/nfsclient/nfs_clvfsops.c user/andre/tcp_workqueue/sys/fs/nullfs/null_vfsops.c user/andre/tcp_workqueue/sys/fs/pseudofs/pseudofs.c user/andre/tcp_workqueue/sys/fs/tmpfs/tmpfs_vfsops.c user/andre/tcp_workqueue/sys/fs/udf/udf_vfsops.c user/andre/tcp_workqueue/sys/fs/unionfs/union_vfsops.c user/andre/tcp_workqueue/sys/fs/unionfs/union_vnops.c user/andre/tcp_workqueue/sys/gnu/fs/reiserfs/reiserfs_vfsops.c user/andre/tcp_workqueue/sys/i386/include/vmparam.h user/andre/tcp_workqueue/sys/kern/kern_mbuf.c user/andre/tcp_workqueue/sys/kern/sched_ule.c user/andre/tcp_workqueue/sys/kern/subr_param.c user/andre/tcp_workqueue/sys/kern/uipc_mqueue.c user/andre/tcp_workqueue/sys/kern/vfs_subr.c user/andre/tcp_workqueue/sys/modules/mthca/Makefile user/andre/tcp_workqueue/sys/netinet/tcp_timewait.c user/andre/tcp_workqueue/sys/netpfil/ipfw/ip_fw_dynamic.c user/andre/tcp_workqueue/sys/nfsclient/nfs_vfsops.c user/andre/tcp_workqueue/sys/ofed/include/linux/cdev.h user/andre/tcp_workqueue/sys/pc98/include/bus.h user/andre/tcp_workqueue/sys/pc98/pc98/machdep.c user/andre/tcp_workqueue/sys/powerpc/include/bat.h user/andre/tcp_workqueue/sys/sys/_mutex.h user/andre/tcp_workqueue/sys/sys/_rwlock.h user/andre/tcp_workqueue/sys/sys/mount.h user/andre/tcp_workqueue/sys/ufs/ffs/ffs_vfsops.c user/andre/tcp_workqueue/sys/vm/vm_map.c Directory Properties: user/andre/tcp_workqueue/sys/ (props changed) user/andre/tcp_workqueue/sys/boot/ (props changed) user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/ (props changed) user/andre/tcp_workqueue/sys/conf/ (props changed) Modified: user/andre/tcp_workqueue/sys/boot/pc98/Makefile.inc ============================================================================== --- user/andre/tcp_workqueue/sys/boot/pc98/Makefile.inc Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/boot/pc98/Makefile.inc Mon Nov 12 12:24:36 2012 (r242912) @@ -5,9 +5,9 @@ BINDIR?= /boot LOADER_ADDRESS?=0x200000 -CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float \ - -Os -DPC98 +CFLAGS+= -march=i386 -ffreestanding -mpreferred-stack-boundary=2 \ + -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -Os -DPC98 LDFLAGS+= -nostdlib # BTX components Modified: user/andre/tcp_workqueue/sys/boot/pc98/boot2/boot2.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/pc98/boot2/boot2.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/boot/pc98/boot2/boot2.c Mon Nov 12 12:24:36 2012 (r242912) @@ -554,8 +554,10 @@ parse() } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } else { for (q = arg--; *q && *q != '('; q++); if (*q) { Modified: user/andre/tcp_workqueue/sys/boot/pc98/btx/btx/btx.S ============================================================================== --- user/andre/tcp_workqueue/sys/boot/pc98/btx/btx/btx.S Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/boot/pc98/btx/btx/btx.S Mon Nov 12 12:24:36 2012 (r242912) @@ -840,7 +840,7 @@ putstr: lodsb # Load char .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD /* - * void sio_init(void) + * int sio_init(void) */ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg movb $SIO_FMT|0x80,%al # Set format @@ -856,14 +856,19 @@ sio_init: movw $SIO_PRT+0x3,%dx # Data movb $0x3,%al # Set RTS, outb %al,(%dx) # DTR incl %edx # Line status reg + call sio_getc.1 # Get character /* - * void sio_flush(void) + * int sio_flush(void) */ -sio_flush.0: call sio_getc.1 # Get character -sio_flush: call sio_ischar # Check for character - jnz sio_flush.0 # Till none - ret # To caller +sio_flush: xorl %eax,%eax # Return value + xorl %ecx,%ecx # Timeout + movb $0x80,%ch # counter +sio_flush.1: call sio_ischar # Check for character + jz sio_flush.2 # Till none + loop sio_flush.1 # or counter is zero + movb $1, %al # Exhausted all tries +sio_flush.2: ret # To caller /* * void sio_putc(int c) Modified: user/andre/tcp_workqueue/sys/boot/pc98/libpc98/comconsole.c ============================================================================== --- user/andre/tcp_workqueue/sys/boot/pc98/libpc98/comconsole.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/boot/pc98/libpc98/comconsole.c Mon Nov 12 12:24:36 2012 (r242912) @@ -63,7 +63,6 @@ static void comc_setup(int speed, int po static int comc_speed_set(struct env_var *ev, int flags, const void *value); -static int comc_started; static int comc_curspeed; static int comc_port = COMPORT; static uint32_t comc_locator; @@ -87,9 +86,6 @@ comc_probe(struct console *cp) int speed, port; uint32_t locator; - /* XXX check the BIOS equipment list? */ - cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT); - if (comc_curspeed == 0) { comc_curspeed = COMSPEED; /* @@ -137,18 +133,19 @@ comc_probe(struct console *cp) env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set, env_nounset); } + comc_setup(comc_curspeed, comc_port); } static int comc_init(int arg) { - if (comc_started && arg == 0) - return 0; - comc_started = 1; comc_setup(comc_curspeed, comc_port); - return(0); + if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == + (C_PRESENTIN | C_PRESENTOUT)) + return (CMD_OK); + return (CMD_ERROR); } static void @@ -166,13 +163,13 @@ comc_putchar(int c) static int comc_getchar(void) { - return(comc_ischar() ? inb(comc_port + com_data) : -1); + return (comc_ischar() ? inb(comc_port + com_data) : -1); } static int comc_ischar(void) { - return(inb(comc_port + com_lsr) & LSR_RXRDY); + return (inb(comc_port + com_lsr) & LSR_RXRDY); } static int @@ -185,7 +182,8 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if (comc_started && comc_curspeed != speed) + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -203,7 +201,8 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if (comc_started && comc_port != port) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_port != port) { comc_setup(comc_curspeed, port); set_hw_console_hint(); } @@ -305,7 +304,8 @@ comc_pcidev_set(struct env_var *ev, int printf("Invalid pcidev\n"); return (CMD_ERROR); } - if (comc_started && comc_locator != locator) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_locator != locator) { error = comc_pcidev_handle(locator); if (error != CMD_OK) return (error); @@ -317,6 +317,8 @@ comc_pcidev_set(struct env_var *ev, int static void comc_setup(int speed, int port) { + static int TRY_COUNT = 1000000; + int tries; comc_curspeed = speed; comc_port = port; @@ -327,9 +329,15 @@ comc_setup(int speed, int port) outb(comc_port + com_cfcr, COMC_FMT); outb(comc_port + com_mcr, MCR_RTS | MCR_DTR); + tries = 0; do inb(comc_port + com_data); - while (inb(comc_port + com_lsr) & LSR_RXRDY); + while (inb(comc_port + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT); + + if (tries < TRY_COUNT) + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); + else + comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); } static int Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 12 12:24:36 2012 (r242912) @@ -191,6 +191,7 @@ uint64_t zfs_arc_meta_limit = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; +int zfs_disable_dup_eviction = 0; TUNABLE_QUAD("vfs.zfs.arc_max", &zfs_arc_max); TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min); @@ -321,7 +322,6 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_io_error; kstat_named_t arcstat_l2_size; kstat_named_t arcstat_l2_hdr_size; - kstat_named_t arcstat_memory_throttle_count; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; kstat_named_t arcstat_l2_write_spa_mismatch; @@ -334,6 +334,10 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_write_buffer_bytes_scanned; kstat_named_t arcstat_l2_write_buffer_list_iter; kstat_named_t arcstat_l2_write_buffer_list_null_iter; + kstat_named_t arcstat_memory_throttle_count; + kstat_named_t arcstat_duplicate_buffers; + kstat_named_t arcstat_duplicate_buffers_size; + kstat_named_t arcstat_duplicate_reads; } arc_stats_t; static arc_stats_t arc_stats = { @@ -391,7 +395,6 @@ static arc_stats_t arc_stats = { { "l2_io_error", KSTAT_DATA_UINT64 }, { "l2_size", KSTAT_DATA_UINT64 }, { "l2_hdr_size", KSTAT_DATA_UINT64 }, - { "memory_throttle_count", KSTAT_DATA_UINT64 }, { "l2_write_trylock_fail", KSTAT_DATA_UINT64 }, { "l2_write_passed_headroom", KSTAT_DATA_UINT64 }, { "l2_write_spa_mismatch", KSTAT_DATA_UINT64 }, @@ -403,7 +406,11 @@ static arc_stats_t arc_stats = { { "l2_write_pios", KSTAT_DATA_UINT64 }, { "l2_write_buffer_bytes_scanned", KSTAT_DATA_UINT64 }, { "l2_write_buffer_list_iter", KSTAT_DATA_UINT64 }, - { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 } + { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 }, + { "memory_throttle_count", KSTAT_DATA_UINT64 }, + { "duplicate_buffers", KSTAT_DATA_UINT64 }, + { "duplicate_buffers_size", KSTAT_DATA_UINT64 }, + { "duplicate_reads", KSTAT_DATA_UINT64 } }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -1518,6 +1525,17 @@ arc_buf_clone(arc_buf_t *from) hdr->b_buf = buf; arc_get_data_buf(buf); bcopy(from->b_data, buf->b_data, size); + + /* + * This buffer already exists in the arc so create a duplicate + * copy for the caller. If the buffer is associated with user data + * then track the size and number of duplicates. These stats will be + * updated as duplicate buffers are created and destroyed. + */ + if (hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMP(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, size); + } hdr->b_datacnt += 1; return (buf); } @@ -1618,6 +1636,16 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ ASSERT3U(state->arcs_size, >=, size); atomic_add_64(&state->arcs_size, -size); buf->b_data = NULL; + + /* + * If we're destroying a duplicate buffer make sure + * that the appropriate statistics are updated. + */ + if (buf->b_hdr->b_datacnt > 1 && + buf->b_hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMPDOWN(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, -size); + } ASSERT(buf->b_hdr->b_datacnt > 0); buf->b_hdr->b_datacnt -= 1; } @@ -1802,6 +1830,48 @@ arc_buf_size(arc_buf_t *buf) } /* + * Called from the DMU to determine if the current buffer should be + * evicted. In order to ensure proper locking, the eviction must be initiated + * from the DMU. Return true if the buffer is associated with user data and + * duplicate buffers still exist. + */ +boolean_t +arc_buf_eviction_needed(arc_buf_t *buf) +{ + arc_buf_hdr_t *hdr; + boolean_t evict_needed = B_FALSE; + + if (zfs_disable_dup_eviction) + return (B_FALSE); + + mutex_enter(&buf->b_evict_lock); + hdr = buf->b_hdr; + if (hdr == NULL) { + /* + * We are in arc_do_user_evicts(); let that function + * perform the eviction. + */ + ASSERT(buf->b_data == NULL); + mutex_exit(&buf->b_evict_lock); + return (B_FALSE); + } else if (buf->b_data == NULL) { + /* + * We have already been added to the arc eviction list; + * recommend eviction. + */ + ASSERT3P(hdr, ==, &arc_eviction_hdr); + mutex_exit(&buf->b_evict_lock); + return (B_TRUE); + } + + if (hdr->b_datacnt > 1 && hdr->b_type == ARC_BUFC_DATA) + evict_needed = B_TRUE; + + mutex_exit(&buf->b_evict_lock); + return (evict_needed); +} + +/* * Evict buffers from list until we've removed the specified number of * bytes. Move the removed buffers to the appropriate evict state. * If the recycle flag is set, then attempt to "recycle" a buffer: @@ -2887,8 +2957,10 @@ arc_read_done(zio_t *zio) abuf = buf; for (acb = callback_list; acb; acb = acb->acb_next) { if (acb->acb_done) { - if (abuf == NULL) + if (abuf == NULL) { + ARCSTAT_BUMP(arcstat_duplicate_reads); abuf = arc_buf_clone(buf); + } acb->acb_buf = abuf; abuf = NULL; } @@ -3434,6 +3506,16 @@ arc_release(arc_buf_t *buf, void *tag) ASSERT3U(*size, >=, hdr->b_size); atomic_add_64(size, -hdr->b_size); } + + /* + * We're releasing a duplicate user data buffer, update + * our statistics accordingly. + */ + if (hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMPDOWN(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, + -hdr->b_size); + } hdr->b_datacnt -= 1; arc_cksum_verify(buf); #ifdef illumos Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Nov 12 12:24:36 2012 (r242912) @@ -2089,7 +2089,24 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, dbuf_evict(db); } else { VERIFY(arc_buf_remove_ref(db->db_buf, db) == 0); - if (!DBUF_IS_CACHEABLE(db)) + + /* + * A dbuf will be eligible for eviction if either the + * 'primarycache' property is set or a duplicate + * copy of this buffer is already cached in the arc. + * + * In the case of the 'primarycache' a buffer + * is considered for eviction if it matches the + * criteria set in the property. + * + * To decide if our buffer is considered a + * duplicate, we must call into the arc to determine + * if multiple buffers are referencing the same + * block on-disk. If so, then we simply evict + * ourselves. + */ + if (!DBUF_IS_CACHEABLE(db) || + arc_buf_eviction_needed(db->db_buf)) dbuf_clear(db); else mutex_exit(&db->db_mtx); Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Mon Nov 12 12:24:36 2012 (r242912) @@ -99,6 +99,7 @@ int arc_released(arc_buf_t *buf); int arc_has_callback(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); void arc_buf_thaw(arc_buf_t *buf); +boolean_t arc_buf_eviction_needed(arc_buf_t *buf); #ifdef ZFS_DEBUG int arc_referenced(arc_buf_t *buf); #endif Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Nov 12 12:24:36 2012 (r242912) @@ -3245,6 +3245,7 @@ zfs_ioc_destroy_snaps_nvl(zfs_cmd_t *zc) } (void) zfs_unmount_snap(name, NULL); + (void) zvol_remove_minor(name); } err = dmu_snapshots_destroy_nvl(nvl, zc->zc_defer_destroy, Modified: user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Nov 12 12:24:36 2012 (r242912) @@ -1132,7 +1132,6 @@ zfs_domount(vfs_t *vfsp, char *osname) vfsp->vfs_data = zfsvfs; vfsp->mnt_flag |= MNT_LOCAL; - vfsp->mnt_kern_flag |= MNTK_MPSAFE; vfsp->mnt_kern_flag |= MNTK_LOOKUP_SHARED; vfsp->mnt_kern_flag |= MNTK_SHARED_WRITES; vfsp->mnt_kern_flag |= MNTK_EXTENDED_SHARED; Modified: user/andre/tcp_workqueue/sys/conf/Makefile.pc98 ============================================================================== --- user/andre/tcp_workqueue/sys/conf/Makefile.pc98 Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/conf/Makefile.pc98 Mon Nov 12 12:24:36 2012 (r242912) @@ -34,6 +34,10 @@ MACHINE=pc98 MKMODULESENV+= MACHINE=${MACHINE} +# XXX: clang integrated-as doesn't grok .codeNN directives yet +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS} +ASM_CFLAGS+= ${ASM_CFLAGS.${.IMPSRC:T}} + %BEFORE_DEPEND %OBJS Modified: user/andre/tcp_workqueue/sys/conf/files ============================================================================== --- user/andre/tcp_workqueue/sys/conf/files Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/conf/files Mon Nov 12 12:24:36 2012 (r242912) @@ -1163,15 +1163,14 @@ dev/drm/mach64_state.c optional mach64d dev/drm/mga_dma.c optional mgadrm dev/drm/mga_drv.c optional mgadrm dev/drm/mga_irq.c optional mgadrm -dev/drm/mga_state.c optional mgadrm \ - compile-with "${NORMAL_C} -finline-limit=13500" +dev/drm/mga_state.c optional mgadrm dev/drm/mga_warp.c optional mgadrm dev/drm/r128_cce.c optional r128drm \ compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" dev/drm/r128_drv.c optional r128drm dev/drm/r128_irq.c optional r128drm dev/drm/r128_state.c optional r128drm \ - compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} -finline-limit=13500" + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE}" dev/drm/r300_cmdbuf.c optional radeondrm dev/drm/r600_blit.c optional radeondrm dev/drm/r600_cp.c optional radeondrm \ Modified: user/andre/tcp_workqueue/sys/conf/kern.pre.mk ============================================================================== --- user/andre/tcp_workqueue/sys/conf/kern.pre.mk Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/conf/kern.pre.mk Mon Nov 12 12:24:36 2012 (r242912) @@ -156,7 +156,7 @@ NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLA # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. OFEDINCLUDES= -I$S/ofed/include/ -OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions +OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith -fms-extensions -Wno-switch -Wno-sometimes-uninitialized -Wno-conversion -Wno-initializer-overrides OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} OFED_C= ${OFED_C_NOIMP} ${.IMPSRC} Modified: user/andre/tcp_workqueue/sys/dev/ath/if_ath.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/if_ath.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ath/if_ath.c Mon Nov 12 12:24:36 2012 (r242912) @@ -5598,6 +5598,13 @@ ath_node_set_tim(struct ieee80211_node * #else struct ath_vap *avp = ATH_VAP(ni->ni_vap); + /* + * Some operating omdes don't set av_set_tim(), so don't + * update it here. + */ + if (avp->av_set_tim == NULL) + return (0); + return (avp->av_set_tim(ni, enable)); #endif /* ATH_SW_PSQ */ } Modified: user/andre/tcp_workqueue/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/if_ath_sysctl.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ath/if_ath_sysctl.c Mon Nov 12 12:24:36 2012 (r242912) @@ -711,7 +711,7 @@ ath_sysctlattach(struct ath_softc *sc) } #endif -#ifdef ATH_DEBUG +#ifdef ATH_DEBUG_ALQ ath_sysctl_alq_attach(sc); #endif } Modified: user/andre/tcp_workqueue/sys/dev/ath/if_ath_tx_edma.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/if_ath_tx_edma.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ath/if_ath_tx_edma.c Mon Nov 12 12:24:36 2012 (r242912) @@ -594,13 +594,26 @@ ath_edma_tx_processq(struct ath_softc *s * in the TX descriptor. However the TX completion * FIFO doesn't have this information. So here we * do a separate HAL call to populate that information. + * + * The same problem exists with ts_longretry. + * The FreeBSD HAL corrects ts_longretry in the HAL layer; + * the AR9380 HAL currently doesn't. So until the HAL + * is imported and this can be added, we correct for it + * here. */ - /* XXX TODO */ /* XXX faked for now. Ew. */ if (ts.ts_finaltsi < 4) { ts.ts_rate = bf->bf_state.bfs_rc[ts.ts_finaltsi].ratecode; + switch (ts.ts_finaltsi) { + case 3: ts.ts_longretry += + bf->bf_state.bfs_rc[2].tries; + case 2: ts.ts_longretry += + bf->bf_state.bfs_rc[1].tries; + case 1: ts.ts_longretry += + bf->bf_state.bfs_rc[0].tries; + } } else { device_printf(sc->sc_dev, "%s: finaltsi=%d\n", __func__, Modified: user/andre/tcp_workqueue/sys/dev/ath/if_athvar.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ath/if_athvar.h Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ath/if_athvar.h Mon Nov 12 12:24:36 2012 (r242912) @@ -774,7 +774,7 @@ struct ath_softc { struct task sc_dfstask; /* DFS processing task */ /* ALQ */ -#ifdef ATH_DEBUG +#ifdef ATH_DEBUG_ALQ struct if_ath_alq sc_alq; #endif Modified: user/andre/tcp_workqueue/sys/dev/ct/bshw_machdep.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ct/bshw_machdep.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ct/bshw_machdep.c Mon Nov 12 12:24:36 2012 (r242912) @@ -78,9 +78,7 @@ typedef unsigned long vaddr_t; * GENERIC MACHDEP FUNCTIONS *********************************************************/ void -bshw_synch_setup(ct, ti) - struct ct_softc *ct; - struct targ_info *ti; +bshw_synch_setup(struct ct_softc *ct, struct targ_info *ti) { struct ct_bus_access_handle *chp = &ct->sc_ch; struct ct_targ_info *cti = (void *) ti; @@ -99,8 +97,7 @@ bshw_synch_setup(ct, ti) } void -bshw_bus_reset(ct) - struct ct_softc *ct; +bshw_bus_reset(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -149,9 +146,7 @@ bshw_bus_reset(ct) /* probe */ int -bshw_read_settings(chp, bs) - struct ct_bus_access_handle *chp; - struct bshw_softc *bs; +bshw_read_settings(struct ct_bus_access_handle *chp, struct bshw_softc *bs) { static int irq_tbl[] = { 3, 5, 6, 9, 12, 13 }; @@ -183,8 +178,7 @@ static __inline void bshw_lc_smit_stop(s static int bshw_lc_smit_fstat(struct ct_softc *, int, int); static __inline void -bshw_lc_smit_stop(ct) - struct ct_softc *ct; +bshw_lc_smit_stop(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -193,10 +187,7 @@ bshw_lc_smit_stop(ct) } static __inline void -bshw_lc_smit_start(ct, count, direction) - struct ct_softc *ct; - int count; - u_int direction; +bshw_lc_smit_start(struct ct_softc *ct, int count, u_int direction) { struct ct_bus_access_handle *chp = &ct->sc_ch; u_int8_t pval, val; @@ -212,9 +203,7 @@ bshw_lc_smit_start(ct, count, direction) } static int -bshw_lc_smit_fstat(ct, wc, read) - struct ct_softc *ct; - int wc, read; +bshw_lc_smit_fstat(struct ct_softc *ct, int wc, int read) { struct ct_bus_access_handle *chp = &ct->sc_ch; u_int8_t stat; @@ -244,8 +233,7 @@ bshw_lc_smit_fstat(ct, wc, read) } void -bshw_smit_xfer_stop(ct) - struct ct_softc *ct; +bshw_smit_xfer_stop(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct bshw_softc *bs = ct->ct_hw; @@ -292,8 +280,7 @@ bad: } int -bshw_smit_xfer_start(ct) - struct ct_softc *ct; +bshw_smit_xfer_start(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -396,8 +383,7 @@ static void bshw_dmastart(struct ct_soft static void bshw_dmadone(struct ct_softc *); int -bshw_dma_xfer_start(ct) - struct ct_softc *ct; +bshw_dma_xfer_start(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct sc_p *sp = &slp->sl_scp; @@ -458,8 +444,7 @@ bshw_dma_xfer_start(ct) } void -bshw_dma_xfer_stop(ct) - struct ct_softc *ct; +bshw_dma_xfer_stop(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct sc_p *sp = &slp->sl_scp; @@ -523,10 +508,8 @@ bshw_dma_xfer_stop(ct) static bus_addr_t dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 }; static __inline void -bshw_dma_write_1(chp, port, val) - struct ct_bus_access_handle *chp; - bus_addr_t port; - u_int8_t val; +bshw_dma_write_1(struct ct_bus_access_handle *chp, bus_addr_t port, + u_int8_t val) { CT_BUS_WEIGHT(chp); @@ -534,8 +517,7 @@ bshw_dma_write_1(chp, port, val) } static void -bshw_dmastart(ct) - struct ct_softc *ct; +bshw_dmastart(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct bshw_softc *bs = ct->ct_hw; @@ -581,8 +563,7 @@ bshw_dmastart(ct) } static void -bshw_dmadone(ct) - struct ct_softc *ct; +bshw_dmadone(struct ct_softc *ct) { struct bshw_softc *bs = ct->ct_hw; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -609,8 +590,7 @@ static void bshw_dma_start_elecom(struct static void bshw_dma_stop_elecom(struct ct_softc *); static int -bshw_dma_init_texa(ct) - struct ct_softc *ct; +bshw_dma_init_texa(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; u_int8_t regval; @@ -625,8 +605,7 @@ bshw_dma_init_texa(ct) } static int -bshw_dma_init_sc98(ct) - struct ct_softc *ct; +bshw_dma_init_sc98(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -652,8 +631,7 @@ bshw_dma_init_sc98(ct) } static void -bshw_dma_start_sc98(ct) - struct ct_softc *ct; +bshw_dma_start_sc98(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -662,8 +640,7 @@ bshw_dma_start_sc98(ct) } static void -bshw_dma_stop_sc98(ct) - struct ct_softc *ct; +bshw_dma_stop_sc98(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -672,8 +649,7 @@ bshw_dma_stop_sc98(ct) } static void -bshw_dma_start_elecom(ct) - struct ct_softc *ct; +bshw_dma_start_elecom(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; u_int8_t tmp = ct_cr_read_1(chp, 0x4c); @@ -682,8 +658,7 @@ bshw_dma_start_elecom(ct) } static void -bshw_dma_stop_elecom(ct) - struct ct_softc *ct; +bshw_dma_stop_elecom(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; u_int8_t tmp = ct_cr_read_1(chp, 0x4c); Modified: user/andre/tcp_workqueue/sys/dev/ct/ct.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ct/ct.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ct/ct.c Mon Nov 12 12:24:36 2012 (r242912) @@ -164,9 +164,7 @@ struct scsi_low_funcs ct_funcs = { * HW functions **************************************************/ static __inline void -cthw_phase_bypass(ct, ph) - struct ct_softc *ct; - u_int8_t ph; +cthw_phase_bypass(struct ct_softc *ct, u_int8_t ph) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -175,8 +173,7 @@ cthw_phase_bypass(ct, ph) } static void -cthw_bus_reset(ct) - struct ct_softc *ct; +cthw_bus_reset(struct ct_softc *ct) { /* @@ -187,10 +184,8 @@ cthw_bus_reset(ct) } static int -cthw_chip_reset(chp, chiprevp, chipclk, hostid) - struct ct_bus_access_handle *chp; - int *chiprevp; - int chipclk, hostid; +cthw_chip_reset(struct ct_bus_access_handle *chp, int *chiprevp, int chipclk, + int hostid) { #define CT_SELTIMEOUT_20MHz_REGV (0x80) u_int8_t aux, regv; @@ -285,8 +280,7 @@ out: } static struct ct_synch_data * -ct_make_synch_table(ct) - struct ct_softc *ct; +ct_make_synch_table(struct ct_softc *ct) { struct ct_synch_data *sdtp, *sdp; u_int base, i, period; @@ -329,11 +323,8 @@ ct_make_synch_table(ct) * Attach & Probe **************************************************/ int -ctprobesubr(chp, dvcfg, hsid, chipclk, chiprevp) - struct ct_bus_access_handle *chp; - u_int dvcfg, chipclk; - int hsid; - int *chiprevp; +ctprobesubr(struct ct_bus_access_handle *chp, u_int dvcfg, int hsid, + u_int chipclk, int *chiprevp) { #if 0 @@ -346,8 +337,7 @@ ctprobesubr(chp, dvcfg, hsid, chipclk, c } void -ctattachsubr(ct) - struct ct_softc *ct; +ctattachsubr(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; @@ -362,8 +352,7 @@ ctattachsubr(ct) * SCSI LOW interface functions **************************************************/ static void -cthw_attention(ct) - struct ct_softc *ct; +cthw_attention(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -380,8 +369,7 @@ cthw_attention(ct) } static void -ct_attention(ct) - struct ct_softc *ct; +ct_attention(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; @@ -398,10 +386,7 @@ ct_attention(ct) } static int -ct_targ_init(ct, ti, action) - struct ct_softc *ct; - struct targ_info *ti; - int action; +ct_targ_init(struct ct_softc *ct, struct targ_info *ti, int action) { struct ct_targ_info *cti = (void *) ti; @@ -438,9 +423,7 @@ ct_targ_init(ct, ti, action) } static int -ct_world_start(ct, fdone) - struct ct_softc *ct; - int fdone; +ct_world_start(struct ct_softc *ct, int fdone) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -470,9 +453,7 @@ ct_world_start(ct, fdone) } static int -ct_start_selection(ct, cb) - struct ct_softc *ct; - struct slccb *cb; +ct_start_selection(struct ct_softc *ct, struct slccb *cb) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -544,10 +525,7 @@ ct_start_selection(ct, cb) } static int -ct_msg(ct, ti, msg) - struct ct_softc *ct; - struct targ_info *ti; - u_int msg; +ct_msg(struct ct_softc *ct, struct targ_info *ti, u_int msg) { struct ct_bus_access_handle *chp = &ct->sc_ch; struct ct_targ_info *cti = (void *) ti; @@ -599,11 +577,8 @@ ct_msg(ct, ti, msg) * <DATA PHASE> *************************************************/ static int -ct_xfer(ct, data, len, direction, statp) - struct ct_softc *ct; - u_int8_t *data; - int len, direction; - u_int *statp; +ct_xfer(struct ct_softc *ct, u_int8_t *data, int len, int direction, + u_int *statp) { struct ct_bus_access_handle *chp = &ct->sc_ch; int wc; @@ -663,8 +638,7 @@ ct_xfer(ct, data, len, direction, statp) #define CT_PADDING_BUF_SIZE 32 static void -ct_io_xfer(ct) - struct ct_softc *ct; +ct_io_xfer(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -716,9 +690,7 @@ struct ct_err ct_cmderr[] = { }; static void -ct_phase_error(ct, scsi_status) - struct ct_softc *ct; - u_int8_t scsi_status; +ct_phase_error(struct ct_softc *ct, u_int8_t scsi_status) { struct scsi_low_softc *slp = &ct->sc_sclow; struct targ_info *ti = slp->sl_Tnexus; @@ -764,9 +736,7 @@ ct_phase_error(ct, scsi_status) * ### SCSI PHASE SEQUENCER ### **************************************************/ static int -ct_reselected(ct, scsi_status) - struct ct_softc *ct; - u_int8_t scsi_status; +ct_reselected(struct ct_softc *ct, u_int8_t scsi_status) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -809,9 +779,7 @@ ct_reselected(ct, scsi_status) } static int -ct_target_nexus_establish(ct, lun, dir) - struct ct_softc *ct; - int lun, dir; +ct_target_nexus_establish(struct ct_softc *ct, int lun, int dir) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -831,8 +799,7 @@ ct_target_nexus_establish(ct, lun, dir) } static int -ct_lun_nexus_establish(ct) - struct ct_softc *ct; +ct_lun_nexus_establish(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -843,8 +810,7 @@ ct_lun_nexus_establish(ct) } static int -ct_ccb_nexus_establish(ct) - struct ct_softc *ct; +ct_ccb_nexus_establish(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -870,8 +836,7 @@ ct_ccb_nexus_establish(ct) } static int -ct_unbusy(ct) - struct ct_softc *ct; +ct_unbusy(struct ct_softc *ct) { struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; @@ -894,8 +859,7 @@ ct_unbusy(ct) } static int -ct_catch_intr(ct) - struct ct_softc *ct; +ct_catch_intr(struct ct_softc *ct) { struct ct_bus_access_handle *chp = &ct->sc_ch; int wc; @@ -913,8 +877,7 @@ ct_catch_intr(ct) } int -ctintr(arg) - void *arg; +ctintr(void *arg) { struct ct_softc *ct = arg; struct scsi_low_softc *slp = &ct->sc_sclow; Modified: user/andre/tcp_workqueue/sys/dev/ct/ct_isa.c ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ct/ct_isa.c Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ct/ct_isa.c Mon Nov 12 12:24:36 2012 (r242912) @@ -367,16 +367,14 @@ ct_dmamap(void *arg, bus_dma_segment_t * } static void -ct_isa_bus_access_weight(chp) - struct ct_bus_access_handle *chp; +ct_isa_bus_access_weight(struct ct_bus_access_handle *chp) { outb(0x5f, 0); } static void -ct_isa_dmasync_before(ct) - struct ct_softc *ct; +ct_isa_dmasync_before(struct ct_softc *ct) { if (need_pre_dma_flush) @@ -384,8 +382,7 @@ ct_isa_dmasync_before(ct) } static void -ct_isa_dmasync_after(ct) - struct ct_softc *ct; +ct_isa_dmasync_after(struct ct_softc *ct) { if (need_post_dma_flush) Modified: user/andre/tcp_workqueue/sys/dev/ct/ct_machdep.h ============================================================================== --- user/andre/tcp_workqueue/sys/dev/ct/ct_machdep.h Mon Nov 12 09:50:26 2012 (r242911) +++ user/andre/tcp_workqueue/sys/dev/ct/ct_machdep.h Mon Nov 12 12:24:36 2012 (r242912) @@ -90,8 +90,7 @@ static __inline void cthw_set_count (struct ct_bus_access_handle *, u_int); static __inline u_int8_t -ct_stat_read_1(chp) - struct ct_bus_access_handle *chp; +ct_stat_read_1(struct ct_bus_access_handle *chp) { u_int8_t regv; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211121224.qACCOaPf013085>