svn commit: r211485 - in head/usr.sbin/pc-sysinstall: backend backend-query conf doc pc-sysinstall
Author: imp Date: Thu Aug 19 05:59:27 2010 New Revision: 211485 URL: http://svn.freebsd.org/changeset/base/211485 Log: Various updates to support new pc-sysinstall directive installPackages that will install packages and all package dependencies. PR: 148606 Submitted by: John Hixon Added: head/usr.sbin/pc-sysinstall/backend-query/set-mirror.sh (contents, props changed) head/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh (contents, props changed) Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh head/usr.sbin/pc-sysinstall/backend/Makefile head/usr.sbin/pc-sysinstall/backend/functions-ftp.sh head/usr.sbin/pc-sysinstall/backend/functions-packages.sh head/usr.sbin/pc-sysinstall/backend/functions-runcommands.sh head/usr.sbin/pc-sysinstall/backend/parseconfig.sh head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf head/usr.sbin/pc-sysinstall/doc/help-index head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/Makefile == --- head/usr.sbin/pc-sysinstall/backend-query/Makefile Thu Aug 19 03:31:26 2010(r211484) +++ head/usr.sbin/pc-sysinstall/backend-query/Makefile Thu Aug 19 05:59:27 2010(r211485) @@ -3,8 +3,8 @@ FILES= detect-laptop.sh detect-nics.sh detect-emulation.sh disk-info.sh \ disk-list.sh disk-part.sh enable-net.sh get-packages.sh list-config.sh \ list-components.sh list-mirrors.sh list-packages.sh list-rsync-backups.sh \ - list-tzones.sh query-langs.sh send-logs.sh setup-ssh-keys.sh sys-mem.sh \ - test-live.sh test-netup.sh update-part-list.sh xkeyboard-layouts.sh \ + list-tzones.sh query-langs.sh send-logs.sh set-mirror.sh setup-ssh-keys.sh \ + sys-mem.sh test-live.sh test-netup.sh update-part-list.sh xkeyboard-layouts.sh \ xkeyboard-models.sh xkeyboard-variants.sh FILESMODE= ${BINMODE} FILESDIR=${SHAREDIR}/pc-sysinstall/backend-query Modified: head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh == --- head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh Thu Aug 19 03:31:26 2010(r211484) +++ head/usr.sbin/pc-sysinstall/backend-query/get-packages.sh Thu Aug 19 05:59:27 2010(r211485) @@ -31,24 +31,16 @@ . ${PROGDIR}/backend/functions.sh . ${PROGDIR}/backend/functions-packages.sh -DEFAULT_FTP_SERVER=ftp.freebsd.org -FTP_SERVER=${1} ID=`id -u` - if [ ${ID} -ne 0 ] then echo Error: must be root! exit 1 fi -if [ -z ${FTP_SERVER} ] -then - FTP_SERVER=${DEFAULT_FTP_SERVER} -fi - if [ ! -f ${PKGDIR}/INDEX ] then - get_package_index ${FTP_SERVER} + get_package_index fi if [ -f ${PKGDIR}/INDEX ] Added: head/usr.sbin/pc-sysinstall/backend-query/set-mirror.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pc-sysinstall/backend-query/set-mirror.sh Thu Aug 19 05:59:27 2010(r211485) @@ -0,0 +1,40 @@ +#!/bin/sh +#- +# Copyright (c) 2010 iXSystems, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (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$ + +. ${PROGDIR}/backend/functions.sh +. ${PROGDIR}/backend/functions-ftp.sh + +MIRROR=${1} + +if [ -z ${MIRROR} ] +then + echo Error: No mirror specified! + exit 1 +fi + +set_ftp_mirror ${MIRROR} +exit 0 Modified: head/usr.sbin/pc-sysinstall/backend/Makefile
svn commit: r211487 - in head/usr.sbin/pc-sysinstall: backend pc-sysinstall
Author: imp Date: Thu Aug 19 06:02:31 2010 New Revision: 211487 URL: http://svn.freebsd.org/changeset/base/211487 Log: Some cleanup, changed some echo's to echo_log, check for PROGDIR so that different PROGDIR's can be set. PR: 148806 Submitted by: John Hixson Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh head/usr.sbin/pc-sysinstall/backend/functions-packages.sh head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Aug 19 06:01:25 2010(r211486) +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Thu Aug 19 06:02:31 2010(r211487) @@ -123,7 +123,7 @@ start_extract_split() cd ${dir} if [ -f install.sh ] then - echo Extracting `basename ${dir}` + echo_log Extracting `basename ${dir}` echo y | sh install.sh /dev/null if [ $? != 0 ] then @@ -139,7 +139,7 @@ start_extract_split() cd ${KERNELS} if [ -f install.sh ] then - echo Extracting `basename ${KERNELS}` + echo_log Extracting `basename ${KERNELS}` echo y | sh install.sh generic /dev/null if [ $? != 0 ] then @@ -155,7 +155,7 @@ start_extract_split() cd ${SOURCE} if [ -f install.sh ] then - echo Extracting `basename ${SOURCE}` + echo_log Extracting `basename ${SOURCE}` echo y | sh install.sh all /dev/null if [ $? != 0 ] then @@ -259,8 +259,8 @@ bye EOF - # Fetch the files via ftp - echo $ INSTALL | ftp -N ${NETRC} ${FTPHOST} + # Fetch the files via ftp + echo $ INSTALL | ftp -N ${NETRC} ${FTPHOST} # Done fetching, now reset the INSFILE to our downloaded archived INSFILE=${OUTFILE} ; export INSFILE Modified: head/usr.sbin/pc-sysinstall/backend/functions-packages.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Thu Aug 19 06:01:25 2010(r211486) +++ head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Thu Aug 19 06:02:31 2010(r211487) @@ -63,6 +63,22 @@ get_package_index_by_fs() fetch_file ${INDEX_FILE} ${CONFDIR}/ 0 }; +get_package_index_size() +{ + if [ -f ${CONFDIR}/INDEX ] + then + SIZE=`ls -l ${CONFDIR}/INDEX | awk '{ print $5 }'` + else + get_ftp_mirror + FTPHOST=${VAL} + + FTPDIR=/pub/FreeBSD/releases/${FBSD_ARCH}/${FBSD_BRANCH} + FTPPATH=ftp://${FTPHOST}${FTPDIR}/packages; + + fetch -s ${FTPPATH}/INDEX.bz2 + fi +}; + get_package_index() { RES=0 Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh == --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:01:25 2010(r211486) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:02:31 2010(r211487) @@ -36,8 +36,11 @@ # User-editable configuration variables # Set this to the program location -PROGDIR=/usr/share/pc-sysinstall -export PROGDIR +if [ -z ${PROGDIR} ] +then + PROGDIR=/usr/share/pc-sysinstall + export PROGDIR +fi # Set this to the components location COMPDIR=${PROGDIR}/components ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211488 - head/usr.sbin/pc-sysinstall/backend
Author: imp Date: Thu Aug 19 06:05:05 2010 New Revision: 211488 URL: http://svn.freebsd.org/changeset/base/211488 Log: Simple patch to add support zpool virtual devices that are not currently supported. PR: 149599 Submitted by: John Hixson Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Aug 19 06:02:31 2010(r211487) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Thu Aug 19 06:05:05 2010(r211488) @@ -58,20 +58,13 @@ get_fs_line_xvars() echo $LINE | grep '^ZFS' /dev/null 2/dev/null if [ $? = 0 ] ; then ZTYPE=NONE - ZFSVARS=`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1` + ZFSVARS=`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs` - # Check if we are doing raidz setup - echo $ZFSVARS | grep ^raidz: /dev/null 2/dev/null - if [ $? = 0 ] ; then - ZTYPE=raidz - ZFSVARS=`echo $ZFSVARS | sed 's|raidz: ||g' | sed 's|raidz:||g'` - fi - - echo $ZFSVARS | grep ^mirror: /dev/null 2/dev/null - if [ $? = 0 ] ; then -ZTYPE=mirror -ZFSVARS=`echo $ZFSVARS | sed 's|mirror: ||g' | sed 's|mirror:||g'` - fi + echo $ZFSVARS | grep -E ^(disk|file|mirror|raidz(1|2)?|spare|log|cache): /dev/null 2/dev/null + if [ $? = 0 ] ; then + ZTYPE=`echo $ZFSVARS | cut -f1 -d:` + ZFSVARS=`echo $ZFSVARS | sed s|$ZTYPE: ||g | sed s|$ZTYPE:||g` + fi # Return the ZFS options if [ ${ZTYPE} = NONE ] ; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211476 - head/sys/mips/atheros
On 19-08-2010 2:03, Adrian Chadd wrote: Author: adrian Date: Thu Aug 19 02:03:12 2010 New Revision: 211476 URL: http://svn.freebsd.org/changeset/base/211476 Log: Preparation work for supporting the AR91xx and AR724x. * Implement a SoC probe function, from Linux, which determines the SoC family, type and revision. This only probes the AR71xx series SoC and (currently) panics on others. * Migrate some of the AR71XX specific hardware init (USB device, determining system frequencies) into using the cpuops introduced in an earlier commit. Other SoC specific hardware stuff (per-device flush/WB, GPIO pin wiring, Ethernet PLL setup, other things I've likely missed) will be introduced in subsequent commits. Reviewed by:imp@ Obtained from: (partially) Linux Added: head/sys/mips/atheros/ar71xx_chip.c (contents, props changed) This file has no license information. -- Joel ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211489 - in head/usr.sbin/pc-sysinstall: backend-query pc-sysinstall
Author: imp Date: Thu Aug 19 06:07:49 2010 New Revision: 211489 URL: http://svn.freebsd.org/changeset/base/211489 Log: Added -m option to disk-list to list memory disks along with standard disks. PR: 149749 Submitted by: John Hixson Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh == --- head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Thu Aug 19 06:05:05 2010(r211488) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-info.sh Thu Aug 19 06:07:49 2010(r211489) @@ -54,15 +54,18 @@ HEADS=${VAL} get_disk_sectors ${DISK} SECS=${VAL} -echo cylinders=${CYLS} -echo heads=${HEADS} -echo sectors=${SECS} # Now get the disks size in MB KB=`diskinfo -v ${1} | grep 'bytes' | cut -d '#' -f 1 | tr -s '\t' ' ' | tr -d ' '` MB=$(convert_byte_to_megabyte ${KB}) -echo size=$MB # Now get the Controller Type CTYPE=`dmesg | grep ^${1}: | grep B | cut -d '' -f 2 | cut -d ' ' -f 3-10` + + +echo cylinders=${CYLS} +echo heads=${HEADS} +echo sectors=${SECS} +echo size=$MB echo type=$CTYPE + Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh == --- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Aug 19 06:05:05 2010(r211488) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Aug 19 06:07:49 2010(r211489) @@ -25,8 +25,18 @@ # # $FreeBSD$ +ARGS=$1 + # Create our device listing SYSDISK=$(sysctl -n kern.disks) +if [ ${ARGS} = -m ] +then + MDS=`mdconfig -l` + if [ -n ${MDS} ] + then + SYSDISK=${SYSDISK} ${MDS} + fi +fi # Now loop through these devices, and list the disk drives for i in ${SYSDISK} @@ -45,6 +55,10 @@ do if [ -z $NEWLINE ]; then NEWLINE= Unknown Device fi + if echo ${DEV} | grep -E '^md[0-9]+' /dev/null 2/dev/null + then + NEWLINE= Memory Disk + fi # Save the disk list if [ ! -z $DLIST ] Modified: head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh == --- head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:05:05 2010(r211488) +++ head/usr.sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh Thu Aug 19 06:07:49 2010(r211489) @@ -143,7 +143,7 @@ case $1 in ;; # The user is wanting to query which disks are available - disk-list) ${QUERYDIR}/disk-list.sh + disk-list) ${QUERYDIR}/disk-list.sh ${2} ;; # The user is wanting to query a disk's partitions ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211490 - in head/usr.sbin/pc-sysinstall: backend examples
Author: imp Date: Thu Aug 19 06:11:06 2010 New Revision: 211490 URL: http://svn.freebsd.org/changeset/base/211490 Log: This patch to pc-sysinstall allows the setting of a new config variable for installation, which lets the user/front-end select between MBR or GPT partitioning schemes when doing a dedicated disk installation. PR: 149772 Submitted by: Kris Moore Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/examples/README Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Aug 19 06:07:49 2010(r211489) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Thu Aug 19 06:11:06 2010(r211490) @@ -406,6 +406,18 @@ setup_disk_slice() fi fi + # Check if we have a partscheme specified + echo $line | grep ^partscheme= /dev/null 2/dev/null + if [ $? = 0 ] ; then + # Found a partscheme= entry, lets read / set it + get_value_from_string ${line} + strip_white_space $VAL + PSCHEME=$VAL + if [ $PSCHEME != GPT -a $PSCHEME != MBR ] ; then +exit_err Unknown partition scheme: $PSCHEME + fi + fi + echo $line | grep ^bootManager= /dev/null 2/dev/null if [ $? = 0 ] then @@ -422,8 +434,13 @@ setup_disk_slice() if [ ! -z ${DISK} -a ! -z ${PTYPE} ] then case ${PTYPE} in - all|ALL) tmpSLICE=${DISK}p1 -run_gpart_full ${DISK} ${BMANAGER} ;; + all|ALL) if [ $PSCHEME = MBR -o -z $PSCHEME ] ; then + PSCHEME=MBR + tmpSLICE=${DISK}s1 + else + tmpSLICE=${DISK}p1 + fi +run_gpart_full ${DISK} ${BMANAGER} ${PSCHEME} ;; s1|s2|s3|s4) tmpSLICE=${DISK}${PTYPE} # Get the number of the slice we are working on s=`echo ${PTYPE} | awk '{print substr($0,length,1)}'` @@ -449,7 +466,7 @@ setup_disk_slice() # Increment our disk counter to look for next disk and unset - unset BMANAGER PTYPE DISK MIRRORDISK MIRRORBAL + unset BMANAGER PTYPE DISK MIRRORDISK MIRRORBAL PSCHEME disknum=`expr $disknum + 1` else exit_err ERROR: commitDiskPart was called without procceding disknum= and partition= entries!!! @@ -477,7 +494,7 @@ stop_gjournal() { fi } ; -# Function which runs gpart and creates a single large slice +# Function which runs gpart and creates a single large GPT partition scheme init_gpt_full_disk() { _intDISK=$1 @@ -506,14 +523,82 @@ init_gpt_full_disk() } +# Function which runs gpart and creates a single large MBR partition scheme +init_mbr_full_disk() +{ + _intDISK=$1 + _intBOOT=$2 + + startblock=63 + + # Set our sysctl so we can overwrite any geom using drives + sysctl kern.geom.debugflags=16 ${LOGOUT} 2${LOGOUT} + + # Stop any journaling + stop_gjournal ${_intDISK} + + # Remove any existing partitions + delete_all_gpart ${_intDISK} + + #Erase any existing bootloader + echo_log Cleaning up ${_intDISK} + rc_halt dd if=/dev/zero of=/dev/${_intDISK} count=2048 + + sleep 2 + + echo_log Running gpart on ${_intDISK} + rc_halt gpart create -s mbr ${_intDISK} + + # Lets figure out disk size in blocks + # Get the cyl of this disk + get_disk_cyl ${_intDISK} + cyl=${VAL} + + # Get the heads of this disk + get_disk_heads ${_intDISK} + head=${VAL} + + # Get the tracks/sectors of this disk + get_disk_sectors ${_intDISK} + sec=${VAL} + + # Multiply them all together to get our total blocks + totalblocks=`expr ${cyl} \* ${head}` + totalblocks=`expr ${totalblocks} \* ${sec}` + + + # Now set the ending block to the total disk block size + sizeblock=`expr ${totalblocks} - ${startblock}` + + # Install new partition setup + echo_log Running gpart add on ${_intDISK} + rc_halt gpart add -b ${startblock} -s ${sizeblock} -t freebsd -i 1 ${_intDISK} + sleep 2 + + echo_log Cleaning up ${_intDISK}s1 + rc_halt dd if=/dev/zero of=/dev/${_intDISK}s1 count=1024 + + if [ $_intBOOT = bsd ] ; then +echo_log Stamping boot sector on ${_intDISK} +rc_halt gpart bootcode -b /boot/boot0 ${_intDISK} + fi + +} + # Function which runs gpart and creates a single large slice run_gpart_full() { DISK=$1 + BOOT=$2 + SCHEME=$3 - init_gpt_full_disk $DISK - - slice=${DISK}-1-gpt + if [ $SCHEME = MBR ] ; then +init_mbr_full_disk $DISK $BOOT +slice=${DISK}-1-mbr + else +init_gpt_full_disk $DISK +slice=${DISK}-1-gpt + fi # Lets save our slice, so we know what to look for in the config file later on if [ -z $WORKINGSLICES ] Modified: head/usr.sbin/pc-sysinstall/examples/README
svn commit: r211496 - head/usr.bin/grep
Author: des Date: Thu Aug 19 09:28:59 2010 New Revision: 211496 URL: http://svn.freebsd.org/changeset/base/211496 Log: UTFize my name. Modified: head/usr.bin/grep/fastgrep.c head/usr.bin/grep/file.c head/usr.bin/grep/grep.c head/usr.bin/grep/grep.h head/usr.bin/grep/queue.c head/usr.bin/grep/util.c Modified: head/usr.bin/grep/fastgrep.c == --- head/usr.bin/grep/fastgrep.cThu Aug 19 09:00:17 2010 (r211495) +++ head/usr.bin/grep/fastgrep.cThu Aug 19 09:28:59 2010 (r211496) @@ -1,7 +1,7 @@ /* $OpenBSD: util.c,v 1.36 2007/10/02 17:59:18 otto Exp $ */ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008 Gabor Kovesdan ga...@freebsd.org * All rights reserved. * Modified: head/usr.bin/grep/file.c == --- head/usr.bin/grep/file.cThu Aug 19 09:00:17 2010(r211495) +++ head/usr.bin/grep/file.cThu Aug 19 09:28:59 2010(r211496) @@ -1,7 +1,7 @@ /* $OpenBSD: file.c,v 1.11 2010/07/02 20:48:48 nicm Exp $ */ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008-2010 Gabor Kovesdan ga...@freebsd.org * Copyright (C) 2010 Dimitry Andric dimi...@andric.com * All rights reserved. Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cThu Aug 19 09:00:17 2010(r211495) +++ head/usr.bin/grep/grep.cThu Aug 19 09:28:59 2010(r211496) @@ -1,7 +1,7 @@ /* $OpenBSD: grep.c,v 1.42 2010/07/02 22:18:03 tedu Exp $ */ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008-2009 Gabor Kovesdan ga...@freebsd.org * All rights reserved. * Modified: head/usr.bin/grep/grep.h == --- head/usr.bin/grep/grep.hThu Aug 19 09:00:17 2010(r211495) +++ head/usr.bin/grep/grep.hThu Aug 19 09:28:59 2010(r211496) @@ -2,7 +2,7 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (c) 2008-2009 Gabor Kovesdan ga...@freebsd.org * All rights reserved. * Modified: head/usr.bin/grep/queue.c == --- head/usr.bin/grep/queue.c Thu Aug 19 09:00:17 2010(r211495) +++ head/usr.bin/grep/queue.c Thu Aug 19 09:28:59 2010(r211496) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/grep/util.c == --- head/usr.bin/grep/util.cThu Aug 19 09:00:17 2010(r211495) +++ head/usr.bin/grep/util.cThu Aug 19 09:28:59 2010(r211496) @@ -1,7 +1,7 @@ /* $OpenBSD: util.c,v 1.39 2010/07/02 22:18:03 tedu Exp $ */ /*- - * Copyright (c) 1999 James Howard and Dag-Erling Co�dan Sm�rgrav + * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * Copyright (C) 2008-2010 Gabor Kovesdan ga...@freebsd.org * All rights reserved. * ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211318 - head/usr.sbin/sysinstall
Peter Jeremy peterjer...@acm.org writes: Probably a good example of why the Project's guidelines require the separation of whitespace and functional changes. Well, the second-to-last hunk is not really a functional change either. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211318 - head/usr.sbin/sysinstall
On Thu, Aug 19, 2010 at 11:33:31AM +0200, Dag-Erling Sm??rgrav wrote: Peter Jeremy peterjer...@acm.org writes: Probably a good example of why the Project's guidelines require the separation of whitespace and functional changes. Well, the second-to-last hunk is not really a functional change either. Right, but the commit message could and should be better. Anyway, it's probably getting beyond being useful talk, so I'll go back to hacking. ./danfe ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211497 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 11:16:52 2010 New Revision: 211497 URL: http://svn.freebsd.org/changeset/base/211497 Log: style(9) pick from imp@ . Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Thu Aug 19 09:28:59 2010 (r211496) +++ head/sys/mips/atheros/if_arge.c Thu Aug 19 11:16:52 2010 (r211497) @@ -182,11 +182,10 @@ MTX_SYSINIT(miibus_mtx, miibus_mtx, ar static void arge_flush_ddr(struct arge_softc *sc) { - if (sc-arge_mac_unit == 0) { + if (sc-arge_mac_unit == 0) ar71xx_device_flush_ddr_ge0(); - } else { + else ar71xx_device_flush_ddr_ge1(); - } } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211499 - head/sbin/ipfw
Author: des Date: Thu Aug 19 11:19:21 2010 New Revision: 211499 URL: http://svn.freebsd.org/changeset/base/211499 Log: expand_number(3) takes a uint64_t * now. MFC after:3 weeks Modified: head/sbin/ipfw/dummynet.c Modified: head/sbin/ipfw/dummynet.c == --- head/sbin/ipfw/dummynet.c Thu Aug 19 11:18:50 2010(r211498) +++ head/sbin/ipfw/dummynet.c Thu Aug 19 11:19:21 2010(r211499) @@ -1130,7 +1130,7 @@ end_mask: NEED(p, burst); NEED1(burst needs argument\n); errno = 0; - if (expand_number(av[0], (int64_t *)p-burst) 0) + if (expand_number(av[0], p-burst) 0) if (errno != ERANGE) errx(EX_DATAERR, burst: invalid argument); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211500 - head/sbin/geom/core
Author: des Date: Thu Aug 19 11:20:24 2010 New Revision: 211500 URL: http://svn.freebsd.org/changeset/base/211500 Log: expand_number(3) takes a uint64_t * now; intmax_t was never correct except by accident. MFC after:3 weeks Modified: head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.c == --- head/sbin/geom/core/geom.c Thu Aug 19 11:19:21 2010(r211499) +++ head/sbin/geom/core/geom.c Thu Aug 19 11:20:24 2010(r211500) @@ -237,7 +237,7 @@ static void set_option(struct gctl_req *req, struct g_option *opt, const char *val) { char *s; - intmax_t number; + uint64_t number; if (G_OPT_TYPE(opt) == G_TYPE_NUMBER || G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211463 - head/usr.bin/grep
m...@freebsd.org writes: I didn't read all of the details in the profiling mails in the thread, but does this mean that work on stdio would give a performance boost to many apps? No, just that stdio is not the appropriate tool in this case. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211501 - in head/sys: modules modules/send netinet netinet6 sys
Author: anchie Date: Thu Aug 19 11:31:03 2010 New Revision: 211501 URL: http://svn.freebsd.org/changeset/base/211501 Log: MFp4: anchie_soc2009 branch: Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971. The implementation consists of a kernel module that gets packets from the nd6 code, sends them to user space on a dedicated socket and reinjects them back for further processing. Hooks are used from nd6 code paths to divert relevant packets to the send implementation for processing in user space. The hooks are only triggered if the send module is loaded. In case no user space application is connected to the send socket, processing continues normaly as if the module would not be loaded. Unloading the module is not possible at this time due to missing nd6 locking. The native SeND socket is similar to a raw IPv6 socket but with its own, internal pseudo-protocol. Approved by: bz (mentor) Added: head/sys/modules/send/ head/sys/modules/send/Makefile (contents, props changed) head/sys/netinet6/send.c (contents, props changed) head/sys/netinet6/send.h (contents, props changed) Modified: head/sys/modules/Makefile head/sys/netinet/in.h head/sys/netinet6/icmp6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/raw_ip6.c head/sys/sys/mbuf.h Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Thu Aug 19 11:20:24 2010(r211500) +++ head/sys/modules/Makefile Thu Aug 19 11:31:03 2010(r211501) @@ -257,6 +257,7 @@ SUBDIR= ${_3dfx} \ ${_scsi_low} \ sdhci \ sem \ + send \ sf \ sge \ siba_bwn \ Added: head/sys/modules/send/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/send/Makefile Thu Aug 19 11:31:03 2010 (r211501) @@ -0,0 +1,7 @@ +# $FreeBSD$ +.PATH: ${.CURDIR}/../../netinet6 + +KMOD= send +SRCS= send.c + +.include bsd.kmod.mk Modified: head/sys/netinet/in.h == --- head/sys/netinet/in.h Thu Aug 19 11:20:24 2010(r211500) +++ head/sys/netinet/in.h Thu Aug 19 11:31:03 2010(r211501) @@ -252,6 +252,7 @@ __END_DECLS /* Only used internally, so can be outside the range of valid IP protocols. */ #defineIPPROTO_DIVERT 258 /* divert pseudo-protocol */ +#defineIPPROTO_SEND259 /* SeND pseudo-protocol */ /* * Defined to avoid confusion. The master value is defined by Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.c Thu Aug 19 11:20:24 2010(r211500) +++ head/sys/netinet6/icmp6.c Thu Aug 19 11:31:03 2010(r211501) @@ -105,6 +105,7 @@ __FBSDID($FreeBSD$); #include netinet6/scope6_var.h #include netinet6/mld6_var.h #include netinet6/nd6.h +#include netinet6/send.h #ifdef IPSEC #include netipsec/ipsec.h @@ -414,6 +415,7 @@ icmp6_input(struct mbuf **mp, int *offp, int icmp6len = m-m_pkthdr.len - *offp; int code, sum, noff; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; + int ip6len, error; ifp = m-m_pkthdr.rcvif; @@ -428,6 +430,7 @@ icmp6_input(struct mbuf **mp, int *offp, */ ip6 = mtod(m, struct ip6_hdr *); + ip6len = sizeof(struct ip6_hdr) + ntohs(ip6-ip6_plen); if (icmp6len sizeof(struct icmp6_hdr)) { ICMP6STAT_INC(icp6s_tooshort); goto freeit; @@ -766,11 +769,35 @@ icmp6_input(struct mbuf **mp, int *offp, goto badlen; if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ - nd6_rs_input(m, off, icmp6len); + + /* Send incoming SeND packet to user space. */ + if (send_sendso_input_hook != NULL) { + IP6_EXTHDR_CHECK(m, off, + icmp6len, IPPROTO_DONE); + error = send_sendso_input_hook(m, ifp, + SND_IN, ip6len); + /* -1 == no app on SEND socket */ + if (error == 0) + return (IPPROTO_DONE); + nd6_rs_input(m, off, icmp6len); + } else + nd6_rs_input(m, off, icmp6len); m = NULL; goto freeit; } - nd6_rs_input(n, off, icmp6len); + if (send_sendso_input_hook != NULL) { +
svn commit: r211502 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 11:40:10 2010 New Revision: 211502 URL: http://svn.freebsd.org/changeset/base/211502 Log: Add initial Atheros AR91XX support. This works well enough to bring a system up to single-user mode using an MDROOT. Known Issues: * The EHCI USB doesn't currently work and will panic the kernel during attach. * The onboard ethernet won't work until the PLL routines have been fleshed out and shoe-horned into if_arge. * The WMAC device glue (and quite likely the if_ath support) hasn't yet been implemented. Added: head/sys/mips/atheros/ar91xx_chip.c (contents, props changed) head/sys/mips/atheros/ar91xx_chip.h (contents, props changed) Modified: head/sys/mips/atheros/ar71xx_setup.c head/sys/mips/atheros/ar71xxreg.h head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/ar71xx_setup.c == --- head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 11:31:03 2010 (r211501) +++ head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 11:40:10 2010 (r211502) @@ -61,6 +61,7 @@ __FBSDID($FreeBSD$); #include mips/atheros/ar71xx_cpudef.h #include mips/atheros/ar71xx_chip.h +#include mips/atheros/ar91xx_chip.h #defineAR71XX_SYS_TYPE_LEN 128 @@ -104,6 +105,25 @@ ar71xx_detect_sys_type(void) } break; + case REV_ID_MAJOR_AR913X: + minor = id AR91XX_REV_ID_MINOR_MASK; + rev = id AR91XX_REV_ID_REVISION_SHIFT; + rev = AR91XX_REV_ID_REVISION_MASK; + ar71xx_cpu_ops = ar91xx_chip_def; + switch (minor) { + case AR91XX_REV_ID_MINOR_AR9130: + ar71xx_soc = AR71XX_SOC_AR9130; + chip = 9130; + break; + + case AR91XX_REV_ID_MINOR_AR9132: + ar71xx_soc = AR71XX_SOC_AR9132; + chip = 9132; + break; + } + break; + + default: panic(ar71xx: unknown chip id:0x%08x\n, id); } Modified: head/sys/mips/atheros/ar71xxreg.h == --- head/sys/mips/atheros/ar71xxreg.h Thu Aug 19 11:31:03 2010 (r211501) +++ head/sys/mips/atheros/ar71xxreg.h Thu Aug 19 11:40:10 2010 (r211502) @@ -195,6 +195,9 @@ #defineAR71XX_PLL_ETH_EXT_CLK 0x18050018 #defineAR71XX_PLL_PCI_CLK 0x1805001C +/* Reset block */ +#defineAR71XX_RST_BLOCK_BASE 0x1806 + #define AR71XX_RST_WDOG_CONTROL0x18060008 #defineRST_WDOG_LAST (1 31) #defineRST_WDOG_ACTION_MASK3 @@ -253,6 +256,13 @@ #defineAR71XX_REV_ID_REVISION_MASK 0x3 #defineAR71XX_REV_ID_REVISION_SHIFT2 +/* AR91XX chipset revision details */ +#defineAR91XX_REV_ID_MINOR_MASK0x3 +#defineAR91XX_REV_ID_MINOR_AR9130 0x0 +#defineAR91XX_REV_ID_MINOR_AR9132 0x1 +#defineAR91XX_REV_ID_REVISION_MASK 0x3 +#defineAR91XX_REV_ID_REVISION_SHIFT2 + /* * GigE adapters region */ Added: head/sys/mips/atheros/ar91xx_chip.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar91xx_chip.c Thu Aug 19 11:40:10 2010 (r211502) @@ -0,0 +1,171 @@ +/*- + * Copyright (c) 2010 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS
svn commit: r211503 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 11:53:55 2010 New Revision: 211503 URL: http://svn.freebsd.org/changeset/base/211503 Log: Add some initial AR724X chipset support. This is untested but should at least allow an AR724X to boot. The current code is lacking the detail needed to expose the PCIe bus. It is also lacking any NIC, PLL or flush/WB code. Added: head/sys/mips/atheros/ar724x_chip.c (contents, props changed) head/sys/mips/atheros/ar724x_chip.h (contents, props changed) Modified: head/sys/mips/atheros/ar71xx_setup.c head/sys/mips/atheros/ar71xxreg.h head/sys/mips/atheros/ar724xreg.h head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/ar71xx_setup.c == --- head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 11:40:10 2010 (r211502) +++ head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 11:53:55 2010 (r211503) @@ -61,6 +61,7 @@ __FBSDID($FreeBSD$); #include mips/atheros/ar71xx_cpudef.h #include mips/atheros/ar71xx_chip.h +#include mips/atheros/ar724x_chip.h #include mips/atheros/ar91xx_chip.h #defineAR71XX_SYS_TYPE_LEN 128 @@ -105,6 +106,27 @@ ar71xx_detect_sys_type(void) } break; + case REV_ID_MAJOR_AR7240: + ar71xx_soc = AR71XX_SOC_AR7240; + chip = 7240; + ar71xx_cpu_ops = ar724x_chip_def; + rev = (id AR724X_REV_ID_REVISION_MASK); + break; + + case REV_ID_MAJOR_AR7241: + ar71xx_soc = AR71XX_SOC_AR7241; + chip = 7241; + ar71xx_cpu_ops = ar724x_chip_def; + rev = (id AR724X_REV_ID_REVISION_MASK); + break; + + case REV_ID_MAJOR_AR7242: + ar71xx_soc = AR71XX_SOC_AR7242; + chip = 7242; + ar71xx_cpu_ops = ar724x_chip_def; + rev = (id AR724X_REV_ID_REVISION_MASK); + break; + case REV_ID_MAJOR_AR913X: minor = id AR91XX_REV_ID_MINOR_MASK; rev = id AR91XX_REV_ID_REVISION_SHIFT; Modified: head/sys/mips/atheros/ar71xxreg.h == --- head/sys/mips/atheros/ar71xxreg.h Thu Aug 19 11:40:10 2010 (r211502) +++ head/sys/mips/atheros/ar71xxreg.h Thu Aug 19 11:53:55 2010 (r211503) @@ -256,6 +256,9 @@ #defineAR71XX_REV_ID_REVISION_MASK 0x3 #defineAR71XX_REV_ID_REVISION_SHIFT2 +/* AR724X chipset revision details */ +#defineAR724X_REV_ID_REVISION_MASK 0x3 + /* AR91XX chipset revision details */ #defineAR91XX_REV_ID_MINOR_MASK0x3 #defineAR91XX_REV_ID_MINOR_AR9130 0x0 Added: head/sys/mips/atheros/ar724x_chip.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/ar724x_chip.c Thu Aug 19 11:53:55 2010 (r211503) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2010 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include machine/cpuregs.h + +#include mips/sentry5/s5reg.h + +#include opt_ddb.h + +#include sys/param.h +#include sys/conf.h +#include sys/kernel.h +#include sys/systm.h +#include sys/bus.h +#include sys/cons.h +#include sys/kdb.h +#include sys/reboot.h + +#include vm/vm.h +#include vm/vm_page.h + +#include net/ethernet.h + +#include machine/clock.h +#include machine/cpu.h
Re: svn commit: r211501 - in head/sys: modules modules/send netinet netinet6 sys
Hi all, A man page for the kernel side SeND, and an updated port with Secure Neighbor Discovery application will follow soon. Ana Kukec wrote: Author: anchie Date: Thu Aug 19 11:31:03 2010 New Revision: 211501 URL: http://svn.freebsd.org/changeset/base/211501 Log: MFp4: anchie_soc2009 branch: Add kernel side support for Secure Neighbor Discovery (SeND), RFC 3971. The implementation consists of a kernel module that gets packets from the nd6 code, sends them to user space on a dedicated socket and reinjects them back for further processing. Hooks are used from nd6 code paths to divert relevant packets to the send implementation for processing in user space. The hooks are only triggered if the send module is loaded. In case no user space application is connected to the send socket, processing continues normaly as if the module would not be loaded. Unloading the module is not possible at this time due to missing nd6 locking. The native SeND socket is similar to a raw IPv6 socket but with its own, internal pseudo-protocol. Approved by: bz (mentor) Added: head/sys/modules/send/ head/sys/modules/send/Makefile (contents, props changed) head/sys/netinet6/send.c (contents, props changed) head/sys/netinet6/send.h (contents, props changed) Modified: head/sys/modules/Makefile head/sys/netinet/in.h head/sys/netinet6/icmp6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/raw_ip6.c head/sys/sys/mbuf.h Ana ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211504 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 12:52:49 2010 New Revision: 211504 URL: http://svn.freebsd.org/changeset/base/211504 Log: Fix mistaken indenting. Modified: head/sys/mips/atheros/ar71xx_setup.c Modified: head/sys/mips/atheros/ar71xx_setup.c == --- head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 11:53:55 2010 (r211503) +++ head/sys/mips/atheros/ar71xx_setup.cThu Aug 19 12:52:49 2010 (r211504) @@ -87,7 +87,7 @@ ar71xx_detect_sys_type(void) minor = id AR71XX_REV_ID_MINOR_MASK; rev = id AR71XX_REV_ID_REVISION_SHIFT; rev = AR71XX_REV_ID_REVISION_MASK; - ar71xx_cpu_ops = ar71xx_chip_def; + ar71xx_cpu_ops = ar71xx_chip_def; switch (minor) { case AR71XX_REV_ID_MINOR_AR7130: ar71xx_soc = AR71XX_SOC_AR7130; @@ -109,21 +109,21 @@ ar71xx_detect_sys_type(void) case REV_ID_MAJOR_AR7240: ar71xx_soc = AR71XX_SOC_AR7240; chip = 7240; - ar71xx_cpu_ops = ar724x_chip_def; + ar71xx_cpu_ops = ar724x_chip_def; rev = (id AR724X_REV_ID_REVISION_MASK); break; case REV_ID_MAJOR_AR7241: ar71xx_soc = AR71XX_SOC_AR7241; chip = 7241; - ar71xx_cpu_ops = ar724x_chip_def; + ar71xx_cpu_ops = ar724x_chip_def; rev = (id AR724X_REV_ID_REVISION_MASK); break; case REV_ID_MAJOR_AR7242: ar71xx_soc = AR71XX_SOC_AR7242; chip = 7242; - ar71xx_cpu_ops = ar724x_chip_def; + ar71xx_cpu_ops = ar724x_chip_def; rev = (id AR724X_REV_ID_REVISION_MASK); break; @@ -131,7 +131,7 @@ ar71xx_detect_sys_type(void) minor = id AR91XX_REV_ID_MINOR_MASK; rev = id AR91XX_REV_ID_REVISION_SHIFT; rev = AR91XX_REV_ID_REVISION_MASK; - ar71xx_cpu_ops = ar91xx_chip_def; + ar71xx_cpu_ops = ar91xx_chip_def; switch (minor) { case AR91XX_REV_ID_MINOR_AR9130: ar71xx_soc = AR71XX_SOC_AR9130; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
On 19.08.2010 13:53, Adrian Chadd wrote: Author: adrian Date: Thu Aug 19 11:53:55 2010 New Revision: 211503 URL: http://svn.freebsd.org/changeset/base/211503 Log: Add some initial AR724X chipset support. This is untested but should at least allow an AR724X to boot. Isn't this something that should be done on a project branch and merged back when in a good working state? The current code is lacking the detail needed to expose the PCIe bus. It is also lacking any NIC, PLL or flush/WB code. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211505 - head/contrib/gcc
Author: rpaulo Date: Thu Aug 19 12:59:57 2010 New Revision: 211505 URL: http://svn.freebsd.org/changeset/base/211505 Log: Remove unneeded casts in inline assembly in contrib/gcc/longlong.h, which are apparently heinous GNU extensions, so clang can compile this without using the -fheinous-gnu-extensions option. Results in *no* binary change, neither with clang, nor with gcc. Submitted by: Dimitry Andric dimitry at andric.com Modified: head/contrib/gcc/longlong.h Modified: head/contrib/gcc/longlong.h == --- head/contrib/gcc/longlong.h Thu Aug 19 12:52:49 2010(r211504) +++ head/contrib/gcc/longlong.h Thu Aug 19 12:59:57 2010(r211505) @@ -314,38 +314,38 @@ UDItype __umulsidi3 (USItype, USItype); #if (defined (__i386__) || defined (__i486__)) W_TYPE_SIZE == 32 #define add_ss(sh, sl, ah, al, bh, bl) \ __asm__ (addl %5,%1\n\tadcl %3,%0 \ - : =r ((USItype) (sh)), \ -=r ((USItype) (sl)) \ - : %0 ((USItype) (ah)), \ -g ((USItype) (bh)), \ -%1 ((USItype) (al)), \ -g ((USItype) (bl))) + : =r (sh), \ +=r (sl) \ + : %0 (ah), \ +g (bh), \ +%1 (al), \ +g (bl)) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ (subl %5,%1\n\tsbbl %3,%0 \ - : =r ((USItype) (sh)), \ -=r ((USItype) (sl)) \ - : 0 ((USItype) (ah)), \ -g ((USItype) (bh)), \ -1 ((USItype) (al)), \ -g ((USItype) (bl))) + : =r (sh), \ +=r (sl) \ + : 0 (ah), \ +g (bh), \ +1 (al), \ +g (bl)) #define umul_ppmm(w1, w0, u, v) \ __asm__ (mull %3 \ - : =a ((USItype) (w0)), \ -=d ((USItype) (w1)) \ - : %0 ((USItype) (u)), \ -rm ((USItype) (v))) + : =a (w0), \ +=d (w1) \ + : %0 (u), \ +rm (v)) #define udiv_qrnnd(q, r, n1, n0, dv) \ __asm__ (divl %4 \ - : =a ((USItype) (q)), \ -=d ((USItype) (r)) \ - : 0 ((USItype) (n0)), \ -1 ((USItype) (n1)), \ -rm ((USItype) (dv))) + : =a (q), \ +=d (r) \ + : 0 (n0), \ +1 (n1), \ +rm (dv)) #define count_leading_zeros(count, x) \ do { \ USItype __cbtmp; \ __asm__ (bsrl %1,%0 \ -: =r (__cbtmp) : rm ((USItype) (x))); \ +: =r (__cbtmp) : rm (x)); \ (count) = __cbtmp ^ 31;\ } while (0) #define count_trailing_zeros(count, x) \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211393 - head/lib/libutil
2010/8/16 Dag-Erling Smørgrav d...@des.no: Dag-Erling Smørgrav d...@des.no writes: Note that this commit semi-intentionally introduces another bug: in some cases, the user's limits will not be applied at all. This is by far the lesser of two evils, and is easy (albeit time-consuming) to fix. Specifically, each of the files listed below needs to be audited. Those that already call setusercontext() with the LOGIN_SETUSER flag set are fine. Those that don't need to do so either instead of or shortly after calling setuid(). [snip] -- libexec/ftpd/ftpd.c: setusercontext(NULL, getpwuid(0), 0, libexec/ftpd/ftpd.c- LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK| libexec/ftpd/ftpd.c- LOGIN_SETMAC); -- libexec/ftpd/ftpd.c: setusercontext(lc, pw, 0, libexec/ftpd/ftpd.c- LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY| libexec/ftpd/ftpd.c- LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC); It seems to me that ftpd doesn't need any change, do you agree? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211393 - head/lib/libutil
Attilio Rao atti...@freebsd.org writes: It seems to me that ftpd doesn't need any change, do you agree? Hmm, it never calls setuid(), but it does call seteuid() before setusercontext(). Perhaps the test in setusercontext() should be changed to use geteuid() instead of getuid(). DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211393 - head/lib/libutil
2010/8/19 Dag-Erling Smørgrav d...@des.no: Attilio Rao atti...@freebsd.org writes: It seems to me that ftpd doesn't need any change, do you agree? Hmm, it never calls setuid(), but it does call seteuid() before setusercontext(). Perhaps the test in setusercontext() should be changed to use geteuid() instead of getuid(). Yes, I think that it probabilly makes more sense (geteuid() testing in setusercontext()). Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211508 - head/sys/sys
Author: jhb Date: Thu Aug 19 15:55:50 2010 New Revision: 211508 URL: http://svn.freebsd.org/changeset/base/211508 Log: Remove an unused macro. exit1() invokes ktrprocexit() directly. Modified: head/sys/sys/ktrace.h Modified: head/sys/sys/ktrace.h == --- head/sys/sys/ktrace.h Thu Aug 19 15:33:43 2010(r211507) +++ head/sys/sys/ktrace.h Thu Aug 19 15:55:50 2010(r211508) @@ -73,10 +73,6 @@ struct ktr_header { if (KTRCHECKDRAIN(td)) \ ktruserret(td); \ } while (0) -#defineKTRPROCEXIT(td) do { \ - if (KTRCHECKDRAIN(td)) \ - ktrprocexit(td);\ -} while (0) /* * ktrace record types ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211509 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 16:15:30 2010 New Revision: 211509 URL: http://svn.freebsd.org/changeset/base/211509 Log: add the PLL set functions to cpuops Modified: head/sys/mips/atheros/ar71xx_cpudef.h Modified: head/sys/mips/atheros/ar71xx_cpudef.h == --- head/sys/mips/atheros/ar71xx_cpudef.h Thu Aug 19 15:55:50 2010 (r211508) +++ head/sys/mips/atheros/ar71xx_cpudef.h Thu Aug 19 16:15:30 2010 (r211509) @@ -81,6 +81,16 @@ static inline int ar71xx_device_stopped( return ar71xx_cpu_ops-ar71xx_chip_device_stopped(mask); } +static inline void ar71xx_device_set_pll_ge0(int speed) +{ + ar71xx_cpu_ops-ar71xx_chip_set_pll_ge0(speed); +} + +static inline void ar71xx_device_set_pll_ge1(int speed) +{ + ar71xx_cpu_ops-ar71xx_chip_set_pll_ge1(speed); +} + static inline void ar71xx_device_flush_ddr_ge0(void) { ar71xx_cpu_ops-ar71xx_chip_ddr_flush_ge0(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211511 - head/sys/mips/atheros
Author: adrian Date: Thu Aug 19 16:29:08 2010 New Revision: 211511 URL: http://svn.freebsd.org/changeset/base/211511 Log: Migrate if_arge to use the PLL cpuops. This has been lightly tested on the AR7161 and AR9132. Modified: head/sys/mips/atheros/if_arge.c head/sys/mips/atheros/if_argevar.h Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Thu Aug 19 16:25:15 2010 (r211510) +++ head/sys/mips/atheros/if_arge.c Thu Aug 19 16:29:08 2010 (r211511) @@ -233,13 +233,6 @@ arge_attach(device_t dev) KASSERT(((sc-arge_mac_unit == 0) || (sc-arge_mac_unit == 1)), (if_arge: Only MAC0 and MAC1 supported)); - if (sc-arge_mac_unit == 0) { - sc-arge_pll_reg = AR71XX_PLL_ETH_INT0_CLK; - sc-arge_pll_reg_shift = 17; - } else { - sc-arge_pll_reg = AR71XX_PLL_ETH_INT1_CLK; - sc-arge_pll_reg_shift = 19; - } /* * Get which PHY of 5 available we should use for this unit @@ -668,7 +661,8 @@ arge_link_task(void *arg, int pending) static void arge_set_pll(struct arge_softc *sc, int media, int duplex) { - uint32_tcfg, ifcontrol, rx_filtmask, pll, sec_cfg; + uint32_tcfg, ifcontrol, rx_filtmask; + int if_speed; cfg = ARGE_READ(sc, AR71XX_MAC_CFG2); cfg = ~(MAC_CFG2_IFACE_MODE_1000 @@ -687,21 +681,21 @@ arge_set_pll(struct arge_softc *sc, int switch(media) { case IFM_10_T: cfg |= MAC_CFG2_IFACE_MODE_10_100; - pll = PLL_ETH_INT_CLK_10; + if_speed = 10; break; case IFM_100_TX: cfg |= MAC_CFG2_IFACE_MODE_10_100; ifcontrol |= MAC_IFCONTROL_SPEED; - pll = PLL_ETH_INT_CLK_100; + if_speed = 100; break; case IFM_1000_T: case IFM_1000_SX: cfg |= MAC_CFG2_IFACE_MODE_1000; rx_filtmask |= FIFO_RX_MASK_BYTE_MODE; - pll = PLL_ETH_INT_CLK_1000; + if_speed = 1000; break; default: - pll = PLL_ETH_INT_CLK_100; + if_speed = 100; device_printf(sc-arge_dev, Unknown media %d\n, media); } @@ -715,22 +709,10 @@ arge_set_pll(struct arge_softc *sc, int rx_filtmask); /* set PLL registers */ - sec_cfg = ATH_READ_REG(AR71XX_PLL_SEC_CONFIG); - sec_cfg = ~(3 sc-arge_pll_reg_shift); - sec_cfg |= (2 sc-arge_pll_reg_shift); - - ATH_WRITE_REG(AR71XX_PLL_SEC_CONFIG, sec_cfg); - DELAY(100); - - ATH_WRITE_REG(sc-arge_pll_reg, pll); - - sec_cfg |= (3 sc-arge_pll_reg_shift); - ATH_WRITE_REG(AR71XX_PLL_SEC_CONFIG, sec_cfg); - DELAY(100); - - sec_cfg = ~(3 sc-arge_pll_reg_shift); - ATH_WRITE_REG(AR71XX_PLL_SEC_CONFIG, sec_cfg); - DELAY(100); + if (sc-arge_mac_unit == 0) + ar71xx_device_set_pll_ge0(if_speed); + else + ar71xx_device_set_pll_ge1(if_speed); } Modified: head/sys/mips/atheros/if_argevar.h == --- head/sys/mips/atheros/if_argevar.h Thu Aug 19 16:25:15 2010 (r211510) +++ head/sys/mips/atheros/if_argevar.h Thu Aug 19 16:29:08 2010 (r211511) @@ -150,8 +150,6 @@ struct arge_softc { uint32_targe_intr_status; int arge_mac_unit; int arge_phymask; - uint32_targe_pll_reg; - uint32_targe_pll_reg_shift; int arge_if_flags; uint32_targe_debug; struct { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211512 - head/sys/kern
Author: jhb Date: Thu Aug 19 16:38:58 2010 New Revision: 211512 URL: http://svn.freebsd.org/changeset/base/211512 Log: Fix a whitespace nit and remove a questioning comment. STAILQ_CONCAT() does require the STAILQ the existing list is being added to to already be initialized (it is CONCAT() vs MOVE()). Modified: head/sys/kern/kern_ktrace.c Modified: head/sys/kern/kern_ktrace.c == --- head/sys/kern/kern_ktrace.c Thu Aug 19 16:29:08 2010(r211511) +++ head/sys/kern/kern_ktrace.c Thu Aug 19 16:38:58 2010(r211512) @@ -107,7 +107,7 @@ static int data_lengths[] = { 0, /* KTR_NAMEI */ sizeof(struct ktr_genio), /* KTR_GENIO */ sizeof(struct ktr_psig),/* KTR_PSIG */ - sizeof(struct ktr_csw), /* KTR_CSW */ + sizeof(struct ktr_csw), /* KTR_CSW */ 0, /* KTR_USER */ 0, /* KTR_STRUCT */ 0, /* KTR_SYSCTL */ @@ -336,7 +336,7 @@ ktr_drain(struct thread *td) ktrace_assert(td); sx_assert(ktrace_sx, SX_XLOCKED); - STAILQ_INIT(local_queue); /* XXXRW: needed? */ + STAILQ_INIT(local_queue); if (!STAILQ_EMPTY(td-td_proc-p_ktr)) { mtx_lock(ktrace_mtx); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211513 - head/sys/fs/devfs
Author: jh Date: Thu Aug 19 16:39:00 2010 New Revision: 211513 URL: http://svn.freebsd.org/changeset/base/211513 Log: Call dev_rel() in error paths. Reported by: kib Reviewed by: kib MFC after:2 weeks Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c == --- head/sys/fs/devfs/devfs_vnops.c Thu Aug 19 16:38:58 2010 (r211512) +++ head/sys/fs/devfs/devfs_vnops.c Thu Aug 19 16:39:00 2010 (r211513) @@ -848,6 +848,8 @@ devfs_lookupx(struct vop_lookup_args *ap *dm_unlock = 0; sx_xunlock(dmp-dm_lock); devfs_unmount_final(dmp); + if (cdev != NULL) + dev_rel(cdev); return (ENOENT); } if (cdev == NULL) @@ -859,6 +861,7 @@ devfs_lookupx(struct vop_lookup_args *ap *dm_unlock = 0; sx_xunlock(dmp-dm_lock); devfs_unmount_final(dmp); + dev_rel(cdev); return (ENOENT); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211514 - head/sys/kern
Author: jhb Date: Thu Aug 19 16:40:30 2010 New Revision: 211514 URL: http://svn.freebsd.org/changeset/base/211514 Log: There isn't really a need to hold the ktrace mutex just to read the value of p_traceflag that is stored in the kinfo_proc structure. It is still racey even with the lock and the code will read a consistent snapshot of the flag without the lock. Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Thu Aug 19 16:39:00 2010(r211513) +++ head/sys/kern/kern_proc.c Thu Aug 19 16:40:30 2010(r211514) @@ -64,10 +64,6 @@ __FBSDID($FreeBSD$); #include sys/jail.h #include sys/vnode.h #include sys/eventhandler.h -#ifdef KTRACE -#include sys/uio.h -#include sys/ktrace.h -#endif #ifdef DDB #include ddb/ddb.h @@ -717,9 +713,7 @@ fill_kinfo_proc_only(struct proc *p, str kp-ki_textvp = p-p_textvp; #ifdef KTRACE kp-ki_tracep = p-p_tracevp; - mtx_lock(ktrace_mtx); kp-ki_traceflag = p-p_traceflag; - mtx_unlock(ktrace_mtx); #endif kp-ki_fd = p-p_fd; kp-ki_vmspace = p-p_vmspace; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211515 - in head/sys: amd64/amd64 amd64/ia32 i386/i386 ia64/ia64 kern powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v
Author: jhb Date: Thu Aug 19 16:41:27 2010 New Revision: 211515 URL: http://svn.freebsd.org/changeset/base/211515 Log: Remove unused KTRACE includes. Modified: head/sys/amd64/amd64/trap.c head/sys/amd64/ia32/ia32_syscall.c head/sys/i386/i386/trap.c head/sys/ia64/ia64/trap.c head/sys/kern/sched_ule.c head/sys/powerpc/aim/trap.c head/sys/powerpc/booke/trap.c head/sys/sparc64/sparc64/trap.c head/sys/sun4v/sun4v/trap.c Modified: head/sys/amd64/amd64/trap.c == --- head/sys/amd64/amd64/trap.c Thu Aug 19 16:40:30 2010(r211514) +++ head/sys/amd64/amd64/trap.c Thu Aug 19 16:41:27 2010(r211515) @@ -50,7 +50,6 @@ __FBSDID($FreeBSD$); #include opt_isa.h #include opt_kdb.h #include opt_kdtrace.h -#include opt_ktrace.h #include sys/param.h #include sys/bus.h @@ -70,9 +69,6 @@ __FBSDID($FreeBSD$); #include sys/sysent.h #include sys/uio.h #include sys/vmmeter.h -#ifdef KTRACE -#include sys/ktrace.h -#endif #ifdef HWPMC_HOOKS #include sys/pmckern.h #endif Modified: head/sys/amd64/ia32/ia32_syscall.c == --- head/sys/amd64/ia32/ia32_syscall.c Thu Aug 19 16:40:30 2010 (r211514) +++ head/sys/amd64/ia32/ia32_syscall.c Thu Aug 19 16:41:27 2010 (r211515) @@ -45,7 +45,6 @@ __FBSDID($FreeBSD$); #include opt_clock.h #include opt_cpu.h #include opt_isa.h -#include opt_ktrace.h #include sys/param.h #include sys/bus.h @@ -65,9 +64,6 @@ __FBSDID($FreeBSD$); #include sys/sysent.h #include sys/uio.h #include sys/vmmeter.h -#ifdef KTRACE -#include sys/ktrace.h -#endif #include security/audit/audit.h #include vm/vm.h Modified: head/sys/i386/i386/trap.c == --- head/sys/i386/i386/trap.c Thu Aug 19 16:40:30 2010(r211514) +++ head/sys/i386/i386/trap.c Thu Aug 19 16:41:27 2010(r211515) @@ -50,7 +50,6 @@ __FBSDID($FreeBSD$); #include opt_isa.h #include opt_kdb.h #include opt_kdtrace.h -#include opt_ktrace.h #include opt_npx.h #include opt_trap.h @@ -72,9 +71,6 @@ __FBSDID($FreeBSD$); #include sys/sysent.h #include sys/uio.h #include sys/vmmeter.h -#ifdef KTRACE -#include sys/ktrace.h -#endif #ifdef HWPMC_HOOKS #include sys/pmckern.h #endif Modified: head/sys/ia64/ia64/trap.c == --- head/sys/ia64/ia64/trap.c Thu Aug 19 16:40:30 2010(r211514) +++ head/sys/ia64/ia64/trap.c Thu Aug 19 16:41:27 2010(r211515) @@ -28,7 +28,6 @@ __FBSDID($FreeBSD$); #include opt_ddb.h -#include opt_ktrace.h #include sys/param.h #include sys/systm.h @@ -67,11 +66,6 @@ __FBSDID($FreeBSD$); #include machine/smp.h #endif -#ifdef KTRACE -#include sys/uio.h -#include sys/ktrace.h -#endif - #include security/audit/audit.h #include ia64/disasm/disasm.h Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Thu Aug 19 16:40:30 2010(r211514) +++ head/sys/kern/sched_ule.c Thu Aug 19 16:41:27 2010(r211515) @@ -62,10 +62,6 @@ __FBSDID($FreeBSD$); #include sys/vmmeter.h #include sys/cpuset.h #include sys/sbuf.h -#ifdef KTRACE -#include sys/uio.h -#include sys/ktrace.h -#endif #ifdef HWPMC_HOOKS #include sys/pmckern.h Modified: head/sys/powerpc/aim/trap.c == --- head/sys/powerpc/aim/trap.c Thu Aug 19 16:40:30 2010(r211514) +++ head/sys/powerpc/aim/trap.c Thu Aug 19 16:41:27 2010(r211515) @@ -34,8 +34,6 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); -#include opt_ktrace.h - #include sys/param.h #include sys/kdb.h #include sys/proc.h @@ -50,9 +48,6 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/uio.h #include sys/signalvar.h -#ifdef KTRACE -#include sys/ktrace.h -#endif #include sys/vmmeter.h #include security/audit/audit.h Modified: head/sys/powerpc/booke/trap.c == --- head/sys/powerpc/booke/trap.c Thu Aug 19 16:40:30 2010 (r211514) +++ head/sys/powerpc/booke/trap.c Thu Aug 19 16:41:27 2010 (r211515) @@ -35,7 +35,6 @@ __FBSDID($FreeBSD$); #include opt_fpu_emu.h -#include opt_ktrace.h #include sys/param.h #include sys/kdb.h @@ -51,9 +50,6 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/uio.h #include sys/signalvar.h -#ifdef KTRACE -#include sys/ktrace.h -#endif #include sys/vmmeter.h #include security/audit/audit.h Modified: head/sys/sparc64/sparc64/trap.c == --- head/sys/sparc64/sparc64/trap.c Thu Aug 19 16:40:30 2010 (r211514) +++ head/sys/sparc64/sparc64/trap.c Thu Aug 19 16:41:27
svn commit: r211516 - head/sys/dev/e1000
Author: jfv Date: Thu Aug 19 17:00:33 2010 New Revision: 211516 URL: http://svn.freebsd.org/changeset/base/211516 Log: Eliminate the ambiguous queue setting logic for the VF, it made it possible to have 2 queues which we don't want, the HOST is unable to handle it. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Thu Aug 19 16:41:27 2010(r211515) +++ head/sys/dev/e1000/if_igb.c Thu Aug 19 17:00:33 2010(r211516) @@ -2473,8 +2473,8 @@ igb_setup_msix(struct adapter *adapter) if ((adapter-hw.mac.type == e1000_82575) (queues 4)) queues = 4; - /* Limit the VF adapter to one queues */ - if ((adapter-hw.mac.type == e1000_vfadapt) (queues 2)) + /* Limit the VF adapter to one queue */ + if (adapter-hw.mac.type == e1000_vfadapt) queues = 1; /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
In message: 4c6d2933.9020...@freebsd.org Andre Oppermann an...@freebsd.org writes: : On 19.08.2010 13:53, Adrian Chadd wrote: : Author: adrian : Date: Thu Aug 19 11:53:55 2010 : New Revision: 211503 : URL: http://svn.freebsd.org/changeset/base/211503 : : Log: : Add some initial AR724X chipset support. : : This is untested but should at least allow an AR724X to boot. : : Isn't this something that should be done on a project branch and : merged back when in a good working state? We don't have a branch for mips stuff these days. This stuff is OK, since the AR724X is just being rolled out right now... For non AR724x systems, this won't affect anything... Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
On 19.08.2010 19:20, M. Warner Losh wrote: In message:4c6d2933.9020...@freebsd.org Andre Oppermannan...@freebsd.org writes: : On 19.08.2010 13:53, Adrian Chadd wrote: : Author: adrian : Date: Thu Aug 19 11:53:55 2010 : New Revision: 211503 : URL: http://svn.freebsd.org/changeset/base/211503 : : Log: : Add some initial AR724X chipset support. : : This is untested but should at least allow an AR724X to boot. : : Isn't this something that should be done on a project branch and : merged back when in a good working state? We don't have a branch for mips stuff these days. This stuff is OK, since the AR724X is just being rolled out right now... For non AR724x systems, this won't affect anything... I was more concerned about tree breakage for non-tested code. When developing something bleeding edge it is often useful to just commit some stuff and have it sorted out later. In head this is more dangerous. A small AR724X development branch would be ideal for this. Branching is cheap with SVN these days. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
In message: 4c6d6fd7.7060...@freebsd.org Andre Oppermann an...@freebsd.org writes: : On 19.08.2010 19:20, M. Warner Losh wrote: : In message:4c6d2933.9020...@freebsd.org : Andre Oppermannan...@freebsd.org writes: : : On 19.08.2010 13:53, Adrian Chadd wrote: : : Author: adrian : : Date: Thu Aug 19 11:53:55 2010 : : New Revision: 211503 : : URL: http://svn.freebsd.org/changeset/base/211503 : : : : Log: : : Add some initial AR724X chipset support. : : : : This is untested but should at least allow an AR724X to boot. : : : : Isn't this something that should be done on a project branch and : : merged back when in a good working state? : : We don't have a branch for mips stuff these days. This stuff is OK, : since the AR724X is just being rolled out right now... For non AR724x : systems, this won't affect anything... : : I was more concerned about tree breakage for non-tested code. When : developing something bleeding edge it is often useful to just commit : some stuff and have it sorted out later. In head this is more : dangerous. A small AR724X development branch would be ideal for : this. Branching is cheap with SVN these days. Merging isn't that cheap with svn. The svn:mergeinfo properties make them a pita. Given that this code won't break anything, except possibly the now-unsupported AR724x, I think a branch would be overkill. We'd have to drag that branch along all the time until we can get actual hardware to test it on, which is a high overhead. Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
On 19.08.2010 20:42, M. Warner Losh wrote: In message:4c6d6fd7.7060...@freebsd.org Andre Oppermannan...@freebsd.org writes: : On 19.08.2010 19:20, M. Warner Losh wrote: : In message:4c6d2933.9020...@freebsd.org : Andre Oppermannan...@freebsd.org writes: : : On 19.08.2010 13:53, Adrian Chadd wrote: : : Author: adrian : : Date: Thu Aug 19 11:53:55 2010 : : New Revision: 211503 : : URL: http://svn.freebsd.org/changeset/base/211503 : : : : Log: : : Add some initial AR724X chipset support. : : : : This is untested but should at least allow an AR724X to boot. : : : : Isn't this something that should be done on a project branch and : : merged back when in a good working state? : : We don't have a branch for mips stuff these days. This stuff is OK, : since the AR724X is just being rolled out right now... For non AR724x : systems, this won't affect anything... : : I was more concerned about tree breakage for non-tested code. When : developing something bleeding edge it is often useful to just commit : some stuff and have it sorted out later. In head this is more : dangerous. A small AR724X development branch would be ideal for : this. Branching is cheap with SVN these days. Merging isn't that cheap with svn. The svn:mergeinfo properties make them a pita. Given that this code won't break anything, except possibly the now-unsupported AR724x, I think a branch would be overkill. We'd have to drag that branch along all the time until we can get actual hardware to test it on, which is a high overhead. Didn't know that branching and merging isn't that easy with SVN after all. This was one of the supposed benefits for switching from CVS. If there is no risk of head breakage I don't mind at all. -- Andre ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
In message: 4c6d80a0.4080...@freebsd.org Andre Oppermann an...@freebsd.org writes: : On 19.08.2010 20:42, M. Warner Losh wrote: : In message:4c6d6fd7.7060...@freebsd.org : Andre Oppermannan...@freebsd.org writes: : : On 19.08.2010 19:20, M. Warner Losh wrote: : : In message:4c6d2933.9020...@freebsd.org : : Andre Oppermannan...@freebsd.org writes: : : : On 19.08.2010 13:53, Adrian Chadd wrote: : : : Author: adrian : : : Date: Thu Aug 19 11:53:55 2010 : : : New Revision: 211503 : : : URL: http://svn.freebsd.org/changeset/base/211503 : : : : : : Log: : : : Add some initial AR724X chipset support. : : : : : : This is untested but should at least allow an AR724X to boot. : : : : : : Isn't this something that should be done on a project branch and : : : merged back when in a good working state? : : : : We don't have a branch for mips stuff these days. This stuff is : OK, : : since the AR724X is just being rolled out right now... For non : AR724x : : systems, this won't affect anything... : : : : I was more concerned about tree breakage for non-tested code. When : : developing something bleeding edge it is often useful to just commit : : some stuff and have it sorted out later. In head this is more : : dangerous. A small AR724X development branch would be ideal for : : this. Branching is cheap with SVN these days. : : Merging isn't that cheap with svn. The svn:mergeinfo properties make : them a pita. Given that this code won't break anything, except : possibly the now-unsupported AR724x, I think a branch would be : overkill. We'd have to drag that branch along all the time until we : can get actual hardware to test it on, which is a high overhead. : : Didn't know that branching and merging isn't that easy with SVN after : all. This was one of the supposed benefits for switching from CVS. : If there is no risk of head breakage I don't mind at all. Branching is a lot easier and saner. But there's still a cost to branching that must be weighed... Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
On Thu, Aug 19, 2010 at 12:16, M. Warner Losh i...@bsdimp.com wrote: Branching is a lot easier and saner. But there's still a cost to branching that must be weighed... As long as one isn't trying to be overly-clever in using the tools it really isn't so bad and is about as bad as Perforce. I don't think we should ever use the merge command to merge commits to head from a short-lived/non-vendor branch. It really sounds like you have had an unusually-bad experience with Subversion and I think we should try to dissect that rather than writing off developing in branches. I haven't had any significant problems with merging from head to my branch until I reached the level of having dozens of files and directories added in my branch originally and then looped-back from head. I, like Adrian, tend to do very sort of incremental work and lots of little commits to break up my progress (and to have lots of points to revert to.) It has generally been my understanding that we frown on doing that sort of thing in head. I don't see the point of generating an E-Mail to everyone who reads the commit lists to add a small, unused header file, except in very occasional circumstances. I think that's a great level of detail to work at in a branch. Juli. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211501 - in head/sys: modules modules/send netinet netinet6 sys
On 08/19/2010 04:42, Ana Kukec wrote: Hi all, A man page for the kernel side SeND, and an updated port with Secure Neighbor Discovery application will follow soon. At minimum committing the man page along with new code is how such things should be done. Can you define soon? Doug -- Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211503 - head/sys/mips/atheros
In message: aanlktim4drh4shqmar-5tkvpwmmudx+7dmqjjc=yp...@mail.gmail.com Juli Mallett jmall...@freebsd.org writes: : On Thu, Aug 19, 2010 at 12:16, M. Warner Losh i...@bsdimp.com wrote: : Branching is a lot easier and saner. But there's still a cost to : branching that must be weighed... : : As long as one isn't trying to be overly-clever in using the tools it : really isn't so bad and is about as bad as Perforce. I don't think we : should ever use the merge command to merge commits to head from a : short-lived/non-vendor branch. It really sounds like you have had an : unusually-bad experience with Subversion and I think we should try to : dissect that rather than writing off developing in branches. The tbemd branch has been a pita to keep going as long as I've had to... : I haven't had any significant problems with merging from head to my : branch until I reached the level of having dozens of files and : directories added in my branch originally and then looped-back from : head. yea. I'll admit that part of my angst is from the projects/mips tree, which did get somewhat out of hand. : I, like Adrian, tend to do very sort of incremental work and lots of : little commits to break up my progress (and to have lots of points to : revert to.) It has generally been my understanding that we frown on : doing that sort of thing in head. I don't see the point of generating : an E-Mail to everyone who reads the commit lists to add a small, : unused header file, except in very occasional circumstances. I think : that's a great level of detail to work at in a branch. Yea, perforce will generate mail only for those that opt in... Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211501 - in head/sys: modules modules/send netinet netinet6 sys
On Thu, 19 Aug 2010, Doug Barton wrote: On 08/19/2010 04:42, Ana Kukec wrote: Hi all, A man page for the kernel side SeND, and an updated port with Secure Neighbor Discovery application will follow soon. At minimum committing the man page along with new code is how such things should be done. Can you define soon? Yes I can: soon will be when it'll be comitted. Meanwhile if you have time I'd know several dozen other things we don't have a man page for ... /bz -- Bjoern A. Zeeb This signature is about you not me. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211517 - head/usr.bin/calendar
Author: edwin Date: Thu Aug 19 21:59:39 2010 New Revision: 211517 URL: http://svn.freebsd.org/changeset/base/211517 Log: '\0' - 0 Fix silly mistake by being overly zeaolous[sp] of applying the style rules. Modified: head/usr.bin/calendar/locale.c Modified: head/usr.bin/calendar/locale.c == --- head/usr.bin/calendar/locale.c Thu Aug 19 17:00:33 2010 (r211516) +++ head/usr.bin/calendar/locale.c Thu Aug 19 21:59:39 2010 (r211517) @@ -76,7 +76,7 @@ setnnames(void) int i, l; struct tm tm; - memset(tm, '\0', sizeof(struct tm)); + memset(tm, 0, sizeof(struct tm)); for (i = 0; i 7; i++) { tm.tm_wday = i; strftime(buf, sizeof(buf), %a, tm); @@ -104,7 +104,7 @@ setnnames(void) fndays[i].len = strlen(buf); } - memset(tm, '\0', sizeof(struct tm)); + memset(tm, 0, sizeof(struct tm)); for (i = 0; i 12; i++) { tm.tm_mon = i; strftime(buf, sizeof(buf), %b, tm); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211505 - head/contrib/gcc
On Thu, 19 Aug 2010, Rui Paulo wrote: Log: Remove unneeded casts in inline assembly in contrib/gcc/longlong.h, These seem to be needed, and some of them valid. Any lvalue arg that can be put in a register can be cast to USItype (unsigned int) on i386. The args are macro args, so they may have any integer type no larger than USItype originally, and they must be cast to USItype for the asms to work if the args are smaller than USItype... which are apparently heinous GNU extensions, so clang can compile this without using the -fheinous-gnu-extensions option. But when the args are lvalues, casting them is invalid. This is apparently the heinous extension depended on. Results in *no* binary change, neither with clang, nor with gcc. This cannot be tested by compiling a few binaries, since the few binaries might not include enough examples to give test coverage of cases with args smaller than USItype. Perhaps the macros are only used for building libgcc, but this is unclear. Modified: head/contrib/gcc/longlong.h == --- head/contrib/gcc/longlong.h Thu Aug 19 12:52:49 2010(r211504) +++ head/contrib/gcc/longlong.h Thu Aug 19 12:59:57 2010(r211505) @@ -314,38 +314,38 @@ UDItype __umulsidi3 (USItype, USItype); #if (defined (__i386__) || defined (__i486__)) W_TYPE_SIZE == 32 #define add_ss(sh, sl, ah, al, bh, bl) \ __asm__ (addl %5,%1\n\tadcl %3,%0 \ - : =r ((USItype) (sh)), \ -=r ((USItype) (sl)) \ I can only see a problem with casting lvalues (2 here). The corrected version might use USItype _sh = (sh); ... (sh) = _sh;, etc. - : %0 ((USItype) (ah)), \ -g ((USItype) (bh)),\ -%1 ((USItype) (al)), \ -g ((USItype) (bl))) + : =r (sh), \ +=r (sl) \ + : %0 (ah), \ +g (bh),\ +%1 (al), \ +g (bl)) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ (subl %5,%1\n\tsbbl %3,%0 \ - : =r ((USItype) (sh)), \ -=r ((USItype) (sl)) \ Most of the asms have 2 problematic lvalues. - : 0 ((USItype) (ah)),\ Casting this rvalue shouldn't cause problems, but it is unclear if 0 can be the same arg as =r if they are cast differently. -g ((USItype) (bh)),\ -1 ((USItype) (al)),\ -g ((USItype) (bl))) + : =r (sh), \ +=r (sl) \ + : 0 (ah),\ +g (bh),\ +1 (al),\ +g (bl)) #define umul_ppmm(w1, w0, u, v) \ __asm__ (mull %3 \ - : =a ((USItype) (w0)), \ -=d ((USItype) (w1))\ - : %0 ((USItype) (u)),\ -rm ((USItype) (v))) + : =a (w0), \ +=d (w1)\ + : %0 (u),\ +rm (v)) #define udiv_qrnnd(q, r, n1, n0, dv) \ __asm__ (divl %4 \ - : =a ((USItype) (q)),\ -=d ((USItype) (r)) \ - : 0 ((USItype) (n0)),\ -1 ((USItype) (n1)),\ -rm ((USItype) (dv))) + : =a (q),\ +=d (r) \ + : 0 (n0),\ +1 (n1),\ +rm (dv)) #define count_leading_zeros(count, x) \ do { \
svn commit: r211518 - in head/sys: amd64/amd64 i386/i386
Author: attilio Date: Thu Aug 19 22:37:43 2010 New Revision: 211518 URL: http://svn.freebsd.org/changeset/base/211518 Log: Revert part of the r211149 as I erroneously ported the logical_cpus from Yahoo! patchset as a mask (and according manipulating variables) while it is actually a CPU count. Submitted by: neel MFC after:1 month X-MFC:211149 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Thu Aug 19 21:59:39 2010 (r211517) +++ head/sys/amd64/amd64/mp_machdep.c Thu Aug 19 22:37:43 2010 (r211518) @@ -127,7 +127,7 @@ extern inthand_t IDTVEC(fast_syscall), I * Local data and functions. */ -static cpumask_t logical_cpus; +static u_int logical_cpus; static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ @@ -162,8 +162,8 @@ static int start_all_aps(void); static int start_ap(int apic_id); static voidrelease_aps(void *dummy); -static cpumask_t hlt_logical_cpus; -static cpumask_t hyperthreading_cpus; +static int hlt_logical_cpus; +static u_int hyperthreading_cpus; static cpumask_t hyperthreading_cpus_mask; static int hyperthreading_allowed = 1; static struct sysctl_ctx_list logical_cpu_clist; Modified: head/sys/i386/i386/mp_machdep.c == --- head/sys/i386/i386/mp_machdep.c Thu Aug 19 21:59:39 2010 (r211517) +++ head/sys/i386/i386/mp_machdep.c Thu Aug 19 22:37:43 2010 (r211518) @@ -174,7 +174,7 @@ static u_long *ipi_statclock_counts[MAXC * Local data and functions. */ -static cpumask_t logical_cpus; +static u_int logical_cpus; static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ @@ -210,8 +210,8 @@ static int start_all_aps(void); static int start_ap(int apic_id); static voidrelease_aps(void *dummy); -static cpumask_t hlt_logical_cpus; -static cpumask_t hyperthreading_cpus; +static int hlt_logical_cpus; +static u_int hyperthreading_cpus; static cpumask_t hyperthreading_cpus_mask; static int hyperthreading_allowed = 1; static struct sysctl_ctx_list logical_cpu_clist; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211519 - head/usr.bin/grep
Author: delphij Date: Thu Aug 19 22:55:17 2010 New Revision: 211519 URL: http://svn.freebsd.org/changeset/base/211519 Log: Revert a minor part of revision 211364: - Imply -h if single file is grepped, this is the GNU behaviour This is already done by code above the change and have caused a regression since this instance of code does not check Hflag. Reported by: davidxu Pointy hat to:delphij Modified: head/usr.bin/grep/grep.c Modified: head/usr.bin/grep/grep.c == --- head/usr.bin/grep/grep.cThu Aug 19 22:37:43 2010(r211518) +++ head/usr.bin/grep/grep.cThu Aug 19 22:55:17 2010(r211519) @@ -681,15 +681,12 @@ main(int argc, char *argv[]) if (dirbehave == DIR_RECURSE) c = grep_tree(aargv); - else { - if (aargc == 1) - hflag = true; + else for (c = 0; aargc--; ++aargv) { if ((finclude || fexclude) !file_matching(*aargv)) continue; c+= procfile(*aargv); } - } #ifndef WITHOUT_NLS catclose(catalog); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211520 - head/sys/netinet6
Author: anchie Date: Thu Aug 19 23:16:44 2010 New Revision: 211520 URL: http://svn.freebsd.org/changeset/base/211520 Log: Fix mbuf leakages and remove unneccessary duplicate mbuf frees. Use the right copy of an mbuf for the IP6_EXTHDR_CHECK. Reported by: zec, hrs Approved by: bz (mentor) Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c == --- head/sys/netinet6/icmp6.c Thu Aug 19 22:55:17 2010(r211519) +++ head/sys/netinet6/icmp6.c Thu Aug 19 23:16:44 2010(r211520) @@ -786,14 +786,12 @@ icmp6_input(struct mbuf **mp, int *offp, goto freeit; } if (send_sendso_input_hook != NULL) { - IP6_EXTHDR_CHECK(m, off, + IP6_EXTHDR_CHECK(n, off, icmp6len, IPPROTO_DONE); error = send_sendso_input_hook(n, ifp, SND_IN, ip6len); - if (error == 0) { - m_freem(n); - return (IPPROTO_DONE); - } + if (error == 0) + goto freeit; /* -1 == no app on SEND socket */ nd6_rs_input(n, off, icmp6len); } else @@ -819,14 +817,13 @@ icmp6_input(struct mbuf **mp, int *offp, } else nd6_ra_input(m, off, icmp6len); m = NULL; - m_freem(n); goto freeit; } if (send_sendso_input_hook != NULL) { error = send_sendso_input_hook(n, ifp, SND_IN, ip6len); if (error == 0) - return (IPPROTO_DONE); + goto freeit; nd6_ra_input(n, off, icmp6len); } else nd6_ra_input(n, off, icmp6len); @@ -848,7 +845,6 @@ icmp6_input(struct mbuf **mp, int *offp, nd6_ns_input(m, off, icmp6len); } else nd6_ns_input(m, off, icmp6len); - m_freem(n); m = NULL; goto freeit; } @@ -856,7 +852,7 @@ icmp6_input(struct mbuf **mp, int *offp, error = send_sendso_input_hook(n, ifp, SND_IN, ip6len); if (error == 0) - return (IPPROTO_DONE); + goto freeit; nd6_ns_input(n, off, icmp6len); } else nd6_ns_input(n, off, icmp6len); @@ -880,7 +876,6 @@ icmp6_input(struct mbuf **mp, int *offp, nd6_na_input(m, off, icmp6len); } else nd6_na_input(m, off, icmp6len); - m_freem(n); m = NULL; goto freeit; } @@ -888,7 +883,7 @@ icmp6_input(struct mbuf **mp, int *offp, error = send_sendso_input_hook(n, ifp, SND_IN, ip6len); if (error == 0) - return (IPPROTO_DONE); + goto freeit; nd6_na_input(n, off, icmp6len); } else nd6_na_input(n, off, icmp6len); @@ -910,7 +905,6 @@ icmp6_input(struct mbuf **mp, int *offp, icmp6_redirect_input(m, off); } else icmp6_redirect_input(m, off); - m_freem(n); m = NULL; goto freeit; } @@ -918,7 +912,7 @@ icmp6_input(struct mbuf **mp, int *offp, error = send_sendso_input_hook(n, ifp, SND_IN, ip6len); if (error == 0) - return (IPPROTO_DONE); + goto freeit; icmp6_redirect_input(n, off); } else icmp6_redirect_input(n, off); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211505 - head/contrib/gcc
On 2010-08-20 00:20, Bruce Evans wrote: These seem to be needed, and some of them valid. Any lvalue arg that can be put in a register can be cast to USItype (unsigned int) on i386. The args are macro args, so they may have any integer type no larger than USItype originally, and they must be cast to USItype for the asms to work if the args are smaller than USItype... But will the casts not potentially hide problems, if you pass the wrong types to those macros? Maybe it is better if the compiler complains that some argument is of an incompatible type, than just forcing it to cast? which are apparently heinous GNU extensions, so clang can compile this without using the -fheinous-gnu-extensions option. But when the args are lvalues, casting them is invalid. This is apparently the heinous extension depended on. Yes, clang complains precisely about that: gnu/lib/libgcc/../../../contrib/gcc/libgcc2.c:536:22: error: invalid use of a cast in a inline asm context requiring an l-value: remove the cast or build with -fheinous-gnu-extensions DWunion w = {.ll = __umulsidi3 (uu.s.low, vv.s.low)}; ^~~~ In file included from gnu/lib/libgcc/../../../contrib/gcc/libgcc2.c:65: In file included from gnu/lib/libgcc/../../../contrib/gcc/libgcc2.h:435: gnu/lib/libgcc/../../../contrib/gcc/longlong.h:1293:5: note: instantiated from: umul_ppmm (__w.s.high, __w.s.low, u, v);\ ^ It turns out that only removing the casts for these specific lvalues is indeed enough to make clang happy. Attached patch reverts all other changes, if that is to be preferred. Results in *no* binary change, neither with clang, nor with gcc. This cannot be tested by compiling a few binaries, since the few binaries might not include enough examples to give test coverage of cases with args smaller than USItype. Perhaps the macros are only used for building libgcc, but this is unclear. contrib/gcc/longlong.h is only used in contrib/gcc/libgcc2.h, and in contrib/gcc/config/soft-fp/soft-fp.h. On i386, soft-fp is not used, and libgcc2.h is only used in contrib/gcc/libgcc2.c, so libgcc is the only consumer, as far as I can see. diff --git a/contrib/gcc/longlong.h b/contrib/gcc/longlong.h index 8805d91..a789d16 100644 --- a/contrib/gcc/longlong.h +++ b/contrib/gcc/longlong.h @@ -314,38 +314,38 @@ UDItype __umulsidi3 (USItype, USItype); #if (defined (__i386__) || defined (__i486__)) W_TYPE_SIZE == 32 #define add_ss(sh, sl, ah, al, bh, bl) \ __asm__ (addl %5,%1\n\tadcl %3,%0 \ - : =r (sh), \ -=r (sl) \ - : %0 (ah), \ -g (bh), \ -%1 (al), \ -g (bl)) + : =r ((USItype) (sh)), \ +=r ((USItype) (sl)) \ + : %0 ((USItype) (ah)), \ +g ((USItype) (bh)), \ +%1 ((USItype) (al)), \ +g ((USItype) (bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ (subl %5,%1\n\tsbbl %3,%0 \ : =r (sh), \ =r (sl) \ - : 0 (ah), \ -g (bh), \ -1 (al), \ -g (bl)) + : 0 ((USItype) (ah)), \ +g ((USItype) (bh)), \ +1 ((USItype) (al)), \ +g ((USItype) (bl))) #define umul_ppmm(w1, w0, u, v) \ __asm__ (mull %3 \ : =a (w0), \ =d (w1) \ - : %0 (u), \ -rm (v)) + : %0 ((USItype) (u)), \ +rm ((USItype) (v))) #define udiv_qrnnd(q, r, n1, n0, dv) \ __asm__ (divl %4 \ : =a (q), \ =d (r) \ - : 0 (n0), \ -1 (n1), \ -
svn commit: r211521 - head/sys/conf
Author: nwhitehorn Date: Fri Aug 20 01:23:17 2010 New Revision: 211521 URL: http://svn.freebsd.org/changeset/base/211521 Log: FPU EMU is 32-bit only for now, so mark it as a powerpc-only feature. This fixes powerpc64 LINT. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Thu Aug 19 23:16:44 2010(r211520) +++ head/sys/conf/files.powerpc Fri Aug 20 01:23:17 2010(r211521) @@ -102,15 +102,15 @@ powerpc/booke/trap.c optionale500 powerpc/booke/vm_machdep.c optionale500 powerpc/cpufreq/dfs.c optionalcpufreq powerpc/cpufreq/pcr.c optionalcpufreq aim -powerpc/fpu/fpu_add.c optionalfpu_emu -powerpc/fpu/fpu_compare.c optionalfpu_emu -powerpc/fpu/fpu_div.c optionalfpu_emu -powerpc/fpu/fpu_emu.c optionalfpu_emu -powerpc/fpu/fpu_explode.c optionalfpu_emu -powerpc/fpu/fpu_implode.c optionalfpu_emu -powerpc/fpu/fpu_mul.c optionalfpu_emu -powerpc/fpu/fpu_sqrt.c optionalfpu_emu -powerpc/fpu/fpu_subr.c optionalfpu_emu +powerpc/fpu/fpu_add.c optionalfpu_emu powerpc +powerpc/fpu/fpu_compare.c optionalfpu_emu powerpc +powerpc/fpu/fpu_div.c optionalfpu_emu powerpc +powerpc/fpu/fpu_emu.c optionalfpu_emu powerpc +powerpc/fpu/fpu_explode.c optionalfpu_emu powerpc +powerpc/fpu/fpu_implode.c optionalfpu_emu powerpc +powerpc/fpu/fpu_mul.c optionalfpu_emu powerpc +powerpc/fpu/fpu_sqrt.c optionalfpu_emu powerpc +powerpc/fpu/fpu_subr.c optionalfpu_emu powerpc powerpc/mambo/mambocall.S optionalmambo powerpc/mambo/mambo.c optionalmambo powerpc/mambo/mambo_console.c optionalmambo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r211501 - in head/sys: modules modules/send netinet netinet6 sys
On 08/19/2010 14:50, Bjoern A. Zeeb wrote: On Thu, 19 Aug 2010, Doug Barton wrote: On 08/19/2010 04:42, Ana Kukec wrote: Hi all, A man page for the kernel side SeND, and an updated port with Secure Neighbor Discovery application will follow soon. At minimum committing the man page along with new code is how such things should be done. Can you define soon? Yes I can: soon will be when it'll be comitted. I'm guessing that's an attempt at humor, but what I'm looking for is an actual timeline. If the answer is in the next day or two then that's fine, we'll let this one go with a warning. If the answer is someday then I'm going to request that the code be backed out until the man page(s) are done. I'm actually trying to be reasonable and work with a new developer so that they can learn how we like to have things done around here. What are you trying to do? Meanwhile if you have time I'd know several dozen other things we don't have a man page for ... I would definitely recommend that you make a list of them, preferably someplace visible like the wiki. If you don't already have access to the wiki (or some other suitable forum) then send the list to -doc@ and we'll make sure that it gets posted. Given the recent resurgence of interest in updating our documentation it certainly wouldn't hurt to have some examples of low-hanging fruit that we can turn budding mdoc gurus loose on. Meanwhile, the fact that in the past code has been committed without man pages is the exact cause of the problem you're describing. It is certainly not a justification for continuing to do it wrong. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211522 - head/lib/libthr/thread
Author: davidxu Date: Fri Aug 20 04:15:05 2010 New Revision: 211522 URL: http://svn.freebsd.org/changeset/base/211522 Log: According to specification, function fcntl() is a cancellation point only when cmd argument is F_SETLKW. Modified: head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libthr/thread/thr_syscalls.c == --- head/lib/libthr/thread/thr_syscalls.c Fri Aug 20 01:23:17 2010 (r211521) +++ head/lib/libthr/thread/thr_syscalls.c Fri Aug 20 04:15:05 2010 (r211522) @@ -242,8 +242,6 @@ __fcntl(int fd, int cmd,...) int ret; va_list ap; - _thr_cancel_enter(curthread); - va_start(ap, cmd); switch (cmd) { case F_DUPFD: @@ -257,6 +255,17 @@ __fcntl(int fd, int cmd,...) case F_GETFL: ret = __sys_fcntl(fd, cmd); break; + + case F_OSETLKW: + case F_SETLKW: + _thr_cancel_enter(curthread); +#ifdef SYSCALL_COMPAT + ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); +#else + ret = __sys_fcntl(fd, cmd, va_arg(ap, void *)); +#endif + _thr_cancel_leave(curthread); + break; default: #ifdef SYSCALL_COMPAT ret = __fcntl_compat(fd, cmd, va_arg(ap, void *)); @@ -266,8 +275,6 @@ __fcntl(int fd, int cmd,...) } va_end(ap); - _thr_cancel_leave(curthread); - return (ret); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211523 - head/sys/kern
Author: davidxu Date: Fri Aug 20 04:28:30 2010 New Revision: 211523 URL: http://svn.freebsd.org/changeset/base/211523 Log: If thread set a TDP_WAKEUP for itself, clears the flag and returns EINTR immediately, this is used for implementing reliable pthread cancellation. Modified: head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/subr_sleepqueue.c == --- head/sys/kern/subr_sleepqueue.c Fri Aug 20 04:15:05 2010 (r211522) +++ head/sys/kern/subr_sleepqueue.c Fri Aug 20 04:28:30 2010 (r211523) @@ -408,6 +408,12 @@ sleepq_catch_signals(void *wchan, int pr sc = SC_LOOKUP(wchan); mtx_assert(sc-sc_lock, MA_OWNED); MPASS(wchan != NULL); + if ((td-td_pflags TDP_WAKEUP) != 0) { + td-td_pflags = ~TDP_WAKEUP; + ret = EINTR; + goto out; + } + /* * See if there are any pending signals for this thread. If not * we can switch immediately. Otherwise do the signal processing @@ -453,6 +459,7 @@ sleepq_catch_signals(void *wchan, int pr sleepq_switch(wchan, pri); return (0); } +out: /* * There were pending signals and this thread is still * on the sleep queue, remove it from the sleep queue. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r211524 - head/lib/libthr/thread
Author: davidxu Date: Fri Aug 20 05:15:39 2010 New Revision: 211524 URL: http://svn.freebsd.org/changeset/base/211524 Log: In current implementation, thread cancellation is done in signal handler, which does not know what is the state of interrupted system call, for example, open() system call opened a file and the thread is still cancelled, result is descriptor leak, there are other problems which can cause resource leak or undeterminable side effect when a thread is cancelled. However, this is no longer true in new implementation. In defering mode, a thread is canceled if cancellation request is pending and later the thread enters a cancellation point, otherwise, a later pthread_cancel() just causes SIGCANCEL to be sent to the target thread, and causes target thread to abort system call, userland code in libthr then checks cancellation state, and cancels the thread if needed. For example, the cancellation point open(), the thread may be canceled at start, but later, if it opened a file descriptor, it is not canceled, this avoids file handle leak. Another example is read(), a thread may be canceled at start of the function, but later, if it read some bytes from a socket, the thread is not canceled, the caller then can decide if it should still enable cancelling or disable it and continue reading data until it thinks it has read all bytes of a packet, and keeps a protocol stream in health state, if user ignores partly reading of a packet without disabling cancellation, then second iteration of read loop cause the thread to be cancelled. An exception is that the close() cancellation point always closes a file handle despite whether the thread is cancelled or not. The old mechanism is still kept, for a functions which is not so easily to fix a cancellation problem, the rough mechanism is used. Reviewed by: kib@ Modified: head/lib/libthr/thread/thr_cancel.c head/lib/libthr/thread/thr_cond.c head/lib/libthr/thread/thr_join.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_sig.c head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libthr/thread/thr_cancel.c == --- head/lib/libthr/thread/thr_cancel.c Fri Aug 20 04:28:30 2010 (r211523) +++ head/lib/libthr/thread/thr_cancel.c Fri Aug 20 05:15:39 2010 (r211524) @@ -42,7 +42,7 @@ static inline void testcancel(struct pthread *curthread) { if (__predict_false(SHOULD_CANCEL(curthread) - !THR_IN_CRITICAL(curthread) curthread-cancel_defer == 0)) + !THR_IN_CRITICAL(curthread))) _pthread_exit(PTHREAD_CANCELED); } @@ -143,40 +143,44 @@ _pthread_testcancel(void) void _thr_cancel_enter(struct pthread *curthread) { - if (curthread-cancel_enable) { - curthread-cancel_point++; + curthread-cancel_point++; + if (curthread-cancel_enable) testcancel(curthread); +} + +void +_thr_cancel_enter_defer(struct pthread *curthread, int maycancel) +{ + curthread-cancel_defer++; + curthread-cancel_point++; + if (__predict_false(SHOULD_CANCEL(curthread) + !THR_IN_CRITICAL(curthread))) { + if (!maycancel) + thr_wake(curthread-tid); + else + _pthread_exit(PTHREAD_CANCELED); } } void _thr_cancel_leave(struct pthread *curthread) { - if (curthread-cancel_enable) - curthread-cancel_point--; + curthread-cancel_point--; } void -_thr_cancel_enter_defer(struct pthread *curthread) +_thr_cancel_leave2(struct pthread *curthread, int maycancel) { - if (curthread-cancel_enable) { - curthread-cancel_point++; + if (curthread-cancel_enable maycancel) testcancel(curthread); - curthread-cancel_defer++; - } + curthread-cancel_point--; } void -_thr_cancel_leave_defer(struct pthread *curthread, int check) +_thr_cancel_leave_defer(struct pthread *curthread, int maycancel) { - if (curthread-cancel_enable) { - if (!check) { - curthread-cancel_point--; - curthread-cancel_defer--; - } else { - curthread-cancel_defer--; - testcancel(curthread); - curthread-cancel_point--; - } - } + if (curthread-cancel_enable maycancel) + testcancel(curthread); + curthread-cancel_point--; + curthread-cancel_defer--; } Modified: head/lib/libthr/thread/thr_cond.c == --- head/lib/libthr/thread/thr_cond.c Fri Aug 20 04:28:30 2010 (r211523) +++ head/lib/libthr/thread/thr_cond.c Fri Aug 20 05:15:39 2010 (r211524) @@ -162,6 +162,14 @@