CVS commit: src/sys/external/intel-public/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 08:09:25 UTC 2011 Removed Files: src/sys/external/intel-public/acpica/conf: files.acpica src/sys/external/intel-public/acpica/dist: README changes.txt osunixxf.c src/sys/external/intel-public/acpica/dist/common: adfile.c adisasm.c adwalk.c dmextern.c dmrestag.c dmtable.c dmtbdump.c dmtbinfo.c getopt.c src/sys/external/intel-public/acpica/dist/compiler: Makefile aslanalyze.c aslcodegen.c aslcompile.c aslcompiler.h aslcompiler.l aslcompiler.y asldefine.h aslerror.c aslfiles.c aslfold.c aslglobal.h asllength.c asllisting.c aslload.c asllookup.c aslmain.c aslmap.c aslopcodes.c asloperands.c aslopt.c aslpredef.c aslresource.c aslrestype1.c aslrestype1i.c aslrestype2.c aslrestype2d.c aslrestype2e.c aslrestype2q.c aslrestype2w.c aslstartup.c aslstubs.c asltransform.c asltree.c asltypes.h aslutils.c dtcompile.c dtcompiler.h dtfield.c dtio.c dtsubtable.c dttable.c dtutils.c readme.txt src/sys/external/intel-public/acpica/dist/debugger: dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c dbinput.c dbstats.c dbutils.c dbxface.c src/sys/external/intel-public/acpica/dist/disassembler: dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c dmresrcl.c dmresrcs.c dmutils.c dmwalk.c src/sys/external/intel-public/acpica/dist/dispatcher: dsfield.c dsinit.c dsmethod.c dsmthdat.c dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c dswscope.c dswstate.c src/sys/external/intel-public/acpica/dist/events: evevent.c evgpe.c evgpeblk.c evgpeinit.c evgpeutil.c evmisc.c evregion.c evrgnini.c evsci.c evxface.c evxfevnt.c evxfregn.c src/sys/external/intel-public/acpica/dist/executer: exconfig.c exconvrt.c excreate.c exdebug.c exdump.c exfield.c exfldio.c exmisc.c exmutex.c exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c exprep.c exregion.c exresnte.c exresolv.c exresop.c exstore.c exstoren.c exstorob.c exsystem.c exutils.c src/sys/external/intel-public/acpica/dist/generate/lint: files.lnt lint.bat lset.bat options.lnt readme.txt std16.lnt std32.lnt std64.lnt src/sys/external/intel-public/acpica/dist/hardware: hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c hwvalid.c hwxface.c src/sys/external/intel-public/acpica/dist/include: acapps.h accommon.h acconfig.h acdebug.h acdisasm.h acdispat.h acevents.h acexcep.h acglobal.h achware.h acinterp.h aclocal.h acmacros.h acnames.h acnamesp.h acobject.h acopcode.h acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h acpredef.h acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h actbl2.h actypes.h acutils.h amlcode.h amlresrc.h src/sys/external/intel-public/acpica/dist/include/platform: accygwin.h acefi.h acenv.h acfreebsd.h acgcc.h acintel.h aclinux.h acmsvc.h acnetbsd.h acos2.h acwin.h acwin64.h src/sys/external/intel-public/acpica/dist/namespace: nsaccess.c nsalloc.c nsdump.c nsdumpdv.c nseval.c nsinit.c nsload.c nsnames.c nsobject.c nsparse.c nspredef.c nsrepair.c nsrepair2.c nssearch.c nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c src/sys/external/intel-public/acpica/dist/os_specific/service_layers: osunixdir.c osunixxf.c oswindir.c oswintbl.c oswinxf.c src/sys/external/intel-public/acpica/dist/parser: psargs.c psloop.c psopcode.c psparse.c psscope.c pstree.c psutils.c pswalk.c psxface.c src/sys/external/intel-public/acpica/dist/resources: rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c rsio.c rsirq.c rslist.c rsmemory.c rsmisc.c rsutils.c rsxface.c src/sys/external/intel-public/acpica/dist/tables: tbfadt.c tbfind.c tbinstal.c tbutils.c tbxface.c tbxfroot.c src/sys/external/intel-public/acpica/dist/tests/misc: badcode.asl grammar.asl src/sys/external/intel-public/acpica/dist/tools/acpiexec: Makefile aecommon.h aeexec.c aehandlers.c aemain.c aetables.c osunixdir.c src/sys/external/intel-public/acpica/dist/tools/acpisrc: Makefile acpisrc.h ascase.c asconvrt.c asfile.c asmain.c asremove.c astable.c asutils.c osunixdir.c src/sys/external/intel-public/acpica/dist/tools/acpixtract: Makefile acpixtract.c src/sys/external/intel-public/acpica/dist/tools/examples: examples.c src/sys/external/intel-public/acpica/dist/utilities: utalloc.c utcache.c utclib.c utcopy.c utdebug.c utdelete.c uteval.c utglobal.c utids.c utinit.c utlock.c
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Thu Feb 17 08:41:35 UTC 2011 Modified Files: src/distrib/sets: metalog.subr Log Message: RCSMETALOG: symbolically tag the latest and previous versions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/metalog.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/metalog.subr diff -u src/distrib/sets/metalog.subr:1.1 src/distrib/sets/metalog.subr:1.2 --- src/distrib/sets/metalog.subr:1.1 Wed Feb 16 05:18:35 2011 +++ src/distrib/sets/metalog.subr Thu Feb 17 08:41:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: metalog.subr,v 1.1 2011/02/16 05:18:35 uebayasi Exp $ +# $NetBSD: metalog.subr,v 1.2 2011/02/17 08:41:35 uebayasi Exp $ # # xrcs add @@ -14,6 +14,20 @@ xrcs_cur= xrcs_new= +xrcs_latest() +{ + rcslog -rlatest ${xrcs_cur} | \ + sed -n '/^revision/ { s/^revision //; p; }' +} + +xrcs_retag() +{ + previous=$( xrcs_latest 2/dev/null ) + if [ -n $previous ]; then + rcs -q -Nprevious: ${xrcs_cur} + fi +} + xrcs_unlock() { rcs -q -u -U -M ${xrcs_cur} @@ -21,7 +35,8 @@ xrcs_ci() { - ci -q -f -u -t-$xrcs_descr -m$xrcs_msg ${xrcs_cur} + xrcs_retag + ci -q -f -u -t-$xrcs_descr -m$xrcs_msg -Nlatest ${xrcs_cur} rcs -q -kb -U ${xrcs_cur} }
CVS commit: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:01:50 UTC 2011 Update of /cvsroot/src/sys/external/bsd/acpica/dist In directory ivanova.netbsd.org:/tmp/cvs-serv1392 Log Message: Import 20110211. Status: Vendor Tag: intel Release Tags: acpica-20110211 U src/sys/external/bsd/acpica/dist/changes.txt U src/sys/external/bsd/acpica/dist/osunixxf.c U src/sys/external/bsd/acpica/dist/README U src/sys/external/bsd/acpica/dist/common/adisasm.c U src/sys/external/bsd/acpica/dist/common/adfile.c U src/sys/external/bsd/acpica/dist/common/dmextern.c U src/sys/external/bsd/acpica/dist/common/adwalk.c U src/sys/external/bsd/acpica/dist/common/dmrestag.c U src/sys/external/bsd/acpica/dist/common/dmtable.c U src/sys/external/bsd/acpica/dist/common/dmtbdump.c C src/sys/external/bsd/acpica/dist/common/dmtbinfo.c U src/sys/external/bsd/acpica/dist/common/getopt.c U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.h U src/sys/external/bsd/acpica/dist/compiler/aslanalyze.c N src/sys/external/bsd/acpica/dist/compiler/aslbtypes.c U src/sys/external/bsd/acpica/dist/compiler/aslcodegen.c C src/sys/external/bsd/acpica/dist/compiler/aslcompile.c U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.l U src/sys/external/bsd/acpica/dist/compiler/aslcompiler.y U src/sys/external/bsd/acpica/dist/compiler/asldefine.h U src/sys/external/bsd/acpica/dist/compiler/aslerror.c U src/sys/external/bsd/acpica/dist/compiler/aslfiles.c U src/sys/external/bsd/acpica/dist/compiler/aslfold.c U src/sys/external/bsd/acpica/dist/compiler/aslglobal.h U src/sys/external/bsd/acpica/dist/compiler/asllength.c U src/sys/external/bsd/acpica/dist/compiler/asllisting.c U src/sys/external/bsd/acpica/dist/compiler/aslload.c U src/sys/external/bsd/acpica/dist/compiler/asllookup.c U src/sys/external/bsd/acpica/dist/compiler/aslmain.c U src/sys/external/bsd/acpica/dist/compiler/aslmap.c N src/sys/external/bsd/acpica/dist/compiler/aslmessages.h U src/sys/external/bsd/acpica/dist/compiler/aslopcodes.c U src/sys/external/bsd/acpica/dist/compiler/dtio.c U src/sys/external/bsd/acpica/dist/compiler/asloperands.c U src/sys/external/bsd/acpica/dist/compiler/aslopt.c U src/sys/external/bsd/acpica/dist/compiler/aslpredef.c U src/sys/external/bsd/acpica/dist/compiler/aslresource.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype1.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype2.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c U src/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c U src/sys/external/bsd/acpica/dist/compiler/aslstartup.c U src/sys/external/bsd/acpica/dist/compiler/aslstubs.c U src/sys/external/bsd/acpica/dist/compiler/asltransform.c U src/sys/external/bsd/acpica/dist/compiler/asltree.c U src/sys/external/bsd/acpica/dist/compiler/asltypes.h C src/sys/external/bsd/acpica/dist/compiler/aslutils.c N src/sys/external/bsd/acpica/dist/compiler/asluuid.c N src/sys/external/bsd/acpica/dist/compiler/aslwalks.c U src/sys/external/bsd/acpica/dist/compiler/dtcompile.c U src/sys/external/bsd/acpica/dist/compiler/dtcompiler.h N src/sys/external/bsd/acpica/dist/compiler/dtexpress.c U src/sys/external/bsd/acpica/dist/compiler/dtfield.c U src/sys/external/bsd/acpica/dist/compiler/dtsubtable.c U src/sys/external/bsd/acpica/dist/compiler/dttable.c N src/sys/external/bsd/acpica/dist/compiler/dttemplate.c N src/sys/external/bsd/acpica/dist/compiler/dttemplate.h U src/sys/external/bsd/acpica/dist/compiler/dtutils.c U src/sys/external/bsd/acpica/dist/compiler/Makefile U src/sys/external/bsd/acpica/dist/compiler/readme.txt C src/sys/external/bsd/acpica/dist/debugger/dbdisply.c C src/sys/external/bsd/acpica/dist/debugger/dbcmds.c U src/sys/external/bsd/acpica/dist/debugger/dbfileio.c C src/sys/external/bsd/acpica/dist/debugger/dbexec.c U src/sys/external/bsd/acpica/dist/debugger/dbhistry.c C src/sys/external/bsd/acpica/dist/debugger/dbinput.c N src/sys/external/bsd/acpica/dist/debugger/dbmethod.c N src/sys/external/bsd/acpica/dist/debugger/dbnames.c U src/sys/external/bsd/acpica/dist/debugger/dbstats.c C src/sys/external/bsd/acpica/dist/debugger/dbutils.c U src/sys/external/bsd/acpica/dist/debugger/dbxface.c U src/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c U src/sys/external/bsd/acpica/dist/disassembler/dmnames.c U src/sys/external/bsd/acpica/dist/disassembler/dmobject.c U src/sys/external/bsd/acpica/dist/disassembler/dmopcode.c C src/sys/external/bsd/acpica/dist/disassembler/dmresrc.c C src/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c U src/sys/external/bsd/acpica/dist/disassembler/dmresrcs.c U src/sys/external/bsd/acpica/dist/disassembler/dmutils.c U src/sys/external/bsd/acpica/dist/disassembler/dmwalk.c N src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c N
CVS commit: src/sys/external/bsd/acpica/conf
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:13:36 UTC 2011 Modified Files: src/sys/external/bsd/acpica/conf: files.acpica Log Message: Update for ACPICA 20110211. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/acpica/conf/files.acpica Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/acpica/conf/files.acpica diff -u src/sys/external/bsd/acpica/conf/files.acpica:1.1 src/sys/external/bsd/acpica/conf/files.acpica:1.2 --- src/sys/external/bsd/acpica/conf/files.acpica:1.1 Thu Feb 17 07:27:17 2011 +++ src/sys/external/bsd/acpica/conf/files.acpica Thu Feb 17 10:13:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.acpica,v 1.1 2011/02/17 07:27:17 jruoho Exp $ +# $NetBSD: files.acpica,v 1.2 2011/02/17 10:13:35 jruoho Exp $ define acpica makeoptions acpi CPPFLAGS+=-I$S/external/bsd/acpica/dist/include @@ -26,6 +26,8 @@ file external/bsd/acpica/dist/disassembler/dmwalk.c acpica acpi_debug ddb # dispatcher/ +file external/bsd/acpica/dist/dispatcher/dsargs.c acpica +file external/bsd/acpica/dist/dispatcher/dscontrol.c acpica file external/bsd/acpica/dist/dispatcher/dsfield.c acpica file external/bsd/acpica/dist/dispatcher/dsinit.c acpica file external/bsd/acpica/dist/dispatcher/dsmethod.c acpica @@ -35,6 +37,7 @@ file external/bsd/acpica/dist/dispatcher/dsutils.c acpica file external/bsd/acpica/dist/dispatcher/dswexec.c acpica file external/bsd/acpica/dist/dispatcher/dswload.c acpica +file external/bsd/acpica/dist/dispatcher/dswload2.c acpica file external/bsd/acpica/dist/dispatcher/dswscope.c acpica file external/bsd/acpica/dist/dispatcher/dswstate.c acpica @@ -50,6 +53,7 @@ file external/bsd/acpica/dist/events/evsci.c acpica file external/bsd/acpica/dist/events/evxface.c acpica file external/bsd/acpica/dist/events/evxfevnt.c acpica +file external/bsd/acpica/dist/events/evxfgpe.c acpica file external/bsd/acpica/dist/events/evxfregn.c acpica # executer/ @@ -81,6 +85,7 @@ # hardware/ file external/bsd/acpica/dist/hardware/hwacpi.c acpica file external/bsd/acpica/dist/hardware/hwgpe.c acpica +file external/bsd/acpica/dist/hardware/hwpci.c acpica file external/bsd/acpica/dist/hardware/hwregs.c acpica file external/bsd/acpica/dist/hardware/hwsleep.c acpica file external/bsd/acpica/dist/hardware/hwtimer.c acpica @@ -146,17 +151,20 @@ file external/bsd/acpica/dist/utilities/utcache.c acpica file external/bsd/acpica/dist/utilities/utcopy.c acpica file external/bsd/acpica/dist/utilities/utdebug.c acpica +file external/bsd/acpica/dist/utilities/utdecode.c acpica file external/bsd/acpica/dist/utilities/utdelete.c acpica file external/bsd/acpica/dist/utilities/uteval.c acpica file external/bsd/acpica/dist/utilities/utglobal.c acpica -file external/bsd/acpica/dist/utilities/utinit.c acpica file external/bsd/acpica/dist/utilities/utids.c acpica +file external/bsd/acpica/dist/utilities/utinit.c acpica file external/bsd/acpica/dist/utilities/utlock.c acpica file external/bsd/acpica/dist/utilities/utmath.c acpica file external/bsd/acpica/dist/utilities/utmisc.c acpica file external/bsd/acpica/dist/utilities/utmutex.c acpica file external/bsd/acpica/dist/utilities/utobject.c acpica +file external/bsd/acpica/dist/utilities/utosi.c acpica file external/bsd/acpica/dist/utilities/utresrc.c acpica file external/bsd/acpica/dist/utilities/utstate.c acpica file external/bsd/acpica/dist/utilities/uttrack.c acpica file external/bsd/acpica/dist/utilities/utxface.c acpica +file external/bsd/acpica/dist/utilities/utxferror.c acpica
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: jmcneill Date: Thu Feb 17 10:18:05 UTC 2011 Modified Files: src/usr.sbin/acpitools/acpidump: acpi.c acpidump.c acpidump.h Log Message: - when dumping table bytes, make sure to dump our header and not the next one - also dump tables with bad checksums, unless the -s flag is specified To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/acpitools/acpidump/acpi.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/acpitools/acpidump/acpidump.c \ src/usr.sbin/acpitools/acpidump/acpidump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpi.c diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.7 src/usr.sbin/acpitools/acpidump/acpi.c:1.8 --- src/usr.sbin/acpitools/acpidump/acpi.c:1.7 Thu Feb 17 02:55:16 2011 +++ src/usr.sbin/acpitools/acpidump/acpi.c Thu Feb 17 10:18:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.7 2011/02/17 02:55:16 jmcneill Exp $ */ +/* $NetBSD: acpi.c,v 1.8 2011/02/17 10:18:05 jmcneill Exp $ */ /*- * Copyright (c) 1998 Doug Rabson @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: acpi.c,v 1.7 2011/02/17 02:55:16 jmcneill Exp $); +__RCSID($NetBSD: acpi.c,v 1.8 2011/02/17 10:18:05 jmcneill Exp $); #include sys/param.h #include sys/endian.h @@ -1884,9 +1884,11 @@ { printf( ); acpi_print_string(sdp-Signature, ACPI_NAME_SIZE); - printf(: Length=%d, Revision=%d, Checksum=%d,\n, + printf(: Length=%d, Revision=%d, Checksum=%d, sdp-Length, sdp-Revision, sdp-Checksum); - printf(\tOEMID=); + if (acpi_checksum(sdp, sdp-Length)) + printf( (Incorrect)); + printf(,\n\tOEMID=); acpi_print_string(sdp-OemId, ACPI_OEM_ID_SIZE); printf(, OEM Table ID=); acpi_print_string(sdp-OemTableId, ACPI_OEM_TABLE_ID_SIZE); @@ -1902,7 +1904,7 @@ unsigned int i; uint8_t *p; - p = (uint8_t *)sdp + sizeof(*sdp); + p = (uint8_t *)sdp; printf(\n\tData={); for (i = 0; i sdp-Length; i++) { if (cflag) { @@ -2221,7 +2223,8 @@ if (acpi_checksum(sdp, sdp-Length)) { warnx(RSDT entry %d (sig %.4s) is corrupt, i, sdp-Signature); - continue; + if (sflag) +continue; } if (!memcmp(sdp-Signature, ACPI_SIG_FADT, 4)) acpi_handle_fadt(sdp); Index: src/usr.sbin/acpitools/acpidump/acpidump.c diff -u src/usr.sbin/acpitools/acpidump/acpidump.c:1.3 src/usr.sbin/acpitools/acpidump/acpidump.c:1.4 --- src/usr.sbin/acpitools/acpidump/acpidump.c:1.3 Thu Feb 17 02:55:16 2011 +++ src/usr.sbin/acpitools/acpidump/acpidump.c Thu Feb 17 10:18:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpidump.c,v 1.3 2011/02/17 02:55:16 jmcneill Exp $ */ +/* $NetBSD: acpidump.c,v 1.4 2011/02/17 10:18:05 jmcneill Exp $ */ /*- * Copyright (c) 2000 Mitsuru IWASAKI iwas...@freebsd.org @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: acpidump.c,v 1.3 2011/02/17 02:55:16 jmcneill Exp $); +__RCSID($NetBSD: acpidump.c,v 1.4 2011/02/17 10:18:05 jmcneill Exp $); #include sys/param.h @@ -42,18 +42,19 @@ #include acpidump.h +int cflag; /* Dump unknown table data as characters */ int dflag; /* Disassemble AML using iasl(8) */ +int sflag; /* Skip tables with bad checksums */ int tflag; /* Dump contents of SDT tables */ int vflag; /* Use verbose messages */ -int cflag; /* Dump unknown table data as characters */ static void usage(void) { const char *progname = getprogname(); - fprintf(stderr, usage: %s [-c] [-d] [-t] [-h] [-v] [-f dsdt_input] - [-o dsdt_output]\n, progname); + fprintf(stderr, usage: %s [-c] [-d] [-s] [-t] [-h] [-v] + [-f dsdt_input] [-o dsdt_output]\n, progname); fprintf(stderr, To send ASL:\n\t%s -dt | gzip -c9 foo.asl.gz\n, progname); exit(EXIT_FAILURE); @@ -79,6 +80,9 @@ case 'd': dflag = 1; break; + case 's': + sflag = 1; + break; case 't': tflag = 1; break; Index: src/usr.sbin/acpitools/acpidump/acpidump.h diff -u src/usr.sbin/acpitools/acpidump/acpidump.h:1.3 src/usr.sbin/acpitools/acpidump/acpidump.h:1.4 --- src/usr.sbin/acpitools/acpidump/acpidump.h:1.3 Thu Feb 17 02:55:16 2011 +++ src/usr.sbin/acpitools/acpidump/acpidump.h Thu Feb 17 10:18:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpidump.h,v 1.3 2011/02/17 02:55:16 jmcneill Exp $ */ +/* $NetBSD: acpidump.h,v 1.4 2011/02/17 10:18:05 jmcneill Exp $ */ /*- * Copyright (c) 1999 Doug Rabson @@ -83,6 +83,7 @@ /* Command line flags */ extern int cflag; extern int dflag; +extern int sflag; extern int tflag; extern int vflag;
CVS commit: src/sys/dev/acpi/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:20:32 UTC 2011 Modified Files: src/sys/dev/acpi/acpica: OsdHardware.c Log Message: ACPICA 20100915: Removed the AcpiOsDerivePciId OSL interface. The various host implementations of this function were not OS-dependent and are now obsolete and can be removed from all host OSLs. This function has been replaced by AcpiHwDerivePciId, which is now part of the ACPICA core code. AcpiHwDerivePciId has been implemented without recursion. Adds one new module, hwpci.c. ACPICA BZ 857. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/acpica/OsdHardware.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpica/OsdHardware.c diff -u src/sys/dev/acpi/acpica/OsdHardware.c:1.6 src/sys/dev/acpi/acpica/OsdHardware.c:1.7 --- src/sys/dev/acpi/acpica/OsdHardware.c:1.6 Sat Jul 10 21:31:00 2010 +++ src/sys/dev/acpi/acpica/OsdHardware.c Thu Feb 17 10:20:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdHardware.c,v 1.6 2010/07/10 21:31:00 gsutre Exp $ */ +/* $NetBSD: OsdHardware.c,v 1.7 2011/02/17 10:20:32 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: OsdHardware.c,v 1.6 2010/07/10 21:31:00 gsutre Exp $); +__KERNEL_RCSID(0, $NetBSD: OsdHardware.c,v 1.7 2011/02/17 10:20:32 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -276,117 +276,3 @@ return AE_OK; } - -/* - * acpi_os_derive_pciid_rec: - * - * Helper function for AcpiOsDerivePciId. The parameters are: - * - chandle: a handle to the node whose PCI id shall be derived. - * - rhandle: a handle the PCI root bridge upstream of chandle. - * - pciid: where the derived PCI id is returned. - * - * This function assumes that rhandle is a proper ancestor of chandle, - * and that pciid has already been filled by ACPICA: - * - segment# and bus# obtained from _SEG and _BBN on rhandle, - * - device# and function# obtained from _ADR on the ACPI device node - * whose scope chandle is in). - */ -static ACPI_STATUS -acpi_os_derive_pciid_rec(ACPI_HANDLE chandle, ACPI_HANDLE rhandle, ACPI_PCI_ID *pciid) -{ - ACPI_HANDLE phandle; - ACPI_INTEGER address; - ACPI_OBJECT_TYPE objtype; - ACPI_STATUS rv; - uint16_t valb; - - KASSERT(chandle != rhandle); - - /* - * Get parent device node. This is should not fail since chandle has - * at least one ancestor that is a device node: rhandle. - */ - phandle = chandle; - do { - rv = AcpiGetParent(phandle, phandle); - if (ACPI_FAILURE(rv)) - return rv; - rv = AcpiGetType(phandle, objtype); - if (ACPI_FAILURE(rv)) - return rv; - } - while (objtype != ACPI_TYPE_DEVICE); - - /* - * If the parent is rhandle then we have nothing to do since ACPICA - * has pre-filled the PCI id to the best it could. - */ - if (phandle == rhandle) - return AE_OK; - - /* Recursive call to get PCI id of the parent */ - rv = acpi_os_derive_pciid_rec(phandle, rhandle, pciid); - if (ACPI_FAILURE(rv)) - return rv; - - /* - * If this is not an ACPI device, return the PCI id of its parent. - */ - rv = AcpiGetType(chandle, objtype); - if (ACPI_FAILURE(rv)) - return rv; - if (objtype != ACPI_TYPE_DEVICE) - return AE_OK; - - /* - * This is an ACPI device node. Its parent device node is not a PCI - * root bridge. Check that it is a PCI-to-PCI bridge and get its - * secondary bus#. - */ - rv = acpi_pcidev_ppb_downbus(pciid-Segment, pciid-Bus, pciid-Device, - pciid-Function, valb); - if (ACPI_FAILURE(rv)) - return rv; - - /* Get address (contains dev# and fun# for PCI devices). */ - rv = acpi_eval_integer(chandle, METHOD_NAME__ADR, address); - if (ACPI_FAILURE(rv)) - return rv; - - pciid-Bus = valb; - pciid-Device = ACPI_HIWORD(ACPI_LODWORD(address)); - pciid-Function = ACPI_LOWORD(ACPI_LODWORD(address)); - return AE_OK; -} - -/* - * AcpiOsDerivePciId: - * - * Derive correct PCI bus# by traversing bridges. - * - * In ACPICA release 20100331 (as well as older versions), the interface - * of this function is not correctly documented in the ACPICA programmer - * reference. The correct interface parameters to this function are: - * - rhandle: a handle the PCI root bridge upstream of handle. - * - chandle: a handle to the PCI_Config operation region. - * - PciId: where the derived PCI id is returned. - */ -void -AcpiOsDerivePciId( -ACPI_HANDLErhandle, -ACPI_HANDLEchandle, -ACPI_PCI_ID**PciId) -{ - ACPI_PCI_ID pciid; - ACPI_STATUS rv; - - if (chandle == rhandle) - return; - - pciid = **PciId; - rv = acpi_os_derive_pciid_rec(chandle, rhandle, pciid); - if (ACPI_FAILURE(rv)) - return; - - (*PciId)-Bus = pciid.Bus; -}
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: jmcneill Date: Thu Feb 17 10:21:02 UTC 2011 Modified Files: src/usr.sbin/acpitools/acpidump: acpidump.8 Log Message: document -c and -s flags To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/acpitools/acpidump/acpidump.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpidump.8 diff -u src/usr.sbin/acpitools/acpidump/acpidump.8:1.3 src/usr.sbin/acpitools/acpidump/acpidump.8:1.4 --- src/usr.sbin/acpitools/acpidump/acpidump.8:1.3 Tue Dec 22 08:44:03 2009 +++ src/usr.sbin/acpitools/acpidump/acpidump.8 Thu Feb 17 10:21:02 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: acpidump.8,v 1.3 2009/12/22 08:44:03 cegger Exp $ +.\ $NetBSD: acpidump.8,v 1.4 2011/02/17 10:21:02 jmcneill Exp $ .\ ACPI (ACPI Package) .\ .\ Copyright (c) 1999 Doug Rabson d...@freebsd.org @@ -30,7 +30,7 @@ .\ .\ $FreeBSD: src/usr.sbin/acpi/acpidump/acpidump.8,v 1.24 2007/03/14 22:55:30 njl Exp $ .\ -.Dd February 14, 2005 +.Dd February 17, 2011 .Dt ACPIDUMP 8 .Os .Sh NAME @@ -38,7 +38,9 @@ .Nd dump ACPI tables and ASL .Sh SYNOPSIS .Nm +.Op Fl c .Op Fl d +.Op Fl s .Op Fl t .Op Fl h .Op Fl v @@ -140,10 +142,14 @@ The following options are supported by .Nm : .Bl -tag -width indent +.It Fl c +Dump unknown table data as characters instead of hex. .It Fl d Disassemble the DSDT into ASL using .Xr iasl 8 and print the results to stdout. +.It Fl s +Skip tables with bad checksums. .It Fl t Dump the contents of the various fixed tables listed above. .It Fl h
CVS commit: src/sys/dev/acpi/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:21:43 UTC 2011 Modified Files: src/sys/dev/acpi/acpica: OsdMemory.c Log Message: ACPICA 20100806: Obsolete Functions: AcpiOsValidateInterface - no longer used. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpica/OsdMemory.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpica/OsdMemory.c diff -u src/sys/dev/acpi/acpica/OsdMemory.c:1.3 src/sys/dev/acpi/acpica/OsdMemory.c:1.4 --- src/sys/dev/acpi/acpica/OsdMemory.c:1.3 Tue Aug 18 16:41:02 2009 +++ src/sys/dev/acpi/acpica/OsdMemory.c Thu Feb 17 10:21:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdMemory.c,v 1.3 2009/08/18 16:41:02 jmcneill Exp $ */ +/* $NetBSD: OsdMemory.c,v 1.4 2011/02/17 10:21:43 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: OsdMemory.c,v 1.3 2009/08/18 16:41:02 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: OsdMemory.c,v 1.4 2011/02/17 10:21:43 jruoho Exp $); #include sys/param.h #include sys/malloc.h @@ -143,10 +143,3 @@ return acpi_md_OsWritable(Pointer, Length); } - -ACPI_STATUS -AcpiOsValidateInterface(char *Interface) -{ - - return AE_SUPPORT; -}
CVS commit: src/sys/dev/acpi/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:23:44 UTC 2011 Modified Files: src/sys/dev/acpi/acpica: OsdHardware.c Log Message: ACPICA 20100806: Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The prototype in acpiosxf.h had the output value pointer as a (void *). It should be a (UINT64 *). This may affect some host OSL code. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/acpica/OsdHardware.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpica/OsdHardware.c diff -u src/sys/dev/acpi/acpica/OsdHardware.c:1.7 src/sys/dev/acpi/acpica/OsdHardware.c:1.8 --- src/sys/dev/acpi/acpica/OsdHardware.c:1.7 Thu Feb 17 10:20:32 2011 +++ src/sys/dev/acpi/acpica/OsdHardware.c Thu Feb 17 10:23:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdHardware.c,v 1.7 2011/02/17 10:20:32 jruoho Exp $ */ +/* $NetBSD: OsdHardware.c,v 1.8 2011/02/17 10:23:43 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -44,7 +44,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: OsdHardware.c,v 1.7 2011/02/17 10:20:32 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: OsdHardware.c,v 1.8 2011/02/17 10:23:43 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -199,7 +199,7 @@ * Read a value from a PCI configuration register. */ ACPI_STATUS -AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, +AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, UINT64 *Value, UINT32 Width) { pcitag_t tag;
CVS commit: src/sys/dev/acpi/acpica
Module Name:src Committed By: jmcneill Date: Thu Feb 17 10:35:51 UTC 2011 Modified Files: src/sys/dev/acpi/acpica: OsdSchedule.c Log Message: cast curlwp to uintptr_t before casting to ACPI_THREAD_ID, fixes i386 build To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/acpi/acpica/OsdSchedule.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpica/OsdSchedule.c diff -u src/sys/dev/acpi/acpica/OsdSchedule.c:1.15 src/sys/dev/acpi/acpica/OsdSchedule.c:1.16 --- src/sys/dev/acpi/acpica/OsdSchedule.c:1.15 Sat Jun 5 16:57:48 2010 +++ src/sys/dev/acpi/acpica/OsdSchedule.c Thu Feb 17 10:35:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdSchedule.c,v 1.15 2010/06/05 16:57:48 jruoho Exp $ */ +/* $NetBSD: OsdSchedule.c,v 1.16 2011/02/17 10:35:50 jmcneill Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: OsdSchedule.c,v 1.15 2010/06/05 16:57:48 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: OsdSchedule.c,v 1.16 2011/02/17 10:35:50 jmcneill Exp $); #include sys/param.h #include sys/malloc.h @@ -87,7 +87,7 @@ ACPI_THREAD_ID AcpiOsGetThreadId(void) { - return (ACPI_THREAD_ID)curlwp; + return (ACPI_THREAD_ID)(uintptr_t)curlwp; } /*
CVS commit: [bouyer-quota2] src/sys/ufs/ffs
Module Name:src Committed By: bouyer Date: Thu Feb 17 10:37:56 UTC 2011 Modified Files: src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c Log Message: Do not adjust quota when a snapshot inode is cleared in a snapshot view. To generate a diff of this commit: cvs rdiff -u -r1.102.4.2 -r1.102.4.3 src/sys/ufs/ffs/ffs_snapshot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.2 src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.3 --- src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.2 Sat Feb 12 21:48:09 2011 +++ src/sys/ufs/ffs/ffs_snapshot.c Thu Feb 17 10:37:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $ */ +/* $NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $ */ /* * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.2 2011/02/12 21:48:09 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.3 2011/02/17 10:37:55 bouyer Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -214,7 +214,7 @@ error = snapshot_setup(mp, vp); if (error) goto out; - /* quota inodes are not accounted in quotas */ + /* shapshot inodes are not accounted in quotas */ #if defined(QUOTA) || defined(QUOTA2) chkdq(ip, -DIP(ip, blocks), l-l_cred, 0); chkiq(ip, -1, l-l_cred, 0); @@ -1036,10 +1036,6 @@ ufs_rw32(ufs_rw32(dip1-di_flags, ns) ~SF_SNAPSHOT, ns); memset(dip1-di_db[0], 0, (NDADDR + NIADDR) * sizeof(int32_t)); /* quota inodes are not accounted in quotas */ -#if defined(QUOTA) || defined(QUOTA2) - if (dip1-di_mode != 0) - chkiq(cancelip, 1, l-l_cred, FORCE); -#endif } else { dip2 = (struct ufs2_dinode *)bp-b_data + ino_to_fsbo(fs, cancelip-i_number); @@ -1050,10 +1046,6 @@ dip2-di_flags = ufs_rw32(ufs_rw32(dip2-di_flags, ns) ~SF_SNAPSHOT, ns); memset(dip2-di_db[0], 0, (NDADDR + NIADDR) * sizeof(int64_t)); -#if defined(QUOTA) || defined(QUOTA2) - if (dip2-di_mode != 0) - chkiq(cancelip, 1, l-l_cred, FORCE); -#endif } bdwrite(bp); /*
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:49:30 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_ec.c acpi_wakedev.c Log Message: ACPICA 20101209: Completed the major overhaul of the GPE support code that was begun in July 2010. Major features include: removal of _PRW execution in ACPICA (host executes _PRWs anyway), cleanup of wake GPE interfaces and processing, changes to existing interfaces, simplification of GPE handler operation, and a handful of new interfaces: AcpiUpdateAllGpes AcpiFinishGpe AcpiSetupGpeForWake AcpiSetGpeWakeMask ACPICA 20100331: Completed a major update for the GPE support in order to improve support for shared GPEs and to simplify both host OS and ACPICA code. Added a reference count mechanism to support shared GPEs that require multiple device drivers. Several external interfaces have changed. One external interface has been removed. One new external interface was added. Most of the GPE external interfaces now use the GPE spinlock instead of the events mutex (and the Flags parameter for many GPE interfaces has been removed.) See the updated ACPICA Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael Wysocki. ACPICA BZ 831. Changed: AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus Removed: AcpiSetGpeType New: AcpiSetGpe ACPICA 20100702: Implemented several updates to the recently added GPE reference count support. The model for wake GPEs is changing to give the host OS complete control of these GPEs. Eventually, the ACPICA core will not execute any _PRW methods, since the host already must execute them. Also, additional changes were made to help ensure that the reference counts are kept in proper synchronization with reality. Rafael J. Wysocki. 1) Ensure that GPEs are not enabled twice during initialization. 2) Ensure that GPE enable masks stay in sync with the reference count. 3) Do not inadvertently enable GPEs when writing GPE registers. 4) Remove the internal wake reference counter and add new AcpiGpeWakeup interface. This interface will set or clear individual GPEs for wakeup. 5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces are now used for runtime GPEs only. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/acpi/acpi_ec.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/acpi/acpi_wakedev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_ec.c diff -u src/sys/dev/acpi/acpi_ec.c:1.68 src/sys/dev/acpi/acpi_ec.c:1.69 --- src/sys/dev/acpi/acpi_ec.c:1.68 Fri Jan 7 14:08:29 2011 +++ src/sys/dev/acpi/acpi_ec.c Thu Feb 17 10:49:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $ */ +/* $NetBSD: acpi_ec.c,v 1.69 2011/02/17 10:49:29 jruoho Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger jo...@netbsd.org. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.69 2011/02/17 10:49:29 jruoho Exp $); #include sys/param.h #include sys/callout.h @@ -161,7 +161,7 @@ static void acpiec_callout(void *); static void acpiec_gpe_query(void *); -static uint32_t acpiec_gpe_handler(void *); +static uint32_t acpiec_gpe_handler(ACPI_HANDLE, uint32_t, void *); static ACPI_STATUS acpiec_space_setup(ACPI_HANDLE, uint32_t, void *, void **); static ACPI_STATUS acpiec_space_handler(uint32_t, ACPI_PHYSICAL_ADDRESS, uint32_t, ACPI_INTEGER *, void *, void *); @@ -366,7 +366,7 @@ goto post_csr_map; } - rv = AcpiEnableGpe(sc-sc_gpeh, sc-sc_gpebit, ACPI_GPE_TYPE_RUNTIME); + rv = AcpiEnableGpe(sc-sc_gpeh, sc-sc_gpebit); if (rv != AE_OK) { aprint_error_dev(self, unable to enable GPE: %s\n, AcpiFormatException(rv)); @@ -844,7 +844,7 @@ } static uint32_t -acpiec_gpe_handler(void *arg) +acpiec_gpe_handler(ACPI_HANDLE hdl, uint32_t gpebit, void *arg) { device_t dv = arg; struct acpiec_softc *sc = device_private(dv); Index: src/sys/dev/acpi/acpi_wakedev.c diff -u src/sys/dev/acpi/acpi_wakedev.c:1.20 src/sys/dev/acpi/acpi_wakedev.c:1.21 --- src/sys/dev/acpi/acpi_wakedev.c:1.20 Sun Jan 2 12:06:02 2011 +++ src/sys/dev/acpi/acpi_wakedev.c Thu Feb 17 10:49:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakedev.c,v 1.20 2011/01/02 12:06:02 jruoho Exp $ */ +/* $NetBSD: acpi_wakedev.c,v 1.21 2011/02/17 10:49:29 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.20 2011/01/02 12:06:02 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.21 2011/02/17 10:49:29 jruoho Exp $); #include sys/param.h #include sys/device.h @@ -287,12 +287,17 @@ acpi_wakedev_power(ad, obj); /* - * Set both runtime and wake GPEs, but unset only wake
CVS commit: src/sys/external/bsd/acpica/dist/dispatcher
Module Name:src Committed By: jruoho Date: Thu Feb 17 10:59:31 UTC 2011 Modified Files: src/sys/external/bsd/acpica/dist/dispatcher: dscontrol.c Log Message: __UNCONST(3). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c diff -u src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c:1.1.1.1 src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c:1.2 --- src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c:1.1.1.1 Thu Feb 17 10:01:08 2011 +++ src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c Thu Feb 17 10:59:31 2011 @@ -370,7 +370,7 @@ /* Call to the OSL in case OS wants a piece of the action */ Status = AcpiOsSignal (ACPI_SIGNAL_BREAKPOINT, -Executed AML Breakpoint opcode); + __UNCONST(Executed AML Breakpoint opcode)); break;
CVS commit: src/sys/external/bsd/acpica/dist
Module Name:src Committed By: jruoho Date: Thu Feb 17 11:21:40 UTC 2011 Modified Files: src/sys/external/bsd/acpica/dist/include: acutils.h src/sys/external/bsd/acpica/dist/utilities: utdecode.c utosi.c Log Message: Sigh. Why some people are unable to write proper C? To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/include/acutils.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/sys/external/bsd/acpica/dist/utilities/utdecode.c \ src/sys/external/bsd/acpica/dist/utilities/utosi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/acpica/dist/include/acutils.h diff -u src/sys/external/bsd/acpica/dist/include/acutils.h:1.3 src/sys/external/bsd/acpica/dist/include/acutils.h:1.4 --- src/sys/external/bsd/acpica/dist/include/acutils.h:1.3 Thu Feb 17 10:09:41 2011 +++ src/sys/external/bsd/acpica/dist/include/acutils.h Thu Feb 17 11:21:40 2011 @@ -133,11 +133,11 @@ #endif -char * +const char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPEType); -char * +const char * AcpiUtGetNodeName ( void*Object); @@ -149,15 +149,15 @@ AcpiUtGetReferenceName ( ACPI_OPERAND_OBJECT *Object); -char * +const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc); -char * +const char * AcpiUtGetRegionName ( UINT8 SpaceId); -char * +const char * AcpiUtGetEventName ( UINT32 EventId); Index: src/sys/external/bsd/acpica/dist/utilities/utdecode.c diff -u src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.1.1.1 src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.2 --- src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.1.1.1 Thu Feb 17 10:01:40 2011 +++ src/sys/external/bsd/acpica/dist/utilities/utdecode.c Thu Feb 17 11:21:40 2011 @@ -192,7 +192,7 @@ }; -char * +const char * AcpiUtGetRegionName ( UINT8 SpaceId) { @@ -238,7 +238,7 @@ }; -char * +const char * AcpiUtGetEventName ( UINT32 EventId) { @@ -312,7 +312,7 @@ }; -char * +const char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPEType) { @@ -326,7 +326,7 @@ } -char * +const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc) { @@ -352,7 +352,7 @@ * **/ -char * +const char * AcpiUtGetNodeName ( void*Object) { @@ -428,7 +428,7 @@ }; -char * +const char * AcpiUtGetDescriptorName ( void*Object) { @@ -534,7 +534,7 @@ ACPI_MTX_CommandReady }; -char * +const char * AcpiUtGetMutexName ( UINT32 MutexId) { Index: src/sys/external/bsd/acpica/dist/utilities/utosi.c diff -u src/sys/external/bsd/acpica/dist/utilities/utosi.c:1.1.1.1 src/sys/external/bsd/acpica/dist/utilities/utosi.c:1.2 --- src/sys/external/bsd/acpica/dist/utilities/utosi.c:1.1.1.1 Thu Feb 17 10:01:41 2011 +++ src/sys/external/bsd/acpica/dist/utilities/utosi.c Thu Feb 17 11:21:40 2011 @@ -64,23 +64,23 @@ */ static ACPI_INTERFACE_INFOAcpiDefaultSupportedInterfaces[] = { -/* Operating System Vendor Strings */ + /* Operating System Vendor Strings */ -{Windows 2000,NULL, 0, ACPI_OSI_WIN_2000}, /* Windows 2000 */ -{Windows 2001,NULL, 0, ACPI_OSI_WIN_XP}, /* Windows XP */ -{Windows 2001 SP1,NULL, 0, ACPI_OSI_WIN_XP_SP1}, /* Windows XP SP1 */ -{Windows 2001.1, NULL, 0, ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ -{Windows 2001 SP2,NULL, 0, ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ -{Windows 2001.1 SP1, NULL, 0, ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */ -{Windows 2006,NULL, 0, ACPI_OSI_WIN_VISTA},/* Windows Vista - Added 03/2006 */ -{Windows 2006.1, NULL, 0, ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */ -{Windows 2006 SP1,NULL, 0, ACPI_OSI_WIN_VISTA_SP1},/* Windows Vista SP1 - Added 09/2009 */ -{Windows 2006 SP2,NULL, 0, ACPI_OSI_WIN_VISTA_SP2},/* Windows Vista SP2 - Added 09/2010 */ -{Windows 2009,NULL, 0, ACPI_OSI_WIN_7},/* Windows 7 and Server 2008 R2 - Added 09/2009 */ + {__UNCONST(Windows 2000),NULL, 0, ACPI_OSI_WIN_2000}, /* Windows 2000 */ + {__UNCONST(Windows 2001),NULL, 0, ACPI_OSI_WIN_XP}, /* Windows XP */ + {__UNCONST(Windows 2001 SP1),NULL, 0, ACPI_OSI_WIN_XP_SP1}, /* Windows XP SP1 */ + {__UNCONST(Windows 2001.1), NULL, 0, ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ + {__UNCONST(Windows 2001 SP2),NULL, 0, ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ + {__UNCONST(Windows 2001.1 SP1), NULL, 0, ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003
CVS commit: src/sys/external/bsd/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 12:08:15 UTC 2011 Modified Files: src/sys/external/bsd/acpica/conf: files.acpica src/sys/external/bsd/acpica/dist/debugger: dbdisply.c src/sys/external/bsd/acpica/dist/include: acutils.h src/sys/external/bsd/acpica/dist/utilities: utdebug.c utdecode.c Log Message: Fix ACPI_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/acpica/conf/files.acpica cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/debugger/dbdisply.c cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/include/acutils.h cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/acpica/dist/utilities/utdebug.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/acpica/dist/utilities/utdecode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/acpica/conf/files.acpica diff -u src/sys/external/bsd/acpica/conf/files.acpica:1.2 src/sys/external/bsd/acpica/conf/files.acpica:1.3 --- src/sys/external/bsd/acpica/conf/files.acpica:1.2 Thu Feb 17 10:13:35 2011 +++ src/sys/external/bsd/acpica/conf/files.acpica Thu Feb 17 12:08:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.acpica,v 1.2 2011/02/17 10:13:35 jruoho Exp $ +# $NetBSD: files.acpica,v 1.3 2011/02/17 12:08:14 jruoho Exp $ define acpica makeoptions acpi CPPFLAGS+=-I$S/external/bsd/acpica/dist/include @@ -10,6 +10,8 @@ file external/bsd/acpica/dist/debugger/dbfileio.c acpica acpi_debug ddb file external/bsd/acpica/dist/debugger/dbhistry.c acpica acpi_debug ddb file external/bsd/acpica/dist/debugger/dbinput.c acpica acpi_debug ddb +file external/bsd/acpica/dist/debugger/dbmethod.c acpica acpi_debug ddb +file external/bsd/acpica/dist/debugger/dbnames.c acpica acpi_debug ddb file external/bsd/acpica/dist/debugger/dbstats.c acpica acpi_debug ddb file external/bsd/acpica/dist/debugger/dbutils.c acpica acpi_debug ddb file external/bsd/acpica/dist/debugger/dbxface.c acpica acpi_debug ddb Index: src/sys/external/bsd/acpica/dist/debugger/dbdisply.c diff -u src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.3 src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.4 --- src/sys/external/bsd/acpica/dist/debugger/dbdisply.c:1.3 Thu Feb 17 10:09:40 2011 +++ src/sys/external/bsd/acpica/dist/debugger/dbdisply.c Thu Feb 17 12:08:14 2011 @@ -925,7 +925,7 @@ typedef struct acpi_handler_info { void*Handler; -char*Name; +const char *Name; } ACPI_HANDLER_INFO; Index: src/sys/external/bsd/acpica/dist/include/acutils.h diff -u src/sys/external/bsd/acpica/dist/include/acutils.h:1.4 src/sys/external/bsd/acpica/dist/include/acutils.h:1.5 --- src/sys/external/bsd/acpica/dist/include/acutils.h:1.4 Thu Feb 17 11:21:40 2011 +++ src/sys/external/bsd/acpica/dist/include/acutils.h Thu Feb 17 12:08:14 2011 @@ -133,7 +133,7 @@ #endif -const char * +char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPEType); @@ -375,7 +375,7 @@ const char *FunctionName, const char *ModuleName, UINT32 ComponentId, -char*String); +const char *String); void AcpiUtExit ( Index: src/sys/external/bsd/acpica/dist/utilities/utdebug.c diff -u src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.3 src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.4 --- src/sys/external/bsd/acpica/dist/utilities/utdebug.c:1.3 Thu Feb 17 10:09:43 2011 +++ src/sys/external/bsd/acpica/dist/utilities/utdebug.c Thu Feb 17 12:08:15 2011 @@ -374,7 +374,7 @@ const char *FunctionName, const char *ModuleName, UINT32 ComponentId, -char*String) +const char *String) { AcpiGbl_NestingLevel++; Index: src/sys/external/bsd/acpica/dist/utilities/utdecode.c diff -u src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.2 src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.3 --- src/sys/external/bsd/acpica/dist/utilities/utdecode.c:1.2 Thu Feb 17 11:21:40 2011 +++ src/sys/external/bsd/acpica/dist/utilities/utdecode.c Thu Feb 17 12:08:15 2011 @@ -312,7 +312,7 @@ }; -const char * +char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPEType) { @@ -522,7 +522,7 @@ /* Names for internal mutex objects, used for debug output */ -static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = +static const char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = { ACPI_MTX_Interpreter, ACPI_MTX_Namespace,
CVS commit: src/sys/dev/acpi/acpica
Module Name:src Committed By: jruoho Date: Thu Feb 17 12:08:46 UTC 2011 Modified Files: src/sys/dev/acpi/acpica: OsdMisc.c Log Message: Include acdebug.h for the ACPICA debugger. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/acpica/OsdMisc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpica/OsdMisc.c diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.10 src/sys/dev/acpi/acpica/OsdMisc.c:1.11 --- src/sys/dev/acpi/acpica/OsdMisc.c:1.10 Thu Feb 17 07:34:42 2011 +++ src/sys/dev/acpi/acpica/OsdMisc.c Thu Feb 17 12:08:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdMisc.c,v 1.10 2011/02/17 07:34:42 jruoho Exp $ */ +/* $NetBSD: OsdMisc.c,v 1.11 2011/02/17 12:08:46 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.10 2011/02/17 07:34:42 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: OsdMisc.c,v 1.11 2011/02/17 12:08:46 jruoho Exp $); #include opt_acpi.h #include opt_ddb.h @@ -58,6 +58,10 @@ #include dev/acpi/acpica.h #include dev/acpi/acpi_osd.h +#ifdef ACPI_DEBUG +#include external/bsd/acpica/dist/include/acdebug.h +#endif + #ifdef ACPI_DSDT_OVERRIDE #ifndef ACPI_DSDT_FILE #define ACPI_DSDT_FILE dsdt.hex
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Thu Feb 17 12:23:58 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: Hijack pathname-based system calls. Now all paths starting with /rump are hijacked to go to the rump server. So you can e.g. start a hijacked shell and cd to /rump: $ cd /rump $ pwd /rump $ ls -l dev/null crwxr-xr-x 1 root wheel 2, 2 Feb 17 12:35 dev/null $ ls -l /dev/null crw-rw-rw- 1 root wheel 2, 2 Dec 22 2009 /dev/null $ chmod 0 /dev/null chmod: /dev/null: Operation not permitted $ chmod 0 dev/null $ ls -l /rump/dev/null c- 1 root wheel 2, 2 Feb 17 12:35 /rump/dev/null (of course the rump server must have vfs loaded for that to work) To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.44 src/lib/librumphijack/hijack.c:1.45 --- src/lib/librumphijack/hijack.c:1.44 Wed Feb 16 19:26:58 2011 +++ src/lib/librumphijack/hijack.c Thu Feb 17 12:23:58 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.44 2011/02/16 19:26:58 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.45 2011/02/17 12:23:58 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: hijack.c,v 1.44 2011/02/16 19:26:58 pooka Exp $); +__RCSID($NetBSD: hijack.c,v 1.45 2011/02/17 12:23:58 pooka Exp $); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -36,6 +36,7 @@ #include sys/ioctl.h #include sys/socket.h #include sys/poll.h +#include sys/statvfs.h #include rump/rumpclient.h #include rump/rump_syscalls.h @@ -70,6 +71,20 @@ DUALCALL_CLOSE, DUALCALL_POLLTS, DUALCALL_KEVENT, + DUALCALL_STAT, DUALCALL_LSTAT, DUALCALL_FSTAT, + DUALCALL_CHMOD, DUALCALL_LCHMOD, DUALCALL_FCHMOD, + DUALCALL_CHOWN, DUALCALL_LCHOWN, DUALCALL_FCHOWN, + DUALCALL_OPEN, + DUALCALL_STATVFS1, DUALCALL_FSTATVFS1, + DUALCALL_CHDIR, DUALCALL_FCHDIR, + DUALCALL_LSEEK, + DUALCALL_GETDENTS, + DUALCALL_UNLINK, DUALCALL_SYMLINK, DUALCALL_READLINK, + DUALCALL_RENAME, + DUALCALL_MKDIR, DUALCALL_RMDIR, + DUALCALL_UTIMES, DUALCALL_LUTIMES, DUALCALL_FUTIMES, + DUALCALL_TRUNCATE, DUALCALL_FTRUNCATE, + DUALCALL_FSYNC, DUALCALL_FSYNC_RANGE, DUALCALL__NUM }; @@ -84,12 +99,25 @@ #define REALSELECT select #define REALPOLLTS pollts #define REALKEVENT kevent +#define REALSTAT __stat30 +#define REALLSTAT __lstat30 +#define REALFSTAT __fstat30 +#define REALUTIMES utimes +#define REALLUTIMES lutimes +#define REALFUTIMES futimes #else #define REALSELECT _sys___select50 #define REALPOLLTS _sys___pollts50 #define REALKEVENT _sys___kevent50 +#define REALSTAT __stat50 +#define REALLSTAT __lstat50 +#define REALFSTAT __fstat50 +#define REALUTIMES __utimes50 +#define REALLUTIMES __lutimes50 +#define REALFUTIMES __futimes50 #endif #define REALREAD _sys_read +#define REALGETDENTS __getdents30 int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *); int REALPOLLTS(struct pollfd *, nfds_t, @@ -97,6 +125,13 @@ int REALKEVENT(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *); ssize_t REALREAD(int, void *, size_t); +int REALSTAT(const char *, struct stat *); +int REALLSTAT(const char *, struct stat *); +int REALFSTAT(int, struct stat *); +int REALGETDENTS(int, char *, size_t); +int REALUTIMES(const char *, const struct timeval [2]); +int REALLUTIMES(const char *, const struct timeval [2]); +int REALFUTIMES(int, const struct timeval [2]); #define S(a) __STRING(a) struct sysnames { @@ -128,6 +163,35 @@ { DUALCALL_CLOSE, close, RSYS_NAME(CLOSE) }, { DUALCALL_POLLTS, S(REALPOLLTS), RSYS_NAME(POLLTS) }, { DUALCALL_KEVENT, S(REALKEVENT), RSYS_NAME(KEVENT) }, + { DUALCALL_STAT, S(REALSTAT), RSYS_NAME(STAT) }, + { DUALCALL_LSTAT, S(REALLSTAT), RSYS_NAME(LSTAT) }, + { DUALCALL_FSTAT, S(REALFSTAT), RSYS_NAME(FSTAT) }, + { DUALCALL_CHOWN, chown, RSYS_NAME(CHOWN) }, + { DUALCALL_LCHOWN, lchown, RSYS_NAME(LCHOWN) }, + { DUALCALL_FCHOWN, fchown, RSYS_NAME(FCHOWN) }, + { DUALCALL_CHMOD, chmod, RSYS_NAME(CHMOD) }, + { DUALCALL_LCHMOD, lchmod, RSYS_NAME(LCHMOD) }, + { DUALCALL_FCHMOD, fchmod, RSYS_NAME(FCHMOD) }, + { DUALCALL_UTIMES, S(REALUTIMES), RSYS_NAME(UTIMES) }, + { DUALCALL_LUTIMES, S(REALLUTIMES), RSYS_NAME(LUTIMES) }, + { DUALCALL_FUTIMES, S(REALFUTIMES), RSYS_NAME(FUTIMES) }, + { DUALCALL_OPEN, open, RSYS_NAME(OPEN) }, + { DUALCALL_STATVFS1, statvfs1, RSYS_NAME(STATVFS1) }, + { DUALCALL_FSTATVFS1, fstatvfs1, RSYS_NAME(FSTATVFS1) }, + { DUALCALL_CHDIR, chdir, RSYS_NAME(CHDIR) }, + { DUALCALL_FCHDIR, fchdir, RSYS_NAME(FCHDIR) }, + { DUALCALL_LSEEK, lseek, RSYS_NAME(LSEEK) }, + { DUALCALL_GETDENTS, __getdents30, RSYS_NAME(GETDENTS) }, + { DUALCALL_UNLINK, unlink, RSYS_NAME(UNLINK) }, + { DUALCALL_SYMLINK,
CVS commit: [bouyer-quota2] src/sys/ufs/ffs
Module Name:src Committed By: bouyer Date: Thu Feb 17 13:28:15 UTC 2011 Modified Files: src/sys/ufs/ffs [bouyer-quota2]: ffs_snapshot.c Log Message: Remove comment that should not be there To generate a diff of this commit: cvs rdiff -u -r1.102.4.4 -r1.102.4.5 src/sys/ufs/ffs/ffs_snapshot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/ufs/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.4 src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.5 --- src/sys/ufs/ffs/ffs_snapshot.c:1.102.4.4 Thu Feb 17 12:00:52 2011 +++ src/sys/ufs/ffs/ffs_snapshot.c Thu Feb 17 13:28:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_snapshot.c,v 1.102.4.4 2011/02/17 12:00:52 bouyer Exp $ */ +/* $NetBSD: ffs_snapshot.c,v 1.102.4.5 2011/02/17 13:28:15 bouyer Exp $ */ /* * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.4 2011/02/17 12:00:52 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: ffs_snapshot.c,v 1.102.4.5 2011/02/17 13:28:15 bouyer Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -1051,7 +1051,6 @@ dip1-di_flags = ufs_rw32(ufs_rw32(dip1-di_flags, ns) ~SF_SNAPSHOT, ns); memset(dip1-di_db[0], 0, (NDADDR + NIADDR) * sizeof(int32_t)); - /* quota inodes are not accounted in quotas */ } else { dip2 = (struct ufs2_dinode *)bp-b_data + ino_to_fsbo(fs, cancelip-i_number);
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: matt Date: Thu Feb 17 13:53:33 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: booke_machdep.c copyin.c trap.c src/sys/arch/powerpc/include: userret.h src/sys/arch/powerpc/include/booke: cpuvar.h Log Message: add begging of single step support. Since BookE doesn't support PSL_SE, if userret find PSL_SE set in SRR1, it will call booke_sstep to setup the debug registers. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/booke/booke_machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/copyin.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/trap.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/powerpc/include/userret.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/booke/cpuvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/booke_machdep.c diff -u src/sys/arch/powerpc/booke/booke_machdep.c:1.3 src/sys/arch/powerpc/booke/booke_machdep.c:1.4 --- src/sys/arch/powerpc/booke/booke_machdep.c:1.3 Wed Feb 16 18:44:54 2011 +++ src/sys/arch/powerpc/booke/booke_machdep.c Thu Feb 17 13:53:32 2011 @@ -50,7 +50,9 @@ #include uvm/uvm_extern.h -#include powerpc/altivec.h +#include powerpc/spr.h +#include powerpc/booke/spr.h +#include powerpc/booke/cpuvar.h /* * Global variables used here and there @@ -442,3 +444,37 @@ struct cpu_softc * const cpu = curcpu()-ci_softc; bus_space_write_1(cpu-cpu_bst, cpu-cpu_bsh, a, v); } + +void +booke_sstep(struct trapframe *tf) +{ + KASSERT(tf-tf_srr1 PSL_DE); + const uint32_t insn = ufetch_32((const void *)tf-tf_srr0); + register_t dbcr0 = DBCR0_IAC1 | DBCR0_IDM; + register_t dbcr1 = DBCR1_IAC1US_USER | DBCR1_IAC1ER_DS1; + if ((insn 28) == 4) { + uint32_t iac2 = 0; + if ((insn 26) == 0x12) { + const int32_t off = (((int32_t)insn 6) 6) ~3; + iac2 = ((insn 2) ? 0 : tf-tf_srr0) + off; + dbcr0 |= DBCR0_IAC2; + } else if ((insn 26) == 0x10) { + const int16_t off = insn ~3; + iac2 = ((insn 2) ? 0 : tf-tf_srr0) + off; + dbcr0 |= DBCR0_IAC2; + } else if ((insn 0xfc00ffde) == 0x4c000420) { + iac2 = tf-tf_ctr; + dbcr0 |= DBCR0_IAC2; + } else if ((insn 0xfc00ffde) == 0x4c20) { + iac2 = tf-tf_lr; + dbcr0 |= DBCR0_IAC2; + } + if (dbcr0 DBCR0_IAC2) { + dbcr1 |= DBCR1_IAC2US_USER | DBCR1_IAC2ER_DS1; + mtspr(SPR_IAC2, iac2); + } + } + mtspr(SPR_IAC1, tf-tf_srr0 + 4); + mtspr(SPR_DBCR1, dbcr1); + mtspr(SPR_DBCR0, dbcr0); +} Index: src/sys/arch/powerpc/booke/copyin.c diff -u src/sys/arch/powerpc/booke/copyin.c:1.2 src/sys/arch/powerpc/booke/copyin.c:1.3 --- src/sys/arch/powerpc/booke/copyin.c:1.2 Tue Jan 18 01:02:52 2011 +++ src/sys/arch/powerpc/booke/copyin.c Thu Feb 17 13:53:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: copyin.c,v 1.2 2011/01/18 01:02:52 matt Exp $ */ +/* $NetBSD: copyin.c,v 1.3 2011/02/17 13:53:32 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -36,13 +36,15 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: copyin.c,v 1.2 2011/01/18 01:02:52 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: copyin.c,v 1.3 2011/02/17 13:53:32 matt Exp $); #include sys/param.h #include sys/lwp.h #include machine/pcb.h +#include powerpc/booke/cpuvar.h + static inline uint8_t copyin_byte(const uint8_t * const usaddr8, register_t ds_msr) { @@ -195,6 +197,24 @@ } } +uint32_t +ufetch_32(const void *vusaddr) +{ + struct pcb * const pcb = lwp_getpcb(curlwp); + struct faultbuf env; + + if (setfault(env) != 0) { + pcb-pcb_onfault = NULL; + return -1; + } + + uint32_t rv = copyin_word(vusaddr, mfmsr() | PSL_DS); + + pcb-pcb_onfault = NULL; + + return rv; +} + int copyin(const void *vusaddr, void *vkdaddr, size_t len) { Index: src/sys/arch/powerpc/booke/trap.c diff -u src/sys/arch/powerpc/booke/trap.c:1.4 src/sys/arch/powerpc/booke/trap.c:1.5 --- src/sys/arch/powerpc/booke/trap.c:1.4 Tue Feb 8 01:38:48 2011 +++ src/sys/arch/powerpc/booke/trap.c Thu Feb 17 13:53:32 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.4 2011/02/08 01:38:48 matt Exp $ */ +/* $NetBSD: trap.c,v 1.5 2011/02/17 13:53:32 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,7 +39,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: trap.c,v 1.4 2011/02/08 01:38:48 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: trap.c,v 1.5 2011/02/17 13:53:32 matt Exp $); #include sys/param.h #include sys/systm.h @@ -64,6 +64,7 @@ #include powerpc/spr.h #include powerpc/booke/spr.h +#include powerpc/booke/cpuvar.h #include powerpc/db_machdep.h #include ddb/db_interface.h @@ -450,7 +451,9 @@ tf-tf_srr0 += 4; return 0; } - } else if (tf-tf_esr (ESR_PIL|ESR_PPR)) { + } + + if (tf-tf_esr (ESR_PIL|ESR_PPR)) { if (emulate_opcode(tf, ksi)) { tf-tf_srr0 += 4; return 0; @@ -475,6 +478,41 @@ } static int +debug_exception(struct
CVS commit: src/sys
Module Name:src Committed By: matt Date: Thu Feb 17 13:55:45 UTC 2011 Modified Files: src/sys/arch/powerpc/booke: booke_pmap.c src/sys/arch/powerpc/include/booke: pmap.h src/sys/common/pmap/tlb: pmap_tlb.c Log Message: Use _PMAP_PRIVATE to control the inclusion of powerpc/booke/cpuvar.h. This prevents most of the MI files from depending on it. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/booke/booke_pmap.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/booke/pmap.h cvs rdiff -u -r1.2 -r1.3 src/sys/common/pmap/tlb/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/booke/booke_pmap.c diff -u src/sys/arch/powerpc/booke/booke_pmap.c:1.2 src/sys/arch/powerpc/booke/booke_pmap.c:1.3 --- src/sys/arch/powerpc/booke/booke_pmap.c:1.2 Tue Jan 18 01:02:52 2011 +++ src/sys/arch/powerpc/booke/booke_pmap.c Thu Feb 17 13:55:44 2011 @@ -33,9 +33,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#define _PMAP_PRIVATE + #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: booke_pmap.c,v 1.2 2011/01/18 01:02:52 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: booke_pmap.c,v 1.3 2011/02/17 13:55:44 matt Exp $); #include sys/param.h #include sys/kcore.h Index: src/sys/arch/powerpc/include/booke/pmap.h diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.3 src/sys/arch/powerpc/include/booke/pmap.h:1.4 --- src/sys/arch/powerpc/include/booke/pmap.h:1.3 Tue Feb 8 01:39:36 2011 +++ src/sys/arch/powerpc/include/booke/pmap.h Thu Feb 17 13:55:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.3 2011/02/08 01:39:36 matt Exp $ */ +/* $NetBSD: pmap.h,v 1.4 2011/02/17 13:55:45 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -43,7 +43,9 @@ #include sys/cpu.h #include sys/kcore.h #include uvm/uvm_page.h +#ifdef _PMAP_PRIVATE #include powerpc/booke/cpuvar.h +#endif #define PMAP_MD_NOCACHE 0x0100 #define PMAP_NEED_PROCWR Index: src/sys/common/pmap/tlb/pmap_tlb.c diff -u src/sys/common/pmap/tlb/pmap_tlb.c:1.2 src/sys/common/pmap/tlb/pmap_tlb.c:1.3 --- src/sys/common/pmap/tlb/pmap_tlb.c:1.2 Tue Jan 18 01:11:50 2011 +++ src/sys/common/pmap/tlb/pmap_tlb.c Thu Feb 17 13:55:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.2 2011/01/18 01:11:50 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.3 2011/02/17 13:55:45 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.2 2011/01/18 01:11:50 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap_tlb.c,v 1.3 2011/02/17 13:55:45 matt Exp $); /* * Manages address spaces in a TLB. @@ -122,6 +122,8 @@ * a lot of overhead for not much gain. */ +#define _PMAP_PRIVATE + #include sys/param.h #include sys/systm.h #include sys/proc.h
CVS commit: src/sys/arch/evbppc/mpc85xx
Module Name:src Committed By: matt Date: Thu Feb 17 13:57:12 UTC 2011 Modified Files: src/sys/arch/evbppc/mpc85xx: autoconf.c machdep.c Log Message: Support a little bus_space for mapping the GUR registers since some devices use little endian registers. Add MPC8533 support. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/mpc85xx/autoconf.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/mpc85xx/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbppc/mpc85xx/autoconf.c diff -u src/sys/arch/evbppc/mpc85xx/autoconf.c:1.2 src/sys/arch/evbppc/mpc85xx/autoconf.c:1.3 --- src/sys/arch/evbppc/mpc85xx/autoconf.c:1.2 Tue Jan 18 01:10:25 2011 +++ src/sys/arch/evbppc/mpc85xx/autoconf.c Thu Feb 17 13:57:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2011/01/18 01:10:25 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.2 2011/01/18 01:10:25 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.3 2011/02/17 13:57:12 matt Exp $); #define __INTR_PRIVATE @@ -121,6 +121,7 @@ ma.ma_name = cpunode; ma.ma_node = 0; ma.ma_memt = curcpu()-ci_softc-cpu_bst; + ma.ma_le_memt = curcpu()-ci_softc-cpu_le_bst; ma.ma_dmat = booke_bus_dma_tag; config_found_sm_loc(self, mainbus, NULL, ma, mainbus_print, NULL); Index: src/sys/arch/evbppc/mpc85xx/machdep.c diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.4 src/sys/arch/evbppc/mpc85xx/machdep.c:1.5 --- src/sys/arch/evbppc/mpc85xx/machdep.c:1.4 Sun Feb 13 05:03:27 2011 +++ src/sys/arch/evbppc/mpc85xx/machdep.c Thu Feb 17 13:57:12 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.4 2011/02/13 05:03:27 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.5 2011/02/17 13:57:12 matt Exp $ */ /*- * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -128,6 +128,12 @@ .pbs_limit = GUR_SIZE, }; +struct powerpc_bus_space gur_le_bst = { + .pbs_flags = _BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_MEM_TYPE, + .pbs_offset = GUR_BASE, + .pbs_limit = GUR_SIZE, +}; + const bus_space_handle_t gur_bsh = (bus_space_handle_t)(uintptr_t)(GUR_BASE); #ifdef CADMUS @@ -522,6 +528,7 @@ { svr = ~0x8; /* clear security bit */ switch (svr 8) { + case SVR_MPC8533 8: return MPC8533; case SVR_MPC8536v1 8: return MPC8536; case SVR_MPC8541v1 8: return MPC8541; case SVR_MPC8543v2 8: return MPC8543; @@ -696,7 +703,9 @@ CTASSERT(offsetof(struct tlb_md_ops, md_tlb_mapiodev) == 0); cpu_md_ops.md_tlb_ops = (const void *)early_tlb_mapiodev; bus_space_init(gur_bst, NULL, NULL, 0); + bus_space_init(gur_le_bst, NULL, NULL, 0); cpu-cpu_bst = gur_bst; + cpu-cpu_le_bst = gur_le_bst; cpu-cpu_bsh = gur_bsh; /* @@ -735,6 +744,7 @@ * Now find out how much memory is attached */ pmemsize = memprobe(endkernel); + cpu-cpu_highmem = pmemsize; printf( memprobe=%zuMB, (size_t) (pmemsize 20)); /* @@ -1020,13 +1030,13 @@ switch (svr) { #if defined(MPC8536) case SVR_MPC8536v1 16: - mpc85xx_pci_setup(pci1-interrupt-map, 0x001800, IST_LEVEL, + mpc85xx_pci_setup(pci0-interrupt-map, 0x001800, IST_LEVEL, 1, 2, 3, 4); break; #endif #if defined(MPC8544) case SVR_MPC8544v1 16: - mpc85xx_pci_setup(pci1-interrupt-map, 0x001800, IST_LEVEL, + mpc85xx_pci_setup(pci0-interrupt-map, 0x001800, IST_LEVEL, 0, 1, 2, 3); break; #endif
CVS commit: [bouyer-quota2] src/sys
Module Name:src Committed By: bouyer Date: Thu Feb 17 13:58:46 UTC 2011 Modified Files: src/sys/dev/acpi [bouyer-quota2]: acpi_ec.c acpi_wakedev.c src/sys/dev/acpi/acpica [bouyer-quota2]: OsdMisc.c src/sys/external/bsd/acpica/conf [bouyer-quota2]: files.acpica src/sys/external/bsd/acpica/dist/debugger [bouyer-quota2]: dbdisply.c src/sys/external/bsd/acpica/dist/dispatcher [bouyer-quota2]: dscontrol.c src/sys/external/bsd/acpica/dist/include [bouyer-quota2]: acutils.h src/sys/external/bsd/acpica/dist/utilities [bouyer-quota2]: utdebug.c utdecode.c utosi.c Log Message: Sync with HEAD To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.68.4.1 src/sys/dev/acpi/acpi_ec.c cvs rdiff -u -r1.20 -r1.20.4.1 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/dev/acpi/acpica/OsdMisc.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \ src/sys/external/bsd/acpica/conf/files.acpica cvs rdiff -u -r1.3.2.2 -r1.3.2.3 \ src/sys/external/bsd/acpica/dist/debugger/dbdisply.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \ src/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c cvs rdiff -u -r1.4.2.2 -r1.4.2.3 \ src/sys/external/bsd/acpica/dist/include/acutils.h cvs rdiff -u -r1.3.2.2 -r1.3.2.3 \ src/sys/external/bsd/acpica/dist/utilities/utdebug.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 \ src/sys/external/bsd/acpica/dist/utilities/utdecode.c \ src/sys/external/bsd/acpica/dist/utilities/utosi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_ec.c diff -u src/sys/dev/acpi/acpi_ec.c:1.68 src/sys/dev/acpi/acpi_ec.c:1.68.4.1 --- src/sys/dev/acpi/acpi_ec.c:1.68 Fri Jan 7 14:08:29 2011 +++ src/sys/dev/acpi/acpi_ec.c Thu Feb 17 13:58:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $ */ +/* $NetBSD: acpi_ec.c,v 1.68.4.1 2011/02/17 13:58:44 bouyer Exp $ */ /*- * Copyright (c) 2007 Joerg Sonnenberger jo...@netbsd.org. @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.68 2011/01/07 14:08:29 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_ec.c,v 1.68.4.1 2011/02/17 13:58:44 bouyer Exp $); #include sys/param.h #include sys/callout.h @@ -161,7 +161,7 @@ static void acpiec_callout(void *); static void acpiec_gpe_query(void *); -static uint32_t acpiec_gpe_handler(void *); +static uint32_t acpiec_gpe_handler(ACPI_HANDLE, uint32_t, void *); static ACPI_STATUS acpiec_space_setup(ACPI_HANDLE, uint32_t, void *, void **); static ACPI_STATUS acpiec_space_handler(uint32_t, ACPI_PHYSICAL_ADDRESS, uint32_t, ACPI_INTEGER *, void *, void *); @@ -366,7 +366,7 @@ goto post_csr_map; } - rv = AcpiEnableGpe(sc-sc_gpeh, sc-sc_gpebit, ACPI_GPE_TYPE_RUNTIME); + rv = AcpiEnableGpe(sc-sc_gpeh, sc-sc_gpebit); if (rv != AE_OK) { aprint_error_dev(self, unable to enable GPE: %s\n, AcpiFormatException(rv)); @@ -844,7 +844,7 @@ } static uint32_t -acpiec_gpe_handler(void *arg) +acpiec_gpe_handler(ACPI_HANDLE hdl, uint32_t gpebit, void *arg) { device_t dv = arg; struct acpiec_softc *sc = device_private(dv); Index: src/sys/dev/acpi/acpi_wakedev.c diff -u src/sys/dev/acpi/acpi_wakedev.c:1.20 src/sys/dev/acpi/acpi_wakedev.c:1.20.4.1 --- src/sys/dev/acpi/acpi_wakedev.c:1.20 Sun Jan 2 12:06:02 2011 +++ src/sys/dev/acpi/acpi_wakedev.c Thu Feb 17 13:58:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakedev.c,v 1.20 2011/01/02 12:06:02 jruoho Exp $ */ +/* $NetBSD: acpi_wakedev.c,v 1.20.4.1 2011/02/17 13:58:44 bouyer Exp $ */ /*- * Copyright (c) 2009, 2010 Jared D. McNeill jmcne...@invisible.ca @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.20 2011/01/02 12:06:02 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.20.4.1 2011/02/17 13:58:44 bouyer Exp $); #include sys/param.h #include sys/device.h @@ -287,12 +287,17 @@ acpi_wakedev_power(ad, obj); /* - * Set both runtime and wake GPEs, but unset only wake GPEs. + * This affects only wake GPEs, provided that _PRW works. */ if (enable != 0) - (void)AcpiEnableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN); + (void)AcpiSetGpe(hdl, val, ACPI_GPE_ENABLE); else - (void)AcpiDisableGpe(hdl, val, ACPI_GPE_TYPE_WAKE); + (void)AcpiSetGpe(hdl, val, ACPI_GPE_DISABLE); + + /* + * XXX: Is this right? + */ + (void)AcpiUpdateAllGpes(); ACPI_DEBUG_PRINT((ACPI_DB_INFO, wake GPE %s for %s\n, (enable != 0) ? enabled : disabled, ad-ad_name)); Index: src/sys/dev/acpi/acpica/OsdMisc.c diff -u src/sys/dev/acpi/acpica/OsdMisc.c:1.9.4.1 src/sys/dev/acpi/acpica/OsdMisc.c:1.9.4.2 --- src/sys/dev/acpi/acpica/OsdMisc.c:1.9.4.1 Thu Feb 17 12:00:10 2011 +++ src/sys/dev/acpi/acpica/OsdMisc.c Thu Feb 17 13:58:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: OsdMisc.c,v 1.9.4.1 2011/02/17 12:00:10 bouyer Exp $ */ +/* $NetBSD: OsdMisc.c,v 1.9.4.2
CVS commit: src/sys/arch/mips/sibyte/pci
Module Name:src Committed By: matt Date: Thu Feb 17 14:24:12 UTC 2011 Added Files: src/sys/arch/mips/sibyte/pci: sbbrz.c sbbrz_bus_io.c sbbrz_bus_mem.c sbbrz_pci.c sbbrzvar.h sbpcihb.c Log Message: Add PCI support for BCM1125/1250. To generate a diff of this commit: cvs rdiff -u -r0 -r1.2 src/sys/arch/mips/sibyte/pci/sbbrz.c \ src/sys/arch/mips/sibyte/pci/sbbrz_bus_io.c \ src/sys/arch/mips/sibyte/pci/sbbrz_bus_mem.c \ src/sys/arch/mips/sibyte/pci/sbbrz_pci.c \ src/sys/arch/mips/sibyte/pci/sbbrzvar.h \ src/sys/arch/mips/sibyte/pci/sbpcihb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/sibyte/pci/sbbrz.c diff -u /dev/null src/sys/arch/mips/sibyte/pci/sbbrz.c:1.2 --- /dev/null Thu Feb 17 14:24:12 2011 +++ src/sys/arch/mips/sibyte/pci/sbbrz.c Thu Feb 17 14:24:12 2011 @@ -0,0 +1,221 @@ +/* $NetBSD: sbbrz.c,v 1.2 2011/02/17 14:24:12 matt Exp $ */ + +/* + * Copyright 2000, 2001 + * Broadcom Corporation. All rights reserved. + * + * This software is furnished under license and may be used and copied only + * in accordance with the following terms and conditions. Subject to these + * conditions, you may download, copy, install, use, modify and distribute + * modified or unmodified copies of this software in source and/or binary + * form. No title or ownership is transferred hereby. + * + * 1) Any source code used, modified or distributed must reproduce and + *retain this copyright notice and list of conditions as they appear in + *the source file. + * + * 2) No right is granted to use any trade name, trademark, or logo of + *Broadcom Corporation. Neither the Broadcom Corporation name nor any + *trademark or logo of Broadcom Corporation may be used to endorse or + *promote products derived from this software without the prior written + *permission of Broadcom Corporation. + * + * 3) THIS SOFTWARE IS PROVIDED AS-IS AND ANY EXPRESS OR IMPLIED + *WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF + *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR + *NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE + *FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE + *LIABLE FOR 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), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* from: $NetBSD: apecs.c,v 1.38 2000/06/29 08:58:45 mrg Exp */ + +/*- + * Copyright (c) 2000, 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +/* + * Copyright (c) 1995, 1996 Carnegie-Mellon University. + * All rights reserved. + * + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS AS IS + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: jruoho Date: Thu Feb 17 15:06:34 UTC 2011 Modified Files: src/usr.sbin/acpitools/acpidump: acpidump.h Log Message: Provide a definition for the size of the RSDP in ACPI 1.0. Appears to be missing in the new ACPICA. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/acpitools/acpidump/acpidump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpidump.h diff -u src/usr.sbin/acpitools/acpidump/acpidump.h:1.4 src/usr.sbin/acpitools/acpidump/acpidump.h:1.5 --- src/usr.sbin/acpitools/acpidump/acpidump.h:1.4 Thu Feb 17 10:18:05 2011 +++ src/usr.sbin/acpitools/acpidump/acpidump.h Thu Feb 17 15:06:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpidump.h,v 1.4 2011/02/17 10:18:05 jmcneill Exp $ */ +/* $NetBSD: acpidump.h,v 1.5 2011/02/17 15:06:34 jruoho Exp $ */ /*- * Copyright (c) 1999 Doug Rabson @@ -54,6 +54,8 @@ #define ACPI_HPET_ID_LEGACY_CAPABLE 0x8000 #define ACPI_HPET_ID_PCI_VENDOR_ID 0x +#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ + /* Find and map the RSD PTR structure and return it for parsing */ ACPI_TABLE_HEADER *sdt_load_devmem(void);
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Thu Feb 17 15:20:10 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: In case dup2(n, n+FDOFF) is done, the caller thinks there are two distinct file descriptors, but the rump kernel thinks they are both the same. Now, if either one is closed by the application, both will be closed in the rump kernel. To fix this, maintain an alias-mask. It's not a perfect solution, though (consider e.g. F_SETFL). Maybe we should actually dup the fd and maintain a mapping table? Also, prevent the host from opening file descriptors onto the places in the fd namespace that have been dupped. These together fix cat /rump/foo in a hijacked /bin/sh. (the first one makes sure stdin is open in cat and the second one makes sure it doesn't try to cat something from /usr/share/locale instead of stdin) To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.46 src/lib/librumphijack/hijack.c:1.47 --- src/lib/librumphijack/hijack.c:1.46 Thu Feb 17 12:52:33 2011 +++ src/lib/librumphijack/hijack.c Thu Feb 17 15:20:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.46 2011/02/17 12:52:33 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.47 2011/02/17 15:20:10 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: hijack.c,v 1.46 2011/02/17 12:52:33 pooka Exp $); +__RCSID($NetBSD: hijack.c,v 1.47 2011/02/17 15:20:10 pooka Exp $); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -205,12 +205,18 @@ int (*host_daemon)(int, int); int (*host_execve)(const char *, char *const[], char *const[]); +/* ok, we need *two* bits per dup2'd fd to track fd+HIJACKOFF aliases */ static uint32_t dup2mask; -#define ISDUP2D(fd) (((fd) 32) (1(fd) dup2mask)) +#define ISDUP2D(fd) (((fd) 16) (1(fd) dup2mask)) #define SETDUP2(fd) \ -do { if ((fd) 32) dup2mask |= (1(fd)); } while (/*CONSTCOND*/0) +do { if ((fd) 16) dup2mask |= (1(fd)); } while (/*CONSTCOND*/0) #define CLRDUP2(fd) \ -do { if ((fd) 32) dup2mask = ~(1(fd)); } while (/*CONSTCOND*/0) +do { if ((fd) 16) dup2mask = ~(1(fd)); } while (/*CONSTCOND*/0) +#define ISDUP2ALIAS(fd) (((fd) 16) (1((fd)+16) dup2mask)) +#define SETDUP2ALIAS(fd) \ +do { if ((fd) 16) dup2mask |= (1((fd)+16)); } while (/*CONSTCOND*/0) +#define CLRDUP2ALIAS(fd) \ +do { if ((fd) 16) dup2mask = ~(1((fd)+16)); } while (/*CONSTCOND*/0) //#define DEBUGJACK #ifdef DEBUGJACK @@ -458,6 +464,25 @@ return newd; } +/* + * dup a host file descriptor so that it doesn't collide with the dup2mask + */ +static int +fd_dupgood(int fd) +{ + int (*op_fcntl)(int, int, ...) = GETSYSCALL(host, FCNTL); + int (*op_close)(int) = GETSYSCALL(host, CLOSE); + int ofd, i; + + for (i = 1; ISDUP2D(fd); i++) { + ofd = fd; + fd = op_fcntl(ofd, F_DUPFD, i); + op_close(ofd); + } + + return fd; +} + int open(const char *path, int flags, ...) { @@ -481,6 +506,8 @@ if (isrump) fd = fd_rump2host(fd); + else + fd = fd_dupgood(fd); return fd; } @@ -556,6 +583,8 @@ if (!dohost) fd = fd_rump2host(fd); + else + fd = fd_dupgood(fd); DPRINTF((socket - %d\n, fd)); return fd; @@ -580,6 +609,8 @@ fd = op_accept(s, addr, addrlen); if (fd != -1 isrump) fd = fd_rump2host(fd); + else + fd = fd_dupgood(fd); DPRINTF(( - %d\n, fd)); @@ -650,8 +681,8 @@ */ /* why don't we offer fls()? */ - for (i = 31; i = 0; i--) { - if (dup2mask 1i) + for (i = 15; i = 0; i--) { + if (ISDUP2D(i)) break; } @@ -715,9 +746,15 @@ if (fd_isrump(fd)) { int undup2 = 0; + fd = fd_host2rump(fd); + if (ISDUP2ALIAS(fd)) { + _DIAGASSERT(ISDUP2D(fd)); + CLRDUP2ALIAS(fd); + return 0; + } + if (ISDUP2D(fd)) undup2 = 1; - fd = fd_host2rump(fd); op_close = GETSYSCALL(rump, CLOSE); rv = op_close(fd); if (rv == 0 undup2) @@ -769,6 +806,11 @@ if (!(newd = 0 newd = 2)) return EBADF; oldd = fd_host2rump(oldd); + if (oldd == newd) { + SETDUP2(newd); + SETDUP2ALIAS(newd); + return newd; + } rv = rump_sys_dup2(oldd, newd); if (rv != -1) SETDUP2(newd);
CVS commit: [bouyer-quota2] src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: bouyer Date: Thu Feb 17 15:24:52 UTC 2011 Modified Files: src/usr.sbin/acpitools/acpidump [bouyer-quota2]: acpidump.h Log Message: Sync with HEAD To generate a diff of this commit: cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/usr.sbin/acpitools/acpidump/acpidump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpidump.h diff -u src/usr.sbin/acpitools/acpidump/acpidump.h:1.2.2.1 src/usr.sbin/acpitools/acpidump/acpidump.h:1.2.2.2 --- src/usr.sbin/acpitools/acpidump/acpidump.h:1.2.2.1 Thu Feb 17 12:00:57 2011 +++ src/usr.sbin/acpitools/acpidump/acpidump.h Thu Feb 17 15:24:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpidump.h,v 1.2.2.1 2011/02/17 12:00:57 bouyer Exp $ */ +/* $NetBSD: acpidump.h,v 1.2.2.2 2011/02/17 15:24:51 bouyer Exp $ */ /*- * Copyright (c) 1999 Doug Rabson @@ -54,6 +54,8 @@ #define ACPI_HPET_ID_LEGACY_CAPABLE 0x8000 #define ACPI_HPET_ID_PCI_VENDOR_ID 0x +#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */ + /* Find and map the RSD PTR structure and return it for parsing */ ACPI_TABLE_HEADER *sdt_load_devmem(void);
CVS commit: src/lib/libpuffs
Module Name:src Committed By: pooka Date: Thu Feb 17 15:41:34 UTC 2011 Modified Files: src/lib/libpuffs: subr.c Log Message: st_blocks is in units of DEV_BSIZE, not st_blksize. from Derrik Pates To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libpuffs/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpuffs/subr.c diff -u src/lib/libpuffs/subr.c:1.25 src/lib/libpuffs/subr.c:1.26 --- src/lib/libpuffs/subr.c:1.25 Thu Jul 15 21:53:10 2010 +++ src/lib/libpuffs/subr.c Thu Feb 17 15:41:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr.c,v 1.25 2010/07/15 21:53:10 pooka Exp $ */ +/* $NetBSD: subr.c,v 1.26 2011/02/17 15:41:34 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: subr.c,v 1.25 2010/07/15 21:53:10 pooka Exp $); +__RCSID($NetBSD: subr.c,v 1.26 2011/02/17 15:41:34 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -282,7 +282,7 @@ va-va_gen = sb-st_gen; va-va_flags = sb-st_flags; va-va_rdev = sb-st_rdev; - va-va_bytes = sb-st_blocks * sb-st_blksize; + va-va_bytes = sb-st_blocks DEV_BSHIFT; va-va_filerev = 0; va-va_vaflags = 0; }
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Thu Feb 17 16:03:05 UTC 2011 Modified Files: src/usr.bin/rump_allserver: rump_allserver.1 rump_allserver.c Log Message: Make it possible to specify the type of file (blk/chr/reg) that a mapped file (-d) is exposed as within the rump kernel. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/rump_allserver/rump_allserver.1 cvs rdiff -u -r1.16 -r1.17 src/usr.bin/rump_allserver/rump_allserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rump_allserver/rump_allserver.1 diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.12 src/usr.bin/rump_allserver/rump_allserver.1:1.13 --- src/usr.bin/rump_allserver/rump_allserver.1:1.12 Fri Feb 4 20:06:23 2011 +++ src/usr.bin/rump_allserver/rump_allserver.1 Thu Feb 17 16:03:05 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: rump_allserver.1,v 1.12 2011/02/04 20:06:23 pooka Exp $ +.\ $NetBSD: rump_allserver.1,v 1.13 2011/02/17 16:03:05 pooka Exp $ .\ .\ Copyright (c) 2010 Antti Kantee. All rights reserved. .\ @@ -23,7 +23,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd February 4, 2011 +.Dd February 17, 2011 .Dt RUMP_SERVER 1 .Os .Sh NAME @@ -70,7 +70,7 @@ .It Fl d Ar drivespec The argument .Ar drivespec -maps a host file a block device in the rump fs namespace. +maps a host file in the rump fs namespace. The string .Ar drivespec must be of comma-separated @@ -98,8 +98,7 @@ must contain an existing and valid disklabel within the first 64k. .El .Pp -The following specifier is optional and used only if disklabel is -not specified: +The following are optional: .Bl -tag -width hostpath1234 .It Ar offset Offset of the mapping. @@ -108,6 +107,17 @@ therefore is .Fa [ offset , offset+size ] . In case this parameter is not given, the default value 0 is used. +.It Ar type +The type of file that +.Ar key +is exposed as within the rump kernel. +The possibilities are +.Dq blk , +.Dq chr , +and +.Dq reg +for block device, character device and regular file, respectively. +The default is a block device. .El .Pp In case Index: src/usr.bin/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.16 src/usr.bin/rump_allserver/rump_allserver.c:1.17 --- src/usr.bin/rump_allserver/rump_allserver.c:1.16 Fri Feb 4 20:06:23 2011 +++ src/usr.bin/rump_allserver/rump_allserver.c Thu Feb 17 16:03:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.16 2011/02/04 20:06:23 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.17 2011/02/17 16:03:05 pooka Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.16 2011/02/04 20:06:23 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.17 2011/02/17 16:03:05 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -87,6 +87,8 @@ offset, #define DLABEL 4 disklabel, +#define DTYPE 5 + type, NULL }; @@ -99,6 +101,15 @@ enum rump_etfs_type type; }; +struct etfstype { + const char *name; + enum rump_etfs_type type; +} etfstypes[] = { + { blk, RUMP_ETFS_BLK }, + { chr, RUMP_ETFS_CHR }, + { reg, RUMP_ETFS_REG }, +}; + int main(int argc, char *argv[]) { @@ -129,10 +140,12 @@ char *key, *hostpath; long long flen, foffset; char partition; + int ftype; flen = foffset = 0; partition = 0; key = hostpath = NULL; + ftype = -1; options = optarg; while (*options) { switch (getsubopt(options, @@ -192,6 +205,28 @@ partition = *value; break; +case DTYPE: + if (ftype != -1) { + fprintf(stderr, + type already specified\n); + usage(); + } + + for (i = 0; + i __arraycount(etfstypes); + i++) { + if (strcmp(etfstypes[i].name, + value) == 0) + break; + } + if (i == __arraycount(etfstypes)) { + fprintf(stderr, + invalid type %s\n, value); + usage(); + } + ftype = etfstypes[i].type; + break; + default: fprintf(stderr, invalid dtoken\n); usage(); @@ -204,6 +239,8 @@ fprintf(stderr, incomplete drivespec\n); usage(); } + if (ftype == -1) +ftype = RUMP_ETFS_BLK; if (netfs - curetfs == 0) { etfs = realloc(etfs, (netfs+16)*sizeof(*etfs)); @@ -217,7 +254,7 @@ etfs[curetfs].flen = flen; etfs[curetfs].foffset = foffset; etfs[curetfs].partition = partition; - etfs[curetfs].type = RUMP_ETFS_BLK; + etfs[curetfs].type = ftype; curetfs++; break;
CVS commit: src/tests/usr.bin/rump_server
Module Name:src Committed By: pooka Date: Thu Feb 17 16:08:48 UTC 2011 Modified Files: src/tests/usr.bin/rump_server: t_disk.sh Log Message: Test the -d type parameter of rump_server(1). XXX: these tests only work with a dynamic userland, dunno how to specify a skip clause for that To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/rump_server/t_disk.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/rump_server/t_disk.sh diff -u src/tests/usr.bin/rump_server/t_disk.sh:1.2 src/tests/usr.bin/rump_server/t_disk.sh:1.3 --- src/tests/usr.bin/rump_server/t_disk.sh:1.2 Fri Feb 4 19:44:00 2011 +++ src/tests/usr.bin/rump_server/t_disk.sh Thu Feb 17 16:08:48 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_disk.sh,v 1.2 2011/02/04 19:44:00 pooka Exp $ +# $NetBSD: t_disk.sh,v 1.3 2011/02/17 16:08:48 pooka Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -86,6 +86,34 @@ dd if=the.img iseek=16k bs=1 count=512 } +test_case type_chr -d key=/img,hostpath=the.img,size=32k,type=chr +type_chr() +{ + atf_check -s exit:0 -o inline:'Character Device\n' \ + env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img +} + +test_case type_reg -d key=/img,hostpath=the.img,size=32k,type=reg +type_reg() +{ + atf_check -s exit:0 -o inline:'Regular File\n' \ + env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img +} + +test_case type_blk -d key=/img,hostpath=the.img,size=32k,type=blk +type_blk() +{ + atf_check -s exit:0 -o inline:'Block Device\n' \ + env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img +} + +test_case type_blk_default -d key=/img,hostpath=the.img,size=32k +type_blk_default() +{ + atf_check -s exit:0 -o inline:'Block Device\n' \ + env LD_PRELOAD=/usr/lib/librumphijack.so stat -f %HT /rump/img +} + atf_init_test_cases() { @@ -93,4 +121,8 @@ atf_add_test_case offset atf_add_test_case notrunc atf_add_test_case data + atf_add_test_case type_chr + atf_add_test_case type_reg + atf_add_test_case type_blk + atf_add_test_case type_blk_default }
CVS commit: src/lib/libedit
Module Name:src Committed By: joerg Date: Thu Feb 17 16:44:49 UTC 2011 Modified Files: src/lib/libedit: vi.c Log Message: Deal with changes in the weak_reference semantic in GCC 4.2 and later. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libedit/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/vi.c diff -u src/lib/libedit/vi.c:1.32 src/lib/libedit/vi.c:1.33 --- src/lib/libedit/vi.c:1.32 Sat Oct 23 23:27:40 2010 +++ src/lib/libedit/vi.c Thu Feb 17 16:44:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vi.c,v 1.32 2010/10/23 23:27:40 christos Exp $ */ +/* $NetBSD: vi.c,v 1.33 2011/02/17 16:44:48 joerg Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)vi.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: vi.c,v 1.32 2010/10/23 23:27:40 christos Exp $); +__RCSID($NetBSD: vi.c,v 1.33 2011/02/17 16:44:48 joerg Exp $); #endif #endif /* not lint not SCCSID */ @@ -919,8 +919,13 @@ * this is against historical precedent... */ #ifdef __weak_reference +#if __GNUC_PREREQ__(4,2) +extern char *get_alias_text(const char *) __attribute__((__weak__)); +static char *my_get_alias_text(const char *) __attribute__((__weakref__, __alias__(get_alias_text))); +#else extern char *get_alias_text(const char *) __weak_reference(get_alias_text); #endif +#endif protected el_action_t /*ARGSUSED*/ vi_alias(EditLine *el, Int c) @@ -929,9 +934,15 @@ char alias_name[3]; char *alias_text; +#if __GNUC_PREREQ__(4,2) + if (my_get_alias_text == 0) { + return CC_ERROR; + } +#else if (get_alias_text == 0) { return CC_ERROR; } +#endif alias_name[0] = '_'; alias_name[2] = 0;
CVS commit: src/sbin/mount
Module Name:src Committed By: pooka Date: Thu Feb 17 16:57:46 UTC 2011 Modified Files: src/sbin/mount: pathadj.c Log Message: when in doubt, let the kernel decide To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sbin/mount/pathadj.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount/pathadj.c diff -u src/sbin/mount/pathadj.c:1.1 src/sbin/mount/pathadj.c:1.2 --- src/sbin/mount/pathadj.c:1.1 Tue Aug 5 20:57:45 2008 +++ src/sbin/mount/pathadj.c Thu Feb 17 16:57:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pathadj.c,v 1.1 2008/08/05 20:57:45 pooka Exp $ */ +/* $NetBSD: pathadj.c,v 1.2 2011/02/17 16:57:46 pooka Exp $ */ /* * Copyright (c) 2008 The NetBSD Foundation. All Rights Reserved. @@ -38,7 +38,7 @@ { if (realpath(input, adjusted) == NULL) - err(1, realpath %s, input); + warn(Warning: realpath %s, input); if (strncmp(input, adjusted, MAXPATHLEN)) { warnx(\%s\ is a non-resolved or relative path., input); warnx(using \%s\ instead., adjusted);
CVS commit: src/usr.bin/rump_allserver
Module Name:src Committed By: pooka Date: Thu Feb 17 16:59:46 UTC 2011 Modified Files: src/usr.bin/rump_allserver: rump_allserver.1 rump_allserver.c Log Message: Use size=e as a way say if the underlying file is preexisting regular file, use whatever size it has. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/usr.bin/rump_allserver/rump_allserver.1 cvs rdiff -u -r1.17 -r1.18 src/usr.bin/rump_allserver/rump_allserver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rump_allserver/rump_allserver.1 diff -u src/usr.bin/rump_allserver/rump_allserver.1:1.13 src/usr.bin/rump_allserver/rump_allserver.1:1.14 --- src/usr.bin/rump_allserver/rump_allserver.1:1.13 Thu Feb 17 16:03:05 2011 +++ src/usr.bin/rump_allserver/rump_allserver.1 Thu Feb 17 16:59:46 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: rump_allserver.1,v 1.13 2011/02/17 16:03:05 pooka Exp $ +.\ $NetBSD: rump_allserver.1,v 1.14 2011/02/17 16:59:46 pooka Exp $ .\ .\ Copyright (c) 2010 Antti Kantee. All rights reserved. .\ @@ -86,10 +86,17 @@ If the file does not exist, it will be created. .It Ar size Size of the mapping. -The host file will be truncated to the size indicated. Similar to .Xr dd 1 , this argument accepts a suffix as the multiplier for the number. +The special value +.Dq e +indicates that the current size of +.Ar hostpath +will be used. +It is assumed that +.Ar hostpath +exists and is a regular file. .It OR .It Ar disklabel Use a disklabel partition identifier to specify the offset and size Index: src/usr.bin/rump_allserver/rump_allserver.c diff -u src/usr.bin/rump_allserver/rump_allserver.c:1.17 src/usr.bin/rump_allserver/rump_allserver.c:1.18 --- src/usr.bin/rump_allserver/rump_allserver.c:1.17 Thu Feb 17 16:03:05 2011 +++ src/usr.bin/rump_allserver/rump_allserver.c Thu Feb 17 16:59:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_allserver.c,v 1.17 2011/02/17 16:03:05 pooka Exp $ */ +/* $NetBSD: rump_allserver.c,v 1.18 2011/02/17 16:59:46 pooka Exp $ */ /*- * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: rump_allserver.c,v 1.17 2011/02/17 16:03:05 pooka Exp $); +__RCSID($NetBSD: rump_allserver.c,v 1.18 2011/02/17 16:59:46 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -82,6 +82,7 @@ #define DFILE 1 hostpath, #define DSIZE 2 +#define DSIZE_E -1 size, #define DOFFSET 3 offset, @@ -174,9 +175,20 @@ size already given\n); usage(); } - /* XXX: off_t max? */ - flen = strsuftoll(-d size, value, - 0, LLONG_MAX); + if (strcmp(value, e) == 0) { + if (foffset != 0) { + fprintf(stderr, + cannot specify + offset with + size=e\n); + usage(); + } + flen = DSIZE_E; + } else { + /* XXX: off_t max? */ + flen = strsuftoll(-d size, + value, 0, LLONG_MAX); + } break; case DOFFSET: if (foffset != 0) { @@ -184,6 +196,12 @@ offset already given\n); usage(); } + if (flen == DSIZE_E) { + fprintf(stderr, cannot + specify offset with + size=e\n); + usage(); + } /* XXX: off_t max? */ foffset = strsuftoll(-d offset, value, 0, LLONG_MAX); @@ -330,11 +348,12 @@ struct disklabel dl; struct stat sb; off_t foffset, flen, fendoff; - int fd; + int fd, oflags; - fd = open(etfs[i].hostpath, O_RDWR | O_CREAT, 0644); + oflags = etfs[i].flen == DSIZE_E ? 0 : O_CREAT; + fd = open(etfs[i].hostpath, O_RDWR | oflags, 0644); if (fd == -1) - die(sflag, errno, etfs hostpath create); + die(sflag, errno, etfs hostpath open); if (etfs[i].partition) { int partition = etfs[i].partition - 'a'; @@ -354,10 +373,15 @@ foffset = etfs[i].foffset; flen = etfs[i].flen; } - fendoff = foffset + flen; if (fstat(fd, sb) == -1) die(sflag, errno, fstat etfs hostpath); + if (flen == DSIZE_E) { + if (!S_ISREG(sb.st_mode)) +die(sflag, EINVAL, size=e requires reg file); + flen = sb.st_size; + } + fendoff = foffset + flen; if (S_ISREG(sb.st_mode) sb.st_size fendoff) { if (ftruncate(fd, fendoff) == -1) die(sflag, errno, truncate);
CVS commit: src/lib/librumpclient
Module Name:src Committed By: wiz Date: Thu Feb 17 17:03:18 UTC 2011 Modified Files: src/lib/librumpclient: rumpclient.3 Log Message: Use more appropriate markup. Fix a typo. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/librumpclient/rumpclient.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.3 diff -u src/lib/librumpclient/rumpclient.3:1.1 src/lib/librumpclient/rumpclient.3:1.2 --- src/lib/librumpclient/rumpclient.3:1.1 Wed Feb 16 23:45:40 2011 +++ src/lib/librumpclient/rumpclient.3 Thu Feb 17 17:03:17 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: rumpclient.3,v 1.1 2011/02/16 23:45:40 pooka Exp $ +.\ $NetBSD: rumpclient.3,v 1.2 2011/02/17 17:03:17 wiz Exp $ .\ .\ Copyright (c) 2011 Antti Kantee. All rights reserved. .\ @@ -75,7 +75,7 @@ Initialize .Nm . The server address is determined from the environment variable -.Dv RUMP_SERVER +.Ev RUMP_SERVER according to syntax described in .Xr rump_sp 7 . The new process is registered to the rump kernel with the command @@ -92,14 +92,16 @@ .It Fn rumpclient_prefork Low-level routine which instructs the rump kernel that the current process is planning to fork. -The routine returns a non-NULL cookie if succesful. +The routine returns a +.Pf non- Dv NULL +cookie if successful. .It Fn rumpclient_fork_init rfp Low-level routine which works like .Fn rumpclient_init , with the exception that it uses the .Ar rfp context created by a call to -.Xr rumpclient_prefork . +.Fn rumpclient_prefork . This is typically called from the child of a .Xr fork 2 call. @@ -154,7 +156,7 @@ reconnection will be attempted. The value 0 means that reconnection will not be attempted, and all subsequent operations will return the errno -.Dv ENOTCONN . +.Er ENOTCONN . .Pp Additionally, the following special values are accepted: .Bl -tag -width @@ -163,7 +165,7 @@ .It Dv RUMPCLIENT_RETRYCONN_ONCE Attempt reconnect exactly once. What this precisely means depends on the situation: e.g. getting -.Dv EHOSTUNREACH +.Er EHOSTUNREACH immediately or the TCP connection request timeouting are considered to be one retry. .It Dv RUMPCLIENT_RETRYCONN_DIE
CVS commit: src/usr.sbin/acpitools/acpidump
Module Name:src Committed By: wiz Date: Thu Feb 17 17:05:06 UTC 2011 Modified Files: src/usr.sbin/acpitools/acpidump: acpidump.8 Log Message: Sort option descriptions. Merge single-letter options in SYNOPSIS. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/acpitools/acpidump/acpidump.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/acpitools/acpidump/acpidump.8 diff -u src/usr.sbin/acpitools/acpidump/acpidump.8:1.4 src/usr.sbin/acpitools/acpidump/acpidump.8:1.5 --- src/usr.sbin/acpitools/acpidump/acpidump.8:1.4 Thu Feb 17 10:21:02 2011 +++ src/usr.sbin/acpitools/acpidump/acpidump.8 Thu Feb 17 17:05:05 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: acpidump.8,v 1.4 2011/02/17 10:21:02 jmcneill Exp $ +.\ $NetBSD: acpidump.8,v 1.5 2011/02/17 17:05:05 wiz Exp $ .\ ACPI (ACPI Package) .\ .\ Copyright (c) 1999 Doug Rabson d...@freebsd.org @@ -38,12 +38,7 @@ .Nd dump ACPI tables and ASL .Sh SYNOPSIS .Nm -.Op Fl c -.Op Fl d -.Op Fl s -.Op Fl t -.Op Fl h -.Op Fl v +.Op Fl cdhstv .Op Fl f Ar dsdt_input .Op Fl o Ar dsdt_output .Sh DESCRIPTION @@ -148,21 +143,21 @@ Disassemble the DSDT into ASL using .Xr iasl 8 and print the results to stdout. -.It Fl s -Skip tables with bad checksums. -.It Fl t -Dump the contents of the various fixed tables listed above. -.It Fl h -Displays usage and exit. -.It Fl v -Enable verbose messages. .It Fl f Ar dsdt_input Load the DSDT from the specified file instead of physical memory. Since only the DSDT is stored in the file, the .Fl t flag may not be used with this option. +.It Fl h +Displays usage and exit. .It Fl o Ar dsdt_output Store the DSDT data block from physical memory into the specified file. +.It Fl s +Skip tables with bad checksums. +.It Fl t +Dump the contents of the various fixed tables listed above. +.It Fl v +Enable verbose messages. .El .Sh FILES .Bl -tag -width /dev/mem
CVS commit: src/external/bsd/acpica/bin/iasl
Module Name:src Committed By: wiz Date: Thu Feb 17 17:07:55 UTC 2011 Modified Files: src/external/bsd/acpica/bin/iasl: iasl.8 Log Message: Add .An -nosplit to AUTHORS to avoid a new line for Jukka. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/acpica/bin/iasl/iasl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/acpica/bin/iasl/iasl.8 diff -u src/external/bsd/acpica/bin/iasl/iasl.8:1.1 src/external/bsd/acpica/bin/iasl/iasl.8:1.2 --- src/external/bsd/acpica/bin/iasl/iasl.8:1.1 Thu Feb 17 07:48:16 2011 +++ src/external/bsd/acpica/bin/iasl/iasl.8 Thu Feb 17 17:07:55 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: iasl.8,v 1.1 2011/02/17 07:48:16 jruoho Exp $ +.\ $NetBSD: iasl.8,v 1.2 2011/02/17 17:07:55 wiz Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -195,6 +195,7 @@ It first appeared in .Nx 6.0 . .Sh AUTHORS +.An -nosplit Among Intel engineers, .An Robert Moore Aq robert.mo...@intel.com was the chief architect behind
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Thu Feb 17 17:10:18 UTC 2011 Modified Files: src/sys/opencrypto: deflate.c Log Message: The decompressor in sys/net/zlib.c has a bug: It returns Z_BUF_ERROR after a successful decompression in rare cases. A necessary but not sufficient condition seems to be that the decompressed data end exactly at the end of an allocated output buffer. (I can reproduce this reliably with a userland program built against kernel zlib. Userland libz is much newer and not affected.) Since kernel zlib is based on an old version and heavily modified, I don't dare to touch it. So catch this case in the wrapper. Being here, reorder deflate/inflate error handling and add comments to make understandable what is tested and why. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/opencrypto/deflate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/opencrypto/deflate.c diff -u src/sys/opencrypto/deflate.c:1.15 src/sys/opencrypto/deflate.c:1.16 --- src/sys/opencrypto/deflate.c:1.15 Wed Feb 16 19:08:57 2011 +++ src/sys/opencrypto/deflate.c Thu Feb 17 17:10:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: deflate.c,v 1.15 2011/02/16 19:08:57 drochner Exp $ */ +/* $NetBSD: deflate.c,v 1.16 2011/02/17 17:10:18 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/deflate.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */ @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.15 2011/02/16 19:08:57 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: deflate.c,v 1.16 2011/02/17 17:10:18 drochner Exp $); #include sys/types.h #include sys/malloc.h @@ -125,10 +125,22 @@ for (;;) { error = decomp ? inflate(zbuf, Z_SYNC_FLUSH) : deflate(zbuf, Z_FINISH); - if (error != Z_OK error != Z_STREAM_END) + if (error == Z_STREAM_END) /* success */ + break; + /* + * XXX compensate for two problems: + * -Former versions of this code didn't set Z_FINISH + * on compression, so the compressed data are not correctly + * terminated and the decompressor doesn't get Z_STREAM_END. + * Accept such packets for interoperability. + * -sys/net/zlib.c has a bug which makes that Z_BUF_ERROR is + * set after successful decompression under rare conditions. + */ + else if (decomp (error == Z_OK || error == Z_BUF_ERROR) + zbuf.avail_in == 0 zbuf.avail_out != 0) +break; + else if (error != Z_OK) goto bad; - else if (zbuf.avail_in == 0 zbuf.avail_out != 0) - goto end; else if (zbuf.avail_out == 0) { if (i == len) { len += ZBUF; @@ -146,11 +158,9 @@ buf[i].size = size; zbuf.avail_out = buf[i].size; i++; - } else - goto bad; + } } -end: result = count = zbuf.total_out; if (i != 1) { /* copy everything into one buffer */
CVS commit: [bouyer-quota2] src/sbin/fsck_ffs
Module Name:src Committed By: bouyer Date: Thu Feb 17 17:13:48 UTC 2011 Modified Files: src/sbin/fsck_ffs [bouyer-quota2]: setup.c Log Message: Move quota2_check_doquota() call so that an unclean, wapbl filesystem will still be ckecked if a quota inode needs to be created. To generate a diff of this commit: cvs rdiff -u -r1.90.2.1 -r1.90.2.2 src/sbin/fsck_ffs/setup.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_ffs/setup.c diff -u src/sbin/fsck_ffs/setup.c:1.90.2.1 src/sbin/fsck_ffs/setup.c:1.90.2.2 --- src/sbin/fsck_ffs/setup.c:1.90.2.1 Thu Jan 20 14:24:54 2011 +++ src/sbin/fsck_ffs/setup.c Thu Feb 17 17:13:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: setup.c,v 1.90.2.1 2011/01/20 14:24:54 bouyer Exp $ */ +/* $NetBSD: setup.c,v 1.90.2.2 2011/02/17 17:13:48 bouyer Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = @(#)setup.c 8.10 (Berkeley) 5/9/95; #else -__RCSID($NetBSD: setup.c,v 1.90.2.1 2011/01/20 14:24:54 bouyer Exp $); +__RCSID($NetBSD: setup.c,v 1.90.2.2 2011/02/17 17:13:48 bouyer Exp $); #endif #endif /* not lint */ @@ -174,6 +174,10 @@ doskipclean = 0; pwarn(USING ALTERNATE SUPERBLOCK AT %d\n, bflag); } + + if (!quota2_check_doquota()) + doskipclean = 0; + /* ffs_superblock_layout() == 2 */ if (sblock-fs_magic != FS_UFS1_MAGIC || (sblock-fs_old_flags FS_FLAGS_UPDATED) != 0) { @@ -182,7 +186,7 @@ doskipclean = 0; } if (sblock-fs_flags FS_DOWAPBL) { - if (preen skipclean) { + if (preen doskipclean) { if (!quiet) pwarn(file system is journaled; not checking\n); @@ -210,9 +214,6 @@ if (doswap) doskipclean = 0; - if (!quota2_check_doquota()) - doskipclean = 0; - if (sblock-fs_clean FS_ISCLEAN) { if (doskipclean) { if (!quiet)
CVS commit: src/external/apache2/mDNSResponder/dist/mDNSCore
Module Name:src Committed By: joerg Date: Thu Feb 17 17:14:56 UTC 2011 Modified Files: src/external/apache2/mDNSResponder/dist/mDNSCore: DNSDigest.c Log Message: clang is more restrict matching input and output constraints. Input is long, but used are only the lower 32bit. The cast actually saves a byte in the output. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c diff -u src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c:1.1.1.1 src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c:1.2 --- src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c:1.1.1.1 Tue Sep 29 22:14:07 2009 +++ src/external/apache2/mDNSResponder/dist/mDNSCore/DNSDigest.c Thu Feb 17 17:14:56 2011 @@ -529,7 +529,7 @@ asm ( \ roll %1,%0 \ : =r(ret) \ -: I(n), 0(a) \ +: I(n), 0((unsigned int)a) \ : cc); \ ret;\ })
CVS commit: src/lib/librumphijack
Module Name:src Committed By: pooka Date: Thu Feb 17 17:18:08 UTC 2011 Modified Files: src/lib/librumphijack: hijack.c Log Message: Support mount/unmount too. So, things are now generally at a stage where you can mount a file system with a userspace server *without* it having to go through puffs. Say, you first start a server with ffs capability and map a host ffs image into it: rump_server -lrumpvfs -lrumpfs_ffs \ -d key=/ffsimg,hostpath=ffs2.img,size=e unix:///tmp/ffsserv Then, configure your shell to talk to the rump server: setenv RUMP_SERVER unix:///tmp/ffsserv setenv LD_PRELOAD /usr/lib/librumphijack.so Create a mountpoint and mount the file system: pain-rustique:60:~ sh $ cd /rump $ ls dev $ ls -l total 1 drwxr-xr-x 2 root wheel 512 Feb 17 18:00 dev $ mkdir mnt $ mount_ffs /ffsimg /rump/mnt mount_ffs: Warning: realpath /ffsimg: No such file or directory $ df -h mnt FilesystemSize Used Avail %Cap Mounted on /ffsimg 496M 380M91M 80% /mnt $ du -sckh * 192Kdev 380Mmnt 381Mtotal $ umount -R mnt $ df -h mnt FilesystemSize Used Avail %Cap Mounted on rumpfs1.0K 1.0K 0B 100% / $ (note, you need -R to umount due to various degrees of unsuccesful magic it attempts to perform without it) To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/lib/librumphijack/hijack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.47 src/lib/librumphijack/hijack.c:1.48 --- src/lib/librumphijack/hijack.c:1.47 Thu Feb 17 15:20:10 2011 +++ src/lib/librumphijack/hijack.c Thu Feb 17 17:18:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.47 2011/02/17 15:20:10 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.48 2011/02/17 17:18:08 pooka Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: hijack.c,v 1.47 2011/02/17 15:20:10 pooka Exp $); +__RCSID($NetBSD: hijack.c,v 1.48 2011/02/17 17:18:08 pooka Exp $); #define __ssp_weak_name(fun) _hijack_ ## fun @@ -34,8 +34,9 @@ #include sys/types.h #include sys/event.h #include sys/ioctl.h -#include sys/socket.h +#include sys/mount.h #include sys/poll.h +#include sys/socket.h #include sys/statvfs.h #include rump/rumpclient.h @@ -85,6 +86,7 @@ DUALCALL_UTIMES, DUALCALL_LUTIMES, DUALCALL_FUTIMES, DUALCALL_TRUNCATE, DUALCALL_FTRUNCATE, DUALCALL_FSYNC, DUALCALL_FSYNC_RANGE, + DUALCALL_MOUNT, DUALCALL_UNMOUNT, DUALCALL__NUM }; @@ -118,6 +120,7 @@ #endif #define REALREAD _sys_read #define REALGETDENTS __getdents30 +#define REALMOUNT __mount50 int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *); int REALPOLLTS(struct pollfd *, nfds_t, @@ -132,6 +135,7 @@ int REALUTIMES(const char *, const struct timeval [2]); int REALLUTIMES(const char *, const struct timeval [2]); int REALFUTIMES(int, const struct timeval [2]); +int REALMOUNT(const char *, const char *, int, void *, size_t); #define S(a) __STRING(a) struct sysnames { @@ -192,6 +196,8 @@ { DUALCALL_FTRUNCATE, ftruncate, RSYS_NAME(FTRUNCATE) }, { DUALCALL_FSYNC, fsync, RSYS_NAME(FSYNC) }, { DUALCALL_FSYNC_RANGE, fsync_range, RSYS_NAME(FSYNC_RANGE) }, + { DUALCALL_MOUNT, S(REALMOUNT), RSYS_NAME(MOUNT) }, + { DUALCALL_UNMOUNT, unmount, RSYS_NAME(UNMOUNT) }, }; #undef S @@ -1532,3 +1538,20 @@ (const char *path, off_t length),\ (const char *, off_t), \ (path, length)) + +/* + * Note: with mount the decisive parameter is the mount + * destination directory. This is because we don't really know + * about the source directory in a generic call (and besides, + * it might not even exist, cf. nfs). + */ +PATHCALL(int, REALMOUNT, DUALCALL_MOUNT,\ + (const char *type, const char *path, int flags, \ + void *data, size_t dlen), \ + (const char *, const char *, int, void *, size_t), \ + (type, path, flags, data, dlen)) + +PATHCALL(int, unmount, DUALCALL_UNMOUNT,\ + (const char *path, int flags), \ + (const char *, int), \ + (path, flags))
CVS commit: src/lib/libpuffs
Module Name:src Committed By: pooka Date: Thu Feb 17 17:55:36 UTC 2011 Modified Files: src/lib/libpuffs: subr.c Log Message: Support rest of file types in vtype - s_ifmt To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libpuffs/subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libpuffs/subr.c diff -u src/lib/libpuffs/subr.c:1.26 src/lib/libpuffs/subr.c:1.27 --- src/lib/libpuffs/subr.c:1.26 Thu Feb 17 15:41:34 2011 +++ src/lib/libpuffs/subr.c Thu Feb 17 17:55:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr.c,v 1.26 2011/02/17 15:41:34 pooka Exp $ */ +/* $NetBSD: subr.c,v 1.27 2011/02/17 17:55:36 pooka Exp $ */ /* * Copyright (c) 2006 Antti Kantee. All Rights Reserved. @@ -27,7 +27,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: subr.c,v 1.26 2011/02/17 15:41:34 pooka Exp $); +__RCSID($NetBSD: subr.c,v 1.27 2011/02/17 17:55:36 pooka Exp $); #endif /* !lint */ #include sys/types.h @@ -298,6 +298,21 @@ case VBLK: mode |= S_IFBLK; break; + case VSOCK: + mode |= S_IFSOCK; + break; + case VFIFO: + mode |= S_IFIFO; + break; + case VREG: + mode |= S_IFREG; + break; + case VLNK: + mode |= S_IFLNK; + break; + case VDIR: + mode |= S_IFDIR; + break; default: break; }
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: drochner Date: Thu Feb 17 18:07:51 UTC 2011 Modified Files: src/sys/arch/amd64/include: vmparam.h Log Message: make stack size limit (both initial and maximum) for native code the double of that in 32-but emul mode, so that code which works in emulation (or on the i386 port) will likely not overflow the stack if built as native 64-bit program This is still very conservative. (before, the max stack size was natively even less than for 32bit emul) To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amd64/include/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/include/vmparam.h diff -u src/sys/arch/amd64/include/vmparam.h:1.24 src/sys/arch/amd64/include/vmparam.h:1.25 --- src/sys/arch/amd64/include/vmparam.h:1.24 Sun Nov 14 13:33:21 2010 +++ src/sys/arch/amd64/include/vmparam.h Thu Feb 17 18:07:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.24 2010/11/14 13:33:21 uebayasi Exp $ */ +/* $NetBSD: vmparam.h,v 1.25 2011/02/17 18:07:50 drochner Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -80,10 +80,10 @@ #define MAXDSIZ (8L*1024*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ -#define DFLSSIZ (2*1024*1024) /* initial stack size limit */ +#define DFLSSIZ (4*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (32*1024*1024) /* max stack size */ +#define MAXSSIZ (128*1024*1024) /* max stack size */ #endif /*
CVS commit: src
Module Name:src Committed By: joerg Date: Thu Feb 17 18:35:37 UTC 2011 Modified Files: src/external/bsd/llvm: Makefile.inc src/external/bsd/llvm/bin/clang: Makefile src/external/bsd/llvm/bin/tblgen: Makefile src/external/bsd/llvm/lib: Makefile src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers: Makefile Added Files: src/external/bsd/llvm/lib/libclangStaticAnalyzerCore: Makefile src/external/bsd/llvm/lib/libclangStaticAnalyzerFrontend: Makefile src/tools/llvm-lib/libclangStaticAnalyzerCore: Makefile src/tools/llvm-lib/libclangStaticAnalyzerFrontend: Makefile Removed Files: src/external/bsd/llvm/lib/libclangStaticAnalyzer: Makefile src/tools/llvm-lib/libclangStaticAnalyzer: Makefile Log Message: Update LLVM/clang snapshot. This brings in support for .pushsection/.popsection and fixes clang -B to be incremental. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/bin/clang/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/bin/tblgen/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/llvm/lib/Makefile cvs rdiff -u -r1.1 -r0 \ src/external/bsd/llvm/lib/libclangStaticAnalyzer/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/bsd/llvm/lib/libclangStaticAnalyzerCore/Makefile cvs rdiff -u -r0 -r1.1 \ src/external/bsd/llvm/lib/libclangStaticAnalyzerFrontend/Makefile cvs rdiff -u -r1.1 -r0 src/tools/llvm-lib/libclangStaticAnalyzer/Makefile cvs rdiff -u -r0 -r1.1 src/tools/llvm-lib/libclangStaticAnalyzerCore/Makefile cvs rdiff -u -r0 -r1.1 \ src/tools/llvm-lib/libclangStaticAnalyzerFrontend/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/llvm/Makefile.inc diff -u src/external/bsd/llvm/Makefile.inc:1.1 src/external/bsd/llvm/Makefile.inc:1.2 --- src/external/bsd/llvm/Makefile.inc:1.1 Sun Feb 6 01:13:43 2011 +++ src/external/bsd/llvm/Makefile.inc Thu Feb 17 18:35:35 2011 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.1 2011/02/06 01:13:43 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.2 2011/02/17 18:35:35 joerg Exp $ .if !defined(LLVM_TOPLEVEL_MK) LLVM_TOPLEVEL_MK= .include bsd.own.mk -LLVM_REVISION= 124738 -CLANG_REVISION= 124738 +LLVM_REVISION= 125648 +CLANG_REVISION= 125648 LLVM_SRCDIR:= ${.PARSEDIR}/dist/llvm CLANG_SRCDIR:= ${.PARSEDIR}/dist/clang Index: src/external/bsd/llvm/bin/clang/Makefile diff -u src/external/bsd/llvm/bin/clang/Makefile:1.1 src/external/bsd/llvm/bin/clang/Makefile:1.2 --- src/external/bsd/llvm/bin/clang/Makefile:1.1 Sun Feb 6 01:13:44 2011 +++ src/external/bsd/llvm/bin/clang/Makefile Thu Feb 17 18:35:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:44 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ PROG_CXX= clang NOMAN= yes @@ -18,8 +18,9 @@ CLANG_LIBS+= \ clangFrontendTool \ clangFrontend \ + clangStaticAnalyzerFrontend \ clangStaticAnalyzerCheckers \ - clangStaticAnalyzer \ + clangStaticAnalyzerCore \ clangDriver \ clangSerialization \ clangCodeGen \ Index: src/external/bsd/llvm/bin/tblgen/Makefile diff -u src/external/bsd/llvm/bin/tblgen/Makefile:1.1 src/external/bsd/llvm/bin/tblgen/Makefile:1.2 --- src/external/bsd/llvm/bin/tblgen/Makefile:1.1 Sun Feb 6 01:13:49 2011 +++ src/external/bsd/llvm/bin/tblgen/Makefile Thu Feb 17 18:35:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:49 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ PROG_CXX= llvm-tblgen NOMAN= yes @@ -15,6 +15,7 @@ ClangASTNodesEmitter.cpp \ ClangAttrEmitter.cpp \ ClangDiagnosticsEmitter.cpp \ + ClangSACheckersEmitter.cpp \ CodeEmitterGen.cpp \ CodeGenDAGPatterns.cpp \ CodeGenInstruction.cpp \ Index: src/external/bsd/llvm/lib/Makefile diff -u src/external/bsd/llvm/lib/Makefile:1.1 src/external/bsd/llvm/lib/Makefile:1.2 --- src/external/bsd/llvm/lib/Makefile:1.1 Sun Feb 6 01:13:52 2011 +++ src/external/bsd/llvm/lib/Makefile Thu Feb 17 18:35:35 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2011/02/06 01:13:52 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/17 18:35:35 joerg Exp $ SUBDIR= \ libLLVMAnalysis \ @@ -60,7 +60,9 @@ libclangRewrite \ libclangSema \ libclangSerialization \ - libclangStaticAnalyzer \ - libclangStaticAnalyzerCheckers + libclangStaticAnalyzerCheckers \ + libclangStaticAnalyzerCore \ + .WAIT \ + libclangStaticAnalyzerFrontend .include bsd.subdir.mk Index: src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile diff -u src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.1 src/external/bsd/llvm/lib/libclangStaticAnalyzerCheckers/Makefile:1.2 ---
CVS commit: src/sys
Module Name:src Committed By: matt Date: Thu Feb 17 18:44:54 UTC 2011 Modified Files: src/sys/kern: subr_pcu.c src/sys/sys: pcu.h Log Message: Add a bool to pcu_state_save which indicates whether the PCU is going to be released after the save is done. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/kern/subr_pcu.c cvs rdiff -u -r1.1 -r1.2 src/sys/sys/pcu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_pcu.c diff -u src/sys/kern/subr_pcu.c:1.1 src/sys/kern/subr_pcu.c:1.2 --- src/sys/kern/subr_pcu.c:1.1 Thu Feb 17 18:32:29 2011 +++ src/sys/kern/subr_pcu.c Thu Feb 17 18:44:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_pcu.c,v 1.1 2011/02/17 18:32:29 rmind Exp $ */ +/* $NetBSD: subr_pcu.c,v 1.2 2011/02/17 18:44:54 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_pcu.c,v 1.1 2011/02/17 18:32:29 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_pcu.c,v 1.2 2011/02/17 18:44:54 matt Exp $); #include sys/param.h #include sys/cpu.h @@ -98,7 +98,7 @@ return; } if (flags PCU_SAVE) { - pcu-pcu_state_save(l); + pcu-pcu_state_save(l, (flags PCU_RELEASE) != 0); } if (flags PCU_RELEASE) { ci-ci_pcu_curlwp[id] = NULL; @@ -131,7 +131,7 @@ KASSERT(ci-ci_pcu_curlwp[id] == l); if (flags PCU_SAVE) { - pcu-pcu_state_save(l); + pcu-pcu_state_save(l, (flags PCU_RELEASE) != 0); } if (flags PCU_RELEASE) { ci-ci_pcu_curlwp[id] = NULL; Index: src/sys/sys/pcu.h diff -u src/sys/sys/pcu.h:1.1 src/sys/sys/pcu.h:1.2 --- src/sys/sys/pcu.h:1.1 Thu Feb 17 18:32:29 2011 +++ src/sys/sys/pcu.h Thu Feb 17 18:44:54 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcu.h,v 1.1 2011/02/17 18:32:29 rmind Exp $ */ +/* $NetBSD: pcu.h,v 1.2 2011/02/17 18:44:54 matt Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ typedef struct { u_int pcu_id; - void (*pcu_state_save)(lwp_t *); + void (*pcu_state_save)(lwp_t *, bool); void (*pcu_state_load)(lwp_t *, bool); } pcu_ops_t;
CVS commit: src/sys/conf
Module Name:src Committed By: matt Date: Thu Feb 17 18:47:13 UTC 2011 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: If generating a gdb kernel and using dbsym, insert the symbols into it. (This is useful when using the .gdb with an emulator so that ddb in the emulator will have symbols). To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.129 src/sys/conf/Makefile.kern.inc:1.130 --- src/sys/conf/Makefile.kern.inc:1.129 Tue Jan 4 01:52:30 2011 +++ src/sys/conf/Makefile.kern.inc Thu Feb 17 18:47:13 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.129 2011/01/04 01:52:30 matt Exp $ +# $NetBSD: Makefile.kern.inc,v 1.130 2011/02/17 18:47:13 matt Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -249,6 +249,12 @@ LINKFLAGS+= ${LINKFLAGS_DEBUG} EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.gdb@} CTFFLAGS+= -g +SYSTEM_LD_TAIL+=; \ + if grep '^\#define.*SYMTAB_SPACE' opt_ddbparam.h /dev/null; then \ + echo ${DBSYM} $@.gdb; \ + ${DBSYM} $@.gdb; \ + fi + .elifndef PROF LINKFLAGS+= ${LINKFLAGS_NORMAL} .endif
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Thu Feb 17 18:50:02 UTC 2011 Modified Files: src/sys/kern: kern_lwp.c Log Message: When freeing a lwp, make sure it's biglock count is 0. To generate a diff of this commit: cvs rdiff -u -r1.154 -r1.155 src/sys/kern/kern_lwp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_lwp.c diff -u src/sys/kern/kern_lwp.c:1.154 src/sys/kern/kern_lwp.c:1.155 --- src/sys/kern/kern_lwp.c:1.154 Mon Jan 17 08:26:58 2011 +++ src/sys/kern/kern_lwp.c Thu Feb 17 18:50:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_lwp.c,v 1.154 2011/01/17 08:26:58 matt Exp $ */ +/* $NetBSD: kern_lwp.c,v 1.155 2011/02/17 18:50:02 matt Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -211,7 +211,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.154 2011/01/17 08:26:58 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_lwp.c,v 1.155 2011/02/17 18:50:02 matt Exp $); #include opt_ddb.h #include opt_lockdebug.h @@ -1076,6 +1076,7 @@ KASSERT(SLIST_EMPTY(l-l_pi_lenders)); KASSERT(l-l_inheritedprio == -1); + KASSERT(l-l_blcnt == 0); kdtrace_thread_dtor(NULL, l); if (!recycle) pool_cache_put(lwp_cache, l);
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Thu Feb 17 18:55:32 UTC 2011 Modified Files: src/sys/kern: subr_kmem.c Log Message: Init kmem_guard_depth to 0 so it will be placed in .data so it can be patched with gdb. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/kern/subr_kmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_kmem.c diff -u src/sys/kern/subr_kmem.c:1.33 src/sys/kern/subr_kmem.c:1.34 --- src/sys/kern/subr_kmem.c:1.33 Thu Feb 11 23:13:46 2010 +++ src/sys/kern/subr_kmem.c Thu Feb 17 18:55:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_kmem.c,v 1.33 2010/02/11 23:13:46 haad Exp $ */ +/* $NetBSD: subr_kmem.c,v 1.34 2011/02/17 18:55:31 matt Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_kmem.c,v 1.33 2010/02/11 23:13:46 haad Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_kmem.c,v 1.34 2011/02/17 18:55:31 matt Exp $); #include sys/param.h #include sys/callback.h @@ -101,7 +101,7 @@ static int kmem_cache_shift; #if defined(DEBUG) -int kmem_guard_depth; +int kmem_guard_depth = 0; size_t kmem_guard_size; static struct uvm_kmguard kmem_guard; static void *kmem_freecheck;
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Thu Feb 17 19:02:51 UTC 2011 Modified Files: src/sys/kern: sys_aio.c Log Message: Remove curproc == NULL test. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/kern/sys_aio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_aio.c diff -u src/sys/kern/sys_aio.c:1.36 src/sys/kern/sys_aio.c:1.37 --- src/sys/kern/sys_aio.c:1.36 Fri Dec 17 22:05:36 2010 +++ src/sys/kern/sys_aio.c Thu Feb 17 19:02:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_aio.c,v 1.36 2010/12/17 22:05:36 yamt Exp $ */ +/* $NetBSD: sys_aio.c,v 1.37 2011/02/17 19:02:50 matt Exp $ */ /* * Copyright (c) 2007 Mindaugas Rasiukevicius rmind at NetBSD org @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.36 2010/12/17 22:05:36 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: sys_aio.c,v 1.37 2011/02/17 19:02:50 matt Exp $); #ifdef _KERNEL_OPT #include opt_ddb.h @@ -1149,7 +1149,7 @@ void aio_print_jobs(void (*pr)(const char *, ...)) { - struct proc *p = (curlwp == NULL ? NULL : curlwp-l_proc); + struct proc *p = curlwp-l_proc; struct aioproc *aio; struct aio_job *a_job; struct aiocb *aiocbp;
CVS commit: src/sys
Module Name:src Committed By: matt Date: Thu Feb 17 19:27:13 UTC 2011 Modified Files: src/sys/kern: kern_kthread.c src/sys/uvm: uvm_extern.h uvm_glue.c Log Message: Add support for cpu-specific uarea allocation routines. Allows different allocation for user and system lwps. MIPS will use this to map uareas of system lwp used direct-mapped addresses (to reduce the overhead of switching to kernel threads). ibm4xx could use to map uareas via direct mapped addresses and avoid the problem of having the kernel stack not in the TLB. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/kern/kern_kthread.c cvs rdiff -u -r1.170 -r1.171 src/sys/uvm/uvm_extern.h cvs rdiff -u -r1.147 -r1.148 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_kthread.c diff -u src/sys/kern/kern_kthread.c:1.30 src/sys/kern/kern_kthread.c:1.31 --- src/sys/kern/kern_kthread.c:1.30 Sun Jun 13 04:13:31 2010 +++ src/sys/kern/kern_kthread.c Thu Feb 17 19:27:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_kthread.c,v 1.30 2010/06/13 04:13:31 yamt Exp $ */ +/* $NetBSD: kern_kthread.c,v 1.31 2011/02/17 19:27:13 matt Exp $ */ /*- * Copyright (c) 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.30 2010/06/13 04:13:31 yamt Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_kthread.c,v 1.31 2011/02/17 19:27:13 matt Exp $); #include sys/param.h #include sys/systm.h @@ -70,8 +70,8 @@ va_list ap; lwp_flags = LWP_DETACHED; - - uaddr = uvm_uarea_alloc(); + + uaddr = uvm_uarea_system_alloc(); if (uaddr == 0) { return ENOMEM; } @@ -88,7 +88,7 @@ error = lwp_create(lwp0, proc0, uaddr, lwp_flags, NULL, 0, func, arg, l, lc); if (error) { - uvm_uarea_free(uaddr); + uvm_uarea_system_free(uaddr); return error; } if (fmt != NULL) { Index: src/sys/uvm/uvm_extern.h diff -u src/sys/uvm/uvm_extern.h:1.170 src/sys/uvm/uvm_extern.h:1.171 --- src/sys/uvm/uvm_extern.h:1.170 Thu Feb 10 14:46:44 2011 +++ src/sys/uvm/uvm_extern.h Thu Feb 17 19:27:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_extern.h,v 1.170 2011/02/10 14:46:44 pooka Exp $ */ +/* $NetBSD: uvm_extern.h,v 1.171 2011/02/17 19:27:13 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -623,6 +623,8 @@ __dead void uvm_scheduler(void); vaddr_t uvm_uarea_alloc(void); void uvm_uarea_free(vaddr_t); +vaddr_t uvm_uarea_system_alloc(void); +void uvm_uarea_system_free(vaddr_t); vaddr_t uvm_lwp_getuarea(lwp_t *); void uvm_lwp_setuarea(lwp_t *, vaddr_t); int uvm_vslock(struct vmspace *, void *, size_t, vm_prot_t); Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.147 src/sys/uvm/uvm_glue.c:1.148 --- src/sys/uvm/uvm_glue.c:1.147 Wed Feb 2 15:25:27 2011 +++ src/sys/uvm/uvm_glue.c Thu Feb 17 19:27:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.147 2011/02/02 15:25:27 chuck Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.148 2011/02/17 19:27:13 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.147 2011/02/02 15:25:27 chuck Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_glue.c,v 1.148 2011/02/17 19:27:13 matt Exp $); #include opt_kgdb.h #include opt_kstack.h @@ -238,6 +238,11 @@ #endif static pool_cache_t uvm_uarea_cache; +#if defined(__HAVE_CPU_UAREA_ROUTINES) +static pool_cache_t uvm_uarea_system_cache; +#else +#define uvm_uarea_system_cache uvm_uarea_cache +#endif static void * uarea_poolpage_alloc(struct pool *pp, int flags) @@ -257,6 +262,11 @@ return (void *)va; } #endif +#if defined(__HAVE_CPU_UAREA_ROUTINES) + void *va = cpu_uarea_alloc(false); + if (va) + return (void *)va; +#endif return (void *)uvm_km_alloc(kernel_map, pp-pr_alloc-pa_pagesz, USPACE_ALIGN, UVM_KMF_WIRED | ((flags PR_WAITOK) ? UVM_KMF_WAITVA : @@ -276,6 +286,10 @@ return; } #endif +#if defined(__HAVE_CPU_UAREA_ROUTINES) + if (cpu_uarea_free(addr)) + return; +#endif uvm_km_free(kernel_map, (vaddr_t)addr, pp-pr_alloc-pa_pagesz, UVM_KMF_WIRED); } @@ -286,6 +300,29 @@ .pa_pagesz = USPACE, }; +#if defined(__HAVE_CPU_UAREA_ROUTINES) +static void * +uarea_system_poolpage_alloc(struct pool *pp, int flags) +{ + void * const va = cpu_uarea_alloc(true); + KASSERT(va != NULL); + return va; +} + +static void +uarea_system_poolpage_free(struct pool *pp, void *addr) +{ + if (!cpu_uarea_free(addr)) + panic(%s: failed to free uarea %p, __func__, addr); +} + +static struct pool_allocator uvm_uarea_system_allocator = { + .pa_alloc = uarea_system_poolpage_alloc, + .pa_free = uarea_system_poolpage_free, + .pa_pagesz = USPACE, +}; +#endif /* __HAVE_CPU_UAREA_ROUTINES */ + void uvm_uarea_init(void) { @@ -304,6 +341,11 @@
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Thu Feb 17 19:28:46 UTC 2011 Modified Files: src/sys/sys: lwp.h Log Message: Move lwp_getpcb to the area with the rest of the _KERNEL function declarations. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.143 src/sys/sys/lwp.h:1.144 --- src/sys/sys/lwp.h:1.143 Thu Feb 17 18:32:29 2011 +++ src/sys/sys/lwp.h Thu Feb 17 19:28:46 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.143 2011/02/17 18:32:29 rmind Exp $ */ +/* $NetBSD: lwp.h,v 1.144 2011/02/17 19:28:46 matt Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 @@ -45,6 +45,9 @@ #include sys/specificdata.h #include sys/syncobj.h #include sys/resource.h +#if defined(_KERNEL) || defined(_KMEMUSER) +#include sys/pcu.h +#endif #if defined(_KERNEL) #include machine/cpu.h /* curcpu() and cpu_info */ @@ -67,6 +70,7 @@ * Fields are clustered together by usage (to increase the likelyhood * of cache hits) and by size (to reduce dead space in the structure). */ +#if defined(_KERNEL) || defined(_KMEMUSER) struct lockdebug; struct sadata_vp; struct sysent; @@ -193,6 +197,7 @@ struct kdtrace_thread *l_dtrace; /* (: DTrace-specific data. */ }; +#endif /* _KERNEL || _KMEMUSER */ /* * UAREA_PCB_OFFSET: an offset of PCB structure in the uarea. MD code may @@ -202,13 +207,6 @@ #define UAREA_PCB_OFFSET 0 #endif -static __inline void * -lwp_getpcb(struct lwp *l) -{ - - return l-l_addr; -} - LIST_HEAD(lwplist, lwp); /* A list of LWPs. */ #ifdef _KERNEL @@ -290,6 +288,13 @@ lwp_update_creds(l); \ } while (/* CONSTCOND */ 0) +static __inline void * +lwp_getpcb(struct lwp *l) +{ + + return l-l_addr; +} + void lwpinit(void); void lwp0_init(void); void lwp_sys_init(void);
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Thu Feb 17 19:29:41 UTC 2011 Modified Files: src/sys/sys: userret.h Log Message: Make sure that biglock is unlocked before returning to userspace. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/sys/userret.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/userret.h diff -u src/sys/sys/userret.h:1.20 src/sys/sys/userret.h:1.21 --- src/sys/sys/userret.h:1.20 Wed Feb 25 19:58:03 2009 +++ src/sys/sys/userret.h Thu Feb 17 19:29:41 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: userret.h,v 1.20 2009/02/25 19:58:03 mhitch Exp $ */ +/* $NetBSD: userret.h,v 1.21 2011/02/17 19:29:41 matt Exp $ */ /*- * Copyright (c) 1998, 2000, 2003, 2006, 2008 The NetBSD Foundation, Inc. @@ -80,6 +80,9 @@ struct cpu_info *ci; #endif + KASSERT(l-l_blcnt == 0); + KASSERT(curcpu()-ci_biglock_count == 0); + /* * Handle exceptional events: pending signals, stop/exit actions, * etc. Note that the event must be flagged BEFORE any AST is
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Feb 17 19:36:49 UTC 2011 Modified Files: src/sys/dev/acpi: acpi.c acpi_wakedev.c acpi_wakedev.h acpivar.h Log Message: As explained in the new ACPICA documentation, as of ACPICA 20101207, the _PRW methods are no longer automatically executed as part of the ACPICA initialization. Refactor and rewrite the wake-device code to account this. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/acpi/acpi_wakedev.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_wakedev.h cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.235 src/sys/dev/acpi/acpi.c:1.236 --- src/sys/dev/acpi/acpi.c:1.235 Tue Feb 15 20:24:11 2011 +++ src/sys/dev/acpi/acpi.c Thu Feb 17 19:36:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.235 2011/02/15 20:24:11 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.236 2011/02/17 19:36:49 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -100,7 +100,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.235 2011/02/15 20:24:11 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi.c,v 1.236 2011/02/17 19:36:49 jruoho Exp $); #include opt_acpi.h #include opt_pcifixup.h @@ -685,6 +685,14 @@ (void)acpi_rescan(sc-sc_dev, NULL, NULL); /* + * Update GPE information. + * + * Note that this must be called after + * all GPE handlers have been installed. + */ + (void)AcpiUpdateAllGpes(); + + /* * Defer rest of the configuration. */ (void)config_defer(sc-sc_dev, acpi_rescan_capabilities); @@ -724,6 +732,7 @@ ad-ad_device = NULL; ad-ad_notify = NULL; ad-ad_pciinfo = NULL; + ad-ad_wakedev = NULL; ad-ad_type = type; ad-ad_handle = handle; @@ -735,6 +744,13 @@ acpi_set_node(ad); acpi_make_name(ad, devinfo-Name); + /* + * Identify wake GPEs from the _PRW. Note that + * AcpiUpdateAllGpes() must be called afterwards. + */ + if (ad-ad_devinfo-Type == ACPI_TYPE_DEVICE) + acpi_wakedev_init(ad); + SIMPLEQ_INIT(ad-ad_child_head); SIMPLEQ_INSERT_TAIL(sc-ad_head, ad, ad_list); @@ -940,9 +956,7 @@ /* * Scan wake-up capabilities. */ - rv = AcpiGetHandle(ad-ad_handle, _PRW, tmp); - - if (ACPI_SUCCESS(rv)) { + if (ad-ad_wakedev != NULL) { ad-ad_flags |= ACPI_DEVICE_WAKEUP; acpi_wakedev_add(ad); } Index: src/sys/dev/acpi/acpi_wakedev.c diff -u src/sys/dev/acpi/acpi_wakedev.c:1.21 src/sys/dev/acpi/acpi_wakedev.c:1.22 --- src/sys/dev/acpi/acpi_wakedev.c:1.21 Thu Feb 17 10:49:29 2011 +++ src/sys/dev/acpi/acpi_wakedev.c Thu Feb 17 19:36:49 2011 @@ -1,7 +1,7 @@ -/* $NetBSD: acpi_wakedev.c,v 1.21 2011/02/17 10:49:29 jruoho Exp $ */ +/* $NetBSD: acpi_wakedev.c,v 1.22 2011/02/17 19:36:49 jruoho Exp $ */ /*- - * Copyright (c) 2009, 2010 Jared D. McNeill jmcne...@invisible.ca + * Copyright (c) 2009, 2010, 2011 Jared D. McNeill jmcne...@invisible.ca * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,12 +27,13 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.21 2011/02/17 10:49:29 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_wakedev.c,v 1.22 2011/02/17 19:36:49 jruoho Exp $); #include sys/param.h #include sys/device.h #include sys/sysctl.h #include sys/systm.h +#include sys/malloc.h #include dev/acpi/acpireg.h #include dev/acpi/acpivar.h @@ -51,62 +52,164 @@ NULL, }; +MALLOC_DECLARE(M_ACPI); + static int32_t acpi_wakedev_acpinode = CTL_EOL; static int32_t acpi_wakedev_wakenode = CTL_EOL; -static void acpi_wakedev_method(struct acpi_devnode *, int, int); -static void acpi_wakedev_gpe(struct acpi_devnode *, int, int); static void acpi_wakedev_power(struct acpi_devnode *, ACPI_OBJECT *); +static void acpi_wakedev_set(struct acpi_devnode *, int); +static void acpi_wakedev_method(struct acpi_devnode *, int); -SYSCTL_SETUP(sysctl_acpi_wakedev_setup, sysctl hw.acpi.wake subtree setup) +void +acpi_wakedev_init(struct acpi_devnode *ad) { - const struct sysctlnode *rnode; - int err; + ACPI_OBJECT *elm, *obj; + ACPI_HANDLE hdl = NULL; + ACPI_INTEGER val = 0; + ACPI_BUFFER buf; + ACPI_STATUS rv; - err = sysctl_createv(NULL, 0, NULL, rnode, - CTLFLAG_PERMANENT, CTLTYPE_NODE, hw, - NULL, NULL, 0, NULL, 0, - CTL_HW, CTL_EOL); + rv = acpi_eval_struct(ad-ad_handle, _PRW, buf); - if (err != 0) - return; + if (ACPI_FAILURE(rv)) + goto out; - err = sysctl_createv(NULL, 0, rnode, rnode, - CTLFLAG_PERMANENT, CTLTYPE_NODE, acpi, - NULL, NULL, 0, NULL, 0, - CTL_CREATE, CTL_EOL); + obj = buf.Pointer; - if (err != 0) + if (obj-Type != ACPI_TYPE_PACKAGE) { + rv = AE_TYPE; + goto out; + } + + if (obj-Package.Count 2) { + rv = AE_LIMIT; + goto out; + } +
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: christos Date: Thu Feb 17 19:38:49 UTC 2011 Modified Files: src/sys/lib/libsa: loadfile_elf32.c Log Message: fix -Wself-assign warning To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/lib/libsa/loadfile_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libsa/loadfile_elf32.c diff -u src/sys/lib/libsa/loadfile_elf32.c:1.27 src/sys/lib/libsa/loadfile_elf32.c:1.28 --- src/sys/lib/libsa/loadfile_elf32.c:1.27 Wed Sep 15 20:26:49 2010 +++ src/sys/lib/libsa/loadfile_elf32.c Thu Feb 17 14:38:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_elf32.c,v 1.27 2010/09/16 00:26:49 jym Exp $ */ +/* $NetBSD: loadfile_elf32.c,v 1.28 2011/02/17 19:38:48 christos Exp $ */ /*- * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc. @@ -265,254 +265,254 @@ int first; Elf_Addr shpp; Elf_Addr minp = ~0, maxp = 0, pos = 0, elfp = 0; - u_long offset = marks[MARK_START]; - ssize_t nr; - struct __packed { - Elf_Nhdr nh; - uint8_t name[ELF_NOTE_NETBSD_NAMESZ + 1]; - uint8_t desc[ELF_NOTE_NETBSD_DESCSZ]; - } note; - char *shstr = NULL; - int boot_load_ctf=1; - - /* some ports dont use the offset */ - offset = offset; - - internalize_ehdr(elf-e_ident[EI_DATA], elf); - - sz = elf-e_phnum * sizeof(Elf_Phdr); - phdr = ALLOC(sz); - - if (lseek(fd, elf-e_phoff, SEEK_SET) == -1) { - WARN((lseek phdr)); - goto freephdr; - } - nr = read(fd, phdr, sz); - if (nr == -1) { - WARN((read program headers)); - goto freephdr; - } - if (nr != sz) { - errno = EIO; - WARN((read program headers)); - goto freephdr; - } +u_long offset = marks[MARK_START]; +ssize_t nr; +struct __packed { + Elf_Nhdr nh; + uint8_t name[ELF_NOTE_NETBSD_NAMESZ + 1]; + uint8_t desc[ELF_NOTE_NETBSD_DESCSZ]; +} note; +char *shstr = NULL; +int boot_load_ctf=1; + +/* some ports dont use the offset */ +(void)offset; + +internalize_ehdr(elf-e_ident[EI_DATA], elf); + +sz = elf-e_phnum * sizeof(Elf_Phdr); +phdr = ALLOC(sz); + +if (lseek(fd, elf-e_phoff, SEEK_SET) == -1) { + WARN((lseek phdr)); + goto freephdr; +} +nr = read(fd, phdr, sz); +if (nr == -1) { + WARN((read program headers)); + goto freephdr; +} +if (nr != sz) { + errno = EIO; + WARN((read program headers)); + goto freephdr; +} - for (first = 1, i = 0; i elf-e_phnum; i++) { - internalize_phdr(elf-e_ident[EI_DATA], phdr[i]); +for (first = 1, i = 0; i elf-e_phnum; i++) { + internalize_phdr(elf-e_ident[EI_DATA], phdr[i]); #ifndef MD_LOADSEG /* Allow processor ABI specific segment loads */ #define MD_LOADSEG(a) /*CONSTCOND*/0 #endif - if (MD_LOADSEG(phdr[i])) - goto loadseg; + if (MD_LOADSEG(phdr[i])) + goto loadseg; - if (phdr[i].p_type != PT_LOAD || - (phdr[i].p_flags (PF_W|PF_X)) == 0) - continue; + if (phdr[i].p_type != PT_LOAD || + (phdr[i].p_flags (PF_W|PF_X)) == 0) + continue; #define IS_TEXT(p) (p.p_flags PF_X) #define IS_DATA(p) (p.p_flags PF_W) #define IS_BSS(p) (p.p_filesz p.p_memsz) - /* - * XXX: Assume first address is lowest - */ - if ((IS_TEXT(phdr[i]) (flags LOAD_TEXT)) || - (IS_DATA(phdr[i]) (flags LOAD_DATA))) { - - loadseg: - if (marks[MARK_DATA] == 0 IS_DATA(phdr[i])) -marks[MARK_DATA] = LOADADDR(phdr[i].p_vaddr); - - /* Read in segment. */ - PROGRESS((%s%lu, first ? : +, - (u_long)phdr[i].p_filesz)); - - if (lseek(fd, phdr[i].p_offset, SEEK_SET) == -1) { -WARN((lseek text)); -goto freephdr; - } - nr = READ(fd, phdr[i].p_vaddr, phdr[i].p_filesz); - if (nr == -1) { -WARN((read text error)); -goto freephdr; - } - if (nr != (ssize_t)phdr[i].p_filesz) { -errno = EIO; -WARN((read text)); -goto freephdr; - } - first = 0; - - } - if ((IS_TEXT(phdr[i]) (flags (LOAD_TEXT|COUNT_TEXT))) || - (IS_DATA(phdr[i]) (flags (LOAD_DATA|COUNT_TEXT { - pos = phdr[i].p_vaddr; - if (minp pos) -minp = pos; - pos += phdr[i].p_filesz; - if (maxp pos) -maxp = pos; - } - - /* Zero out bss. */ - if (IS_BSS(phdr[i]) (flags LOAD_BSS)) { - PROGRESS((+%lu, - (u_long)(phdr[i].p_memsz - phdr[i].p_filesz))); - BZERO((phdr[i].p_vaddr + phdr[i].p_filesz), - phdr[i].p_memsz - phdr[i].p_filesz); - } - if (IS_BSS(phdr[i]) (flags (LOAD_BSS|COUNT_BSS))) { - pos += phdr[i].p_memsz - phdr[i].p_filesz; - if (maxp pos) -maxp = pos; - } - } - DEALLOC(phdr, sz); + /* + * XXX: Assume first address is lowest + */ + if ((IS_TEXT(phdr[i]) (flags LOAD_TEXT)) || + (IS_DATA(phdr[i]) (flags LOAD_DATA))) { + + loadseg: + if (marks[MARK_DATA] == 0 IS_DATA(phdr[i])) + marks[MARK_DATA] = LOADADDR(phdr[i].p_vaddr); + + /* Read in segment. */ + PROGRESS((%s%lu, first ? : +, + (u_long)phdr[i].p_filesz)); +
CVS commit: src
Module Name:src Committed By: rmind Date: Thu Feb 17 19:58:35 UTC 2011 Modified Files: src/distrib/sets/lists/comp: mi src/sys/sys: Makefile pcu.h Log Message: Fix sys/pcu.h build breakage. To generate a diff of this commit: cvs rdiff -u -r1.1588 -r1.1589 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.128 -r1.129 src/sys/sys/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/sys/pcu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1588 src/distrib/sets/lists/comp/mi:1.1589 --- src/distrib/sets/lists/comp/mi:1.1588 Wed Feb 16 23:48:51 2011 +++ src/distrib/sets/lists/comp/mi Thu Feb 17 19:58:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1588 2011/02/16 23:48:51 pooka Exp $ +# $NetBSD: mi,v 1.1589 2011/02/17 19:58:34 rmind Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2104,6 +2104,7 @@ ./usr/include/sys/null.h comp-c-include ./usr/include/sys/optstr.h comp-obsolete obsolete ./usr/include/sys/param.h comp-c-include +./usr/include/sys/pcu.hcomp-c-include ./usr/include/sys/pipe.h comp-c-include ./usr/include/sys/pmc.hcomp-c-include ./usr/include/sys/pmf.hcomp-obsolete obsolete Index: src/sys/sys/Makefile diff -u src/sys/sys/Makefile:1.128 src/sys/sys/Makefile:1.129 --- src/sys/sys/Makefile:1.128 Sat Sep 25 01:42:40 2010 +++ src/sys/sys/Makefile Thu Feb 17 19:58:34 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.128 2010/09/25 01:42:40 matt Exp $ +# $NetBSD: Makefile,v 1.129 2011/02/17 19:58:34 rmind Exp $ .include bsd.sys.mk @@ -24,7 +24,7 @@ malloc.h mallocvar.h mbuf.h md4.h md5.h midiio.h \ mman.h module.h mount.h mqueue.h msg.h msgbuf.h mtio.h mutex.h \ namei.h null.h \ - param.h pipe.h pmc.h poll.h pool.h power.h proc.h \ + param.h pcu.h pipe.h pmc.h poll.h pool.h power.h proc.h \ protosw.h pset.h ptrace.h ptree.h \ queue.h \ ras.h rbtree.h reboot.h radioio.h resource.h resourcevar.h rmd160.h \ Index: src/sys/sys/pcu.h diff -u src/sys/sys/pcu.h:1.2 src/sys/sys/pcu.h:1.3 --- src/sys/sys/pcu.h:1.2 Thu Feb 17 18:44:54 2011 +++ src/sys/sys/pcu.h Thu Feb 17 19:58:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcu.h,v 1.2 2011/02/17 18:44:54 matt Exp $ */ +/* $NetBSD: pcu.h,v 1.3 2011/02/17 19:58:34 rmind Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -32,10 +32,6 @@ #ifndef _SYS_PCU_H_ #define _SYS_PCU_H_ -#if !defined(_KERNEL) !defined(_KMEMUSER) -#error Kernel-only header -#endif - /* * Default: one PCU for MD. */ @@ -43,6 +39,8 @@ #define PCU_UNIT_COUNT 1 #endif +#if defined(_KERNEL) + typedef struct { u_int pcu_id; void (*pcu_state_save)(lwp_t *, bool); @@ -55,3 +53,5 @@ bool pcu_used(const pcu_ops_t *, lwp_t *); #endif + +#endif
CVS commit: src/sys/netipsec
Module Name:src Committed By: drochner Date: Thu Feb 17 20:20:18 UTC 2011 Modified Files: src/sys/netipsec: ipsec_input.c Log Message: handle some unlikely IPv6 error case like everywhere else: free mbuf, inc statcounter. from OpenBSD being here, fix a diagnostic output To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/netipsec/ipsec_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.24 src/sys/netipsec/ipsec_input.c:1.25 --- src/sys/netipsec/ipsec_input.c:1.24 Wed Feb 16 18:39:33 2011 +++ src/sys/netipsec/ipsec_input.c Thu Feb 17 20:20:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.24 2011/02/16 18:39:33 drochner Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.25 2011/02/17 20:20:18 drochner Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.24 2011/02/16 18:39:33 drochner Exp $); +__KERNEL_RCSID(0, $NetBSD: ipsec_input.c,v 1.25 2011/02/17 20:20:18 drochner Exp $); /* * IPsec input processing. @@ -477,6 +477,9 @@ if (*offp sizeof(struct ip6_hdr)) { DPRINTF((ipsec6_common_input: bad offset %u\n, *offp)); + IPSEC_ISTAT(proto, ESP_STAT_HDROPS, AH_STAT_HDROPS, + IPCOMP_STAT_HDROPS); + m_freem(*mp); return IPPROTO_DONE; } else if (*offp == sizeof(struct ip6_hdr)) { protoff = offsetof(struct ip6_hdr, ip6_nxt); @@ -492,7 +495,8 @@ l = (ip6e.ip6e_len + 2) 2; else l = (ip6e.ip6e_len + 1) 3; - IPSEC_ASSERT(l 0, (ah6_input: l went zero or negative)); + IPSEC_ASSERT(l 0, + (ipsec6_common_input: l went zero or negative)); } while (protoff + l *offp); /* Malformed packet check */
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Feb 17 20:55:02 UTC 2011 Modified Files: src/sys/sys: lwp.h Log Message: don't include things twice. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.144 src/sys/sys/lwp.h:1.145 --- src/sys/sys/lwp.h:1.144 Thu Feb 17 14:28:46 2011 +++ src/sys/sys/lwp.h Thu Feb 17 15:55:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.144 2011/02/17 19:28:46 matt Exp $ */ +/* $NetBSD: lwp.h,v 1.145 2011/02/17 20:55:01 christos Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 @@ -39,7 +39,6 @@ #include sys/callout.h #include sys/mutex.h #include sys/condvar.h -#include sys/pcu.h #include sys/signalvar.h #include sys/sched.h #include sys/specificdata.h
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Feb 17 21:02:26 UTC 2011 Modified Files: src/sys/sys: lwp.h Log Message: Need pcu.h unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/lwp.h diff -u src/sys/sys/lwp.h:1.145 src/sys/sys/lwp.h:1.146 --- src/sys/sys/lwp.h:1.145 Thu Feb 17 15:55:01 2011 +++ src/sys/sys/lwp.h Thu Feb 17 16:02:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.145 2011/02/17 20:55:01 christos Exp $ */ +/* $NetBSD: lwp.h,v 1.146 2011/02/17 21:02:26 christos Exp $ */ /*- * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010 @@ -44,9 +44,7 @@ #include sys/specificdata.h #include sys/syncobj.h #include sys/resource.h -#if defined(_KERNEL) || defined(_KMEMUSER) #include sys/pcu.h -#endif #if defined(_KERNEL) #include machine/cpu.h /* curcpu() and cpu_info */
CVS commit: src/sys/sys
Module Name:src Committed By: joerg Date: Thu Feb 17 21:06:26 UTC 2011 Modified Files: src/sys/sys: cdefs_elf.h Log Message: Revert 1.34 now that clang supports .pushsection / .popsection. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/sys/cdefs_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cdefs_elf.h diff -u src/sys/sys/cdefs_elf.h:1.34 src/sys/sys/cdefs_elf.h:1.35 --- src/sys/sys/cdefs_elf.h:1.34 Wed Dec 8 01:18:55 2010 +++ src/sys/sys/cdefs_elf.h Thu Feb 17 21:06:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs_elf.h,v 1.34 2010/12/08 01:18:55 joerg Exp $ */ +/* $NetBSD: cdefs_elf.h,v 1.35 2011/02/17 21:06:26 joerg Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -70,16 +70,10 @@ #define __weak_reference(sym) ; __asm(.weak _C_LABEL_STRING(#sym)) #endif -#if defined(__clang__) -#define __warn_references(sym,msg) \ -static __attribute__((__used__, __section__(.gnu.warning. #sym))) \ -const char ___CONCAT(__warn_reference_##sym,__COUNTER__)[] = msg; -#else #define __warn_references(sym,msg) \ __asm(.pushsection .gnu.warning. #sym \n \ .ascii \ msg \\n \ .popsection); -#endif #else /* !__STDC__ */ @@ -106,11 +100,7 @@ #endif /* !__STDC__ */ -#if defined(__clang__) -#define __SECTIONSTRING(_sec, _str) \ - static __attribute__((__used__, __section__(#_sec))) const char \ - ___CONCAT(__sectstr,__COUNTER__)[] = _str -#elif __STDC__ +#if __STDC__ #define __SECTIONSTRING(_sec, _str) \ __asm(.pushsection #_sec \n\ .asciz \ _str \\n \
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: christos Date: Thu Feb 17 21:15:31 UTC 2011 Modified Files: src/sys/lib/libsa: loadfile_elf32.c Log Message: revert bad whitespace change. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libsa/loadfile_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libsa/loadfile_elf32.c diff -u src/sys/lib/libsa/loadfile_elf32.c:1.28 src/sys/lib/libsa/loadfile_elf32.c:1.29 --- src/sys/lib/libsa/loadfile_elf32.c:1.28 Thu Feb 17 14:38:48 2011 +++ src/sys/lib/libsa/loadfile_elf32.c Thu Feb 17 16:15:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_elf32.c,v 1.28 2011/02/17 19:38:48 christos Exp $ */ +/* $NetBSD: loadfile_elf32.c,v 1.29 2011/02/17 21:15:31 christos Exp $ */ /*- * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc. @@ -265,254 +265,254 @@ int first; Elf_Addr shpp; Elf_Addr minp = ~0, maxp = 0, pos = 0, elfp = 0; -u_long offset = marks[MARK_START]; -ssize_t nr; -struct __packed { - Elf_Nhdr nh; - uint8_t name[ELF_NOTE_NETBSD_NAMESZ + 1]; - uint8_t desc[ELF_NOTE_NETBSD_DESCSZ]; -} note; -char *shstr = NULL; -int boot_load_ctf=1; - -/* some ports dont use the offset */ -(void)offset; - -internalize_ehdr(elf-e_ident[EI_DATA], elf); - -sz = elf-e_phnum * sizeof(Elf_Phdr); -phdr = ALLOC(sz); - -if (lseek(fd, elf-e_phoff, SEEK_SET) == -1) { - WARN((lseek phdr)); - goto freephdr; -} -nr = read(fd, phdr, sz); -if (nr == -1) { - WARN((read program headers)); - goto freephdr; -} -if (nr != sz) { - errno = EIO; - WARN((read program headers)); - goto freephdr; -} + u_long offset = marks[MARK_START]; + ssize_t nr; + struct __packed { + Elf_Nhdr nh; + uint8_t name[ELF_NOTE_NETBSD_NAMESZ + 1]; + uint8_t desc[ELF_NOTE_NETBSD_DESCSZ]; + } note; + char *shstr = NULL; + int boot_load_ctf = 1; + + /* some ports dont use the offset */ + (void)offset; + + internalize_ehdr(elf-e_ident[EI_DATA], elf); + + sz = elf-e_phnum * sizeof(Elf_Phdr); + phdr = ALLOC(sz); + + if (lseek(fd, elf-e_phoff, SEEK_SET) == -1) { + WARN((lseek phdr)); + goto freephdr; + } + nr = read(fd, phdr, sz); + if (nr == -1) { + WARN((read program headers)); + goto freephdr; + } + if (nr != sz) { + errno = EIO; + WARN((read program headers)); + goto freephdr; + } -for (first = 1, i = 0; i elf-e_phnum; i++) { - internalize_phdr(elf-e_ident[EI_DATA], phdr[i]); + for (first = 1, i = 0; i elf-e_phnum; i++) { + internalize_phdr(elf-e_ident[EI_DATA], phdr[i]); #ifndef MD_LOADSEG /* Allow processor ABI specific segment loads */ #define MD_LOADSEG(a) /*CONSTCOND*/0 #endif - if (MD_LOADSEG(phdr[i])) - goto loadseg; + if (MD_LOADSEG(phdr[i])) + goto loadseg; - if (phdr[i].p_type != PT_LOAD || - (phdr[i].p_flags (PF_W|PF_X)) == 0) - continue; + if (phdr[i].p_type != PT_LOAD || + (phdr[i].p_flags (PF_W|PF_X)) == 0) + continue; #define IS_TEXT(p) (p.p_flags PF_X) #define IS_DATA(p) (p.p_flags PF_W) #define IS_BSS(p) (p.p_filesz p.p_memsz) - /* - * XXX: Assume first address is lowest - */ - if ((IS_TEXT(phdr[i]) (flags LOAD_TEXT)) || - (IS_DATA(phdr[i]) (flags LOAD_DATA))) { - - loadseg: - if (marks[MARK_DATA] == 0 IS_DATA(phdr[i])) - marks[MARK_DATA] = LOADADDR(phdr[i].p_vaddr); - - /* Read in segment. */ - PROGRESS((%s%lu, first ? : +, - (u_long)phdr[i].p_filesz)); - - if (lseek(fd, phdr[i].p_offset, SEEK_SET) == -1) { - WARN((lseek text)); - goto freephdr; - } - nr = READ(fd, phdr[i].p_vaddr, phdr[i].p_filesz); - if (nr == -1) { - WARN((read text error)); - goto freephdr; - } - if (nr != (ssize_t)phdr[i].p_filesz) { - errno = EIO; - WARN((read text)); - goto freephdr; - } - first = 0; - - } - if ((IS_TEXT(phdr[i]) (flags (LOAD_TEXT|COUNT_TEXT))) || - (IS_DATA(phdr[i]) (flags (LOAD_DATA|COUNT_TEXT { - pos = phdr[i].p_vaddr; - if (minp pos) - minp = pos; - pos += phdr[i].p_filesz; - if (maxp pos) - maxp = pos; - } - - /* Zero out bss. */ - if (IS_BSS(phdr[i]) (flags LOAD_BSS)) { - PROGRESS((+%lu, - (u_long)(phdr[i].p_memsz - phdr[i].p_filesz))); - BZERO((phdr[i].p_vaddr + phdr[i].p_filesz), - phdr[i].p_memsz - phdr[i].p_filesz); - } - if (IS_BSS(phdr[i]) (flags (LOAD_BSS|COUNT_BSS))) { - pos += phdr[i].p_memsz - phdr[i].p_filesz; - if (maxp pos) - maxp = pos; - } -} -DEALLOC(phdr, sz); - -/* - * Copy the ELF and section headers. - */ -maxp = roundup(maxp, ELFROUND); -if (flags (LOAD_HDR|COUNT_HDR)) { - elfp = maxp; - maxp += sizeof(Elf_Ehdr); -} - -if (flags (LOAD_SYM|COUNT_SYM)) { - if (lseek(fd,
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jym Date: Thu Feb 17 22:00:36 UTC 2011 Modified Files: src/sys/arch/i386/conf: XEN3_DOM0 XEN3_DOMU Log Message: Add DDB_COMMANDONENTER=trace;show registers to Xen kernels; amd64 does it already, and it is helpful for debugging under Xen anyway. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.27 -r1.28 src/sys/arch/i386/conf/XEN3_DOMU Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.42 src/sys/arch/i386/conf/XEN3_DOM0:1.43 --- src/sys/arch/i386/conf/XEN3_DOM0:1.42 Sat Nov 27 20:18:46 2010 +++ src/sys/arch/i386/conf/XEN3_DOM0 Thu Feb 17 22:00:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.42 2010/11/27 20:18:46 christos Exp $ +# $NetBSD: XEN3_DOM0,v 1.43 2011/02/17 22:00:36 jym Exp $ # # XEN3_0: Xen 3.0 domain0 kernel @@ -76,6 +76,7 @@ #options KGDB # remote debugger #options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600 #makeoptions DEBUG=-g # compile full symbol table +options DDB_COMMANDONENTER=trace;show registers # Compatibility options options COMPAT_NOMID # NetBSD 0.8, 386BSD, and BSDI Index: src/sys/arch/i386/conf/XEN3_DOMU diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.27 src/sys/arch/i386/conf/XEN3_DOMU:1.28 --- src/sys/arch/i386/conf/XEN3_DOMU:1.27 Tue Nov 23 11:14:00 2010 +++ src/sys/arch/i386/conf/XEN3_DOMU Thu Feb 17 22:00:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.27 2010/11/23 11:14:00 hannken Exp $ +# $NetBSD: XEN3_DOMU,v 1.28 2011/02/17 22:00:36 jym Exp $ include arch/xen/conf/std.xen @@ -56,6 +56,7 @@ #options KGDB # remote debugger #options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=57600 #makeoptions DEBUG=-g # compile full symbol table +options DDB_COMMANDONENTER=trace;show registers # Compatibility options options COMPAT_NOMID # NetBSD 0.8, 386BSD, and BSDI
CVS commit: src/usr.bin/grep
Module Name:src Committed By: joerg Date: Thu Feb 17 22:03:25 UTC 2011 Modified Files: src/usr.bin/grep: fastgrep.c Log Message: Simplify. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/grep/fastgrep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/grep/fastgrep.c diff -u src/usr.bin/grep/fastgrep.c:1.2 src/usr.bin/grep/fastgrep.c:1.3 --- src/usr.bin/grep/fastgrep.c:1.2 Wed Feb 16 18:35:39 2011 +++ src/usr.bin/grep/fastgrep.c Thu Feb 17 22:03:25 2011 @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: fastgrep.c,v 1.2 2011/02/16 18:35:39 joerg Exp $); +__RCSID($NetBSD: fastgrep.c,v 1.3 2011/02/17 22:03:25 joerg Exp $); #include limits.h #include stdbool.h @@ -82,8 +82,6 @@ int hasDot = 0; int lastHalfDot = 0; int shiftPatternLen; - bool bol = false; - bool eol = false; /* Initialize. */ fg-len = strlen(pat); @@ -93,34 +91,34 @@ /* Remove end-of-line character ('$'). */ if (fg-len 0 pat[fg-len - 1] == '$') { - eol = true; fg-eol = true; fg-len--; } /* Remove beginning-of-line character ('^'). */ if (pat[0] == '^') { - bol = true; fg-bol = true; fg-len--; + pat++; } if (fg-len = 14 - strncmp(pat + (fg-bol ? 1 : 0), [[::]], 7) == 0 - strncmp(pat + (fg-bol ? 1 : 0) + fg-len - 7, [[::]], 7) == 0) { + memcmp(pat, [[::]], 7) == 0 + memcmp(pat + fg-len - 7, [[::]], 7) == 0) { fg-len -= 14; + pat += 7; /* Word boundary is handled separately in util.c */ wflag = true; } /* - * Copy pattern minus '^' and '$' characters as well as word - * match character classes at the beginning and ending of the - * string respectively. + * pat has been adjusted earlier to not include '^', '$' or + * the word match character classes at the beginning and ending + * of the string respectively. */ fg-pattern = grep_malloc(fg-len + 1); - strlcpy((char *)fg-pattern, pat + (bol ? 1 : 0) + wflag, - fg-len + 1); + memcpy(fg-pattern, pat, fg-len); + fg-pattern[fg-len] = '\0'; /* Look for ways to cheat...er...avoid the full regex engine. */ for (i = 0; i fg-len; i++) { @@ -149,7 +147,7 @@ * Determine if a reverse search would be faster based on the placement * of the dots. */ - if ((!(lflag || cflag)) ((!(bol || eol)) + if ((!(lflag || cflag)) ((!(fg-bol || fg-eol)) ((lastHalfDot) ((firstHalfDot 0) || ((fg-len - (lastHalfDot + 1)) (size_t)firstHalfDot !oflag !color) {
CVS commit: src/sys/external/bsd/drm/dist/bsd-core
Module Name:src Committed By: jakllsch Date: Thu Feb 17 23:21:54 UTC 2011 Modified Files: src/sys/external/bsd/drm/dist/bsd-core: drm_pciids.h Log Message: Add the RS880 device IDs to radeondrm(4). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h diff -u src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.5 src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.6 --- src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h:1.5 Thu Jan 6 11:07:48 2011 +++ src/sys/external/bsd/drm/dist/bsd-core/drm_pciids.h Thu Feb 17 23:21:53 2011 @@ -393,7 +393,12 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4300 Series}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4500 Series}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, ATI Mobility Radeon 4500 Series}, \ - {0x1002, 0x9712, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon Mobility HD 4200}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon HD 4200}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon RS880}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon Mobility HD 4200}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon Mobility RS880}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon HD 4290}, \ + {0x1002, 0x9715, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, ATI Radeon HD 4250}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \
CVS commit: src/external/mit/xorg
Module Name:src Committed By: jmcneill Date: Thu Feb 17 23:50:19 UTC 2011 Modified Files: src/external/mit/xorg/bin/xkbevd: Makefile src/external/mit/xorg/lib/libXaw6: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config: Makefile Log Message: Get rid of stray /usr/X11R6 references To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/mit/xorg/bin/xkbevd/Makefile cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libXaw6/Makefile cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xkbevd/Makefile diff -u src/external/mit/xorg/bin/xkbevd/Makefile:1.1.1.1 src/external/mit/xorg/bin/xkbevd/Makefile:1.2 --- src/external/mit/xorg/bin/xkbevd/Makefile:1.1.1.1 Tue Jul 29 05:01:22 2008 +++ src/external/mit/xorg/bin/xkbevd/Makefile Thu Feb 17 23:50:18 2011 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile,v 1.1.1.1 2008/07/29 05:01:22 mrg Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/17 23:50:18 jmcneill Exp $ .include bsd.own.mk PROG= xkbevd SRCS= xkbevd.c cfgscan.c cfgparse.y evargs.c printev.c utils.c +CPPFLAGS+=-DDFLT_XKB_CONFIG_ROOT='${X11ROOTDIR}/lib/X11/xkb' +CPPFLAGS+=-DDFLT_SOUND_CMD='/usr/bin/audioplay' +CPPFLAGS+=-DDFLT_SOUND_DIR='${X11ROOTDIR}/share/sounds/' CPPFLAGS+=-I${X11SRCDIR.${PROG}} LDADD+= -lxkbfile -lXext -lX11 DPADD+= ${LIBXKBFILE} ${LIBXEXT} ${LIBX11} Index: src/external/mit/xorg/lib/libXaw6/Makefile diff -u src/external/mit/xorg/lib/libXaw6/Makefile:1.4 src/external/mit/xorg/lib/libXaw6/Makefile:1.5 --- src/external/mit/xorg/lib/libXaw6/Makefile:1.4 Fri Apr 3 16:21:08 2009 +++ src/external/mit/xorg/lib/libXaw6/Makefile Thu Feb 17 23:50:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2009/04/03 16:21:08 perry Exp $ +# $NetBSD: Makefile,v 1.5 2011/02/17 23:50:19 jmcneill Exp $ NOCHECKVER= yes # we want to install an older version ... MKLINKLIB= no @@ -20,7 +20,7 @@ XawI18n.c XawIm.c XawInit.c CPPFLAGS+= -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H -DOLDXAW \ - -DHAVE_ISWALNUM + -DHAVE_ISWALNUM -DPROJECT_ROOT=\${X11ROOTDIR}\ LIBDPLIBS=\ Xmu ${.CURDIR}/../libXmu \ Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile:1.2 src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile:1.3 --- src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile:1.2 Tue Nov 23 08:22:34 2010 +++ src/external/mit/xorg/server/xorg-server/hw/xfree86/xf86config/Makefile Thu Feb 17 23:50:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2010/11/23 08:22:34 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/02/17 23:50:19 jmcneill Exp $ .include ../../../Makefile.serverlib .include ../../../Makefile.servermod @@ -22,6 +22,7 @@ -I${X11SRCDIR.xorg-server}/../include CPPFLAGS+= ${X11FLAGS.DIX} +CPPFLAGS+= -DPROJECTROOT='${X11ROOTDIR}' .include bsd.x11.mk LIBDIR= ${XMODULEDIR}
CVS commit: xsrc/external/mit/fontconfig/dist/fc-cache
Module Name:xsrc Committed By: jmcneill Date: Fri Feb 18 00:26:24 UTC 2011 Modified Files: xsrc/external/mit/fontconfig/dist/fc-cache: fc-cache.c Log Message: add a -q (quick) flag to skip the 2s sleep at the end of cache updates To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c diff -u xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c:1.1.1.2 xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c:1.2 --- xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c:1.1.1.2 Sun Nov 21 06:35:29 2010 +++ xsrc/external/mit/fontconfig/dist/fc-cache/fc-cache.c Fri Feb 18 00:26:24 2011 @@ -68,6 +68,7 @@ #include getopt.h const struct option longopts[] = { {force, 0, 0, 'f'}, +{quick, 0, 0, 'q'}, {really-force, 0, 0, 'r'}, {system-only, 0, 0, 's'}, {version, 0, 0, 'V'}, @@ -87,10 +88,10 @@ { FILE *file = error ? stderr : stdout; #if HAVE_GETOPT_LONG -fprintf (file, usage: %s [-frsvVh] [--force|--really-force] [--system-only] [--verbose] [--version] [--help] [dirs]\n, +fprintf (file, usage: %s [-fqrsvVh] [--quick] [--force|--really-force] [--system-only] [--verbose] [--version] [--help] [dirs]\n, program); #else -fprintf (file, usage: %s [-frsvVh] [dirs]\n, +fprintf (file, usage: %s [-fqrsvVh] [dirs]\n, program); #endif fprintf (file, Build font information caches in [dirs]\n @@ -98,6 +99,7 @@ fprintf (file, \n); #if HAVE_GETOPT_LONG fprintf (file, -f, --force scan directories with apparently valid caches\n); +fprintf (file, -q, --quick don't sleep before exiting\n); fprintf (file, -r, --really-force erase all existing caches, then rescan\n); fprintf (file, -s, --system-onlyscan system-wide directories only\n); fprintf (file, -v, --verbosedisplay status information while busy\n); @@ -105,6 +107,7 @@ fprintf (file, -h, --help display this help and exit\n); #else fprintf (file, -f (force) scan directories with apparently valid caches\n); +fprintf (file, -q (quick) don't sleep before exiting\n); fprintf (file, -r, (really force) erase all existing caches, then rescan\n); fprintf (file, -s (system) scan system-wide directories only\n); fprintf (file, -v (verbose) display status information while busy\n); @@ -364,6 +367,7 @@ FcStrSet *dirs; FcStrList *list; FcBool verbose = FcFalse; +FcBool quick = FcFalse; FcBool force = FcFalse; FcBool really_force = FcFalse; FcBool systemOnly = FcFalse; @@ -374,9 +378,9 @@ int c; #if HAVE_GETOPT_LONG -while ((c = getopt_long (argc, argv, frsVvh, longopts, NULL)) != -1) +while ((c = getopt_long (argc, argv, fqrsVvh, longopts, NULL)) != -1) #else -while ((c = getopt (argc, argv, frsVvh)) != -1) +while ((c = getopt (argc, argv, fqrsVvh)) != -1) #endif { switch (c) { @@ -386,6 +390,9 @@ case 'f': force = FcTrue; break; + case 'q': + quick = FcTrue; + break; case 's': systemOnly = FcTrue; break; @@ -461,7 +468,8 @@ */ FcConfigDestroy (config); FcFini (); -sleep (2); +if (!quick) +sleep (2); if (verbose) printf (%s: %s\n, argv[0], ret ? failed : succeeded); return ret;
CVS commit: src
Module Name:src Committed By: jmcneill Date: Fri Feb 18 00:42:20 UTC 2011 Modified Files: src/distrib/sets/lists/xetc: mi src/etc/defaults: rc.conf src/etc/rc.d: Makefile Added Files: src/etc/rc.d: fccache.in Log Message: Add rc.d script to make sure the system fontconfig cache is up to date. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/lists/xetc/mi cvs rdiff -u -r1.111 -r1.112 src/etc/defaults/rc.conf cvs rdiff -u -r1.82 -r1.83 src/etc/rc.d/Makefile cvs rdiff -u -r0 -r1.1 src/etc/rc.d/fccache.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xetc/mi diff -u src/distrib/sets/lists/xetc/mi:1.17 src/distrib/sets/lists/xetc/mi:1.18 --- src/distrib/sets/lists/xetc/mi:1.17 Thu Jan 14 13:47:42 2010 +++ src/distrib/sets/lists/xetc/mi Fri Feb 18 00:42:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.17 2010/01/14 13:47:42 wiz Exp $ +# $NetBSD: mi,v 1.18 2011/02/18 00:42:20 jmcneill Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -106,3 +106,5 @@ ./etc/rc.d/xdm etc-x11-rc xorg ./etc/rc.d/xfs etc-x11-rc x11 ./etc/rc.d/xfs etc-x11-rc xorg +./etc/rc.d/fccache etc-x11-rc x11 +./etc/rc.d/fccache etc-x11-rc xorg Index: src/etc/defaults/rc.conf diff -u src/etc/defaults/rc.conf:1.111 src/etc/defaults/rc.conf:1.112 --- src/etc/defaults/rc.conf:1.111 Wed Feb 2 02:20:28 2011 +++ src/etc/defaults/rc.conf Fri Feb 18 00:42:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: rc.conf,v 1.111 2011/02/02 02:20:28 rmind Exp $ +# $NetBSD: rc.conf,v 1.112 2011/02/18 00:42:20 jmcneill Exp $ # # /etc/defaults/rc.conf -- # default configuration of /etc/rc.conf @@ -273,6 +273,9 @@ xdm=NO xdm_flags= # X11 display manager; needs # wscons=YES for local displays. +# Update fontconfig cache at boot +fccache=YES + # YP (NIS) daemons. # ypbind=NO ypbind_flags= Index: src/etc/rc.d/Makefile diff -u src/etc/rc.d/Makefile:1.82 src/etc/rc.d/Makefile:1.83 --- src/etc/rc.d/Makefile:1.82 Wed Feb 2 02:20:28 2011 +++ src/etc/rc.d/Makefile Fri Feb 18 00:42:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.82 2011/02/02 02:20:28 rmind Exp $ +# $NetBSD: Makefile,v 1.83 2011/02/18 00:42:20 jmcneill Exp $ .include bsd.own.mk @@ -42,9 +42,10 @@ FILESMODE= ${BINMODE} .if ${MKX11} != no -CONFIGFILES+= xdm xfs +CONFIGFILES+= xdm xfs fccache FILESBUILD_xdm= yes FILESBUILD_xfs= yes +FILESBUILD_fccache= yes .SUFFIXES: .in .in: Added files: Index: src/etc/rc.d/fccache.in diff -u /dev/null src/etc/rc.d/fccache.in:1.1 --- /dev/null Fri Feb 18 00:42:20 2011 +++ src/etc/rc.d/fccache.in Fri Feb 18 00:42:20 2011 @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $NetBSD: fccache.in,v 1.1 2011/02/18 00:42:20 jmcneill Exp $ +# + +# PROVIDE: fccache +# REQUIRE: mountcritremote +# BEFORE: DAEMON + +$_rc_subr_loaded . /etc/rc.subr + +name=fccache +rcvar=${name} +command=@X11ROOTDIR@/bin/fc-cache +start_cmd=fccache_start +stop_cmd=: + +fccache_start() +{ + if [ -x ${command} ]; then + echo -n Updating fontconfig cache: + ${command} -q + echo done + fi +} + +load_rc_config $name +run_rc_command $1
CVS commit: src/sys/modules/panic
Module Name:src Committed By: jmcneill Date: Fri Feb 18 01:07:20 UTC 2011 Added Files: src/sys/modules/panic: Makefile panic.c Log Message: add panic.kmod, an easy way to trigger a panic. takes a 'how' argument to specify how to trigger the panic: modload -s how=panic panic.kmod -- just calls panic() modload -s how=nullptr panic.kmod -- null ptr deref if how isn't specified, it defaults to 'panic'. feel free to add more. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/panic/Makefile \ src/sys/modules/panic/panic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/panic/Makefile diff -u /dev/null src/sys/modules/panic/Makefile:1.1 --- /dev/null Fri Feb 18 01:07:21 2011 +++ src/sys/modules/panic/Makefile Fri Feb 18 01:07:20 2011 @@ -0,0 +1,8 @@ +# $NetBSD: Makefile,v 1.1 2011/02/18 01:07:20 jmcneill Exp $ + +.include ../Makefile.inc + +KMOD= panic +SRCS= panic.c + +.include bsd.kmodule.mk Index: src/sys/modules/panic/panic.c diff -u /dev/null src/sys/modules/panic/panic.c:1.1 --- /dev/null Fri Feb 18 01:07:21 2011 +++ src/sys/modules/panic/panic.c Fri Feb 18 01:07:20 2011 @@ -0,0 +1,85 @@ +/* $NetBSD: panic.c,v 1.1 2011/02/18 01:07:20 jmcneill Exp $ */ + +/* + * Copyright (c) 2011 Jared D. McNeill jmcne...@invisible.ca + * 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. The name of the author may not be used to endorse or promote products + *derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 +__KERNEL_RCSID(0, $NetBSD: panic.c,v 1.1 2011/02/18 01:07:20 jmcneill Exp $); + +#include sys/module.h + +MODULE(MODULE_CLASS_MISC, panic, NULL); + +static void +panic_dopanic(void) +{ + /* just call panic */ + panic(oops); +} + +static void +panic_donullptr(void) +{ + /* null ptr dereference */ + *(int *)NULL = 1; +} + +static const struct { + const char *name; + void (*func)(void); +} panic_howto[] = { + { panic, panic_dopanic }, + { nullptr, panic_donullptr }, +}; + +static int +panic_modcmd(modcmd_t cmd, void *opaque) +{ + if (cmd == MODULE_CMD_INIT) { + prop_dictionary_t props = opaque; + const char *how = NULL; + unsigned int i; + + if (props) + prop_dictionary_get_cstring_nocopy(props, how, how); + if (how == NULL) + how = panic; + + for (i = 0; i __arraycount(panic_howto); i++) { + if (strcmp(how, panic_howto[i].name) == 0) { +panic_howto[i].func(); +break; + } + } + if (i == __arraycount(panic_howto)) + printf(%s: no how '%s'\n, __func__, how); + else + printf(%s: how '%s' didn't panic?\n, __func__, how); + + return EINVAL; + } + + return ENOTTY; +}
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Fri Feb 18 02:00:36 UTC 2011 Modified Files: src/sys/external/bsd/drm/dist/bsd-core: via_drv.c src/sys/modules/viadrm: Makefile Added Files: src/sys/modules/viadrm: viadrm.ioconf Log Message: get rid of #ifdef __FreeBSD__ sections use ioconf add a module dependency on drm To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm/dist/bsd-core/via_drv.c cvs rdiff -u -r1.1 -r1.2 src/sys/modules/viadrm/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/viadrm/viadrm.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm/dist/bsd-core/via_drv.c diff -u src/sys/external/bsd/drm/dist/bsd-core/via_drv.c:1.6 src/sys/external/bsd/drm/dist/bsd-core/via_drv.c:1.7 --- src/sys/external/bsd/drm/dist/bsd-core/via_drv.c:1.6 Sun Dec 6 22:51:25 2009 +++ src/sys/external/bsd/drm/dist/bsd-core/via_drv.c Fri Feb 18 02:00:36 2011 @@ -39,12 +39,13 @@ viadrv_PCI_IDS }; -static void via_configure(struct drm_device *dev) +static void +via_configure(struct drm_device *dev) { dev-driver-driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ; - dev-driver-buf_priv_size = 1; + dev-driver-buf_priv_size = sizeof(drm_via_private_t); dev-driver-load = via_driver_load; dev-driver-unload = via_driver_unload; dev-driver-context_ctor = via_init_context; @@ -69,60 +70,6 @@ dev-driver-patchlevel = VIA_DRM_DRIVER_PATCHLEVEL; } -#if defined(__FreeBSD__) -static int -via_probe(device_t kdev) -{ - return drm_probe(kdev, via_pciidlist); -} - -static int -via_attach(device_t kdev) -{ - struct drm_device *dev = device_get_softc(kdev); - - dev-driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, - M_WAITOK | M_ZERO); - - via_configure(dev); - - return drm_attach(kdev, via_pciidlist); -} - -static int -via_detach(device_t kdev) -{ - struct drm_device *dev = device_get_softc(kdev); - int ret; - - ret = drm_detach(kdev); - - free(dev-driver, DRM_MEM_DRIVER); - - return ret; -} - -static device_method_t via_methods[] = { - /* Device interface */ - DEVMETHOD(device_probe, via_probe), - DEVMETHOD(device_attach, via_attach), - DEVMETHOD(device_detach, via_detach), - - { 0, 0 } -}; - -static driver_t via_driver = { - drm, - via_methods, - sizeof(struct drm_device) -}; - -extern devclass_t drm_devclass; -DRIVER_MODULE(via, pci, via_driver, drm_devclass, 0, 0); -MODULE_DEPEND(via, drm, 1, 1, 1); - -#elif defined(__NetBSD__) - static int viadrm_probe(device_t parent, cfdata_t match, void *aux) { @@ -158,62 +105,31 @@ CFATTACH_DECL_NEW(viadrm, sizeof(struct drm_device), viadrm_probe, viadrm_attach, viadrm_detach, NULL); -#ifdef _MODULE - -MODULE(MODULE_CLASS_DRIVER, viadrm, NULL); +MODULE(MODULE_CLASS_DRIVER, viadrm, drm); -CFDRIVER_DECL(viadrm, DV_DULL, NULL); -extern struct cfattach viadrm_ca; -static int drmloc[] = { -1 }; -static struct cfparent drmparent = { - drm, vga, DVUNIT_ANY -}; -static struct cfdata viadrm_cfdata[] = { - { - .cf_name = viadrm, - .cf_atname = viadrm, - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - .cf_loc = drmloc, - .cf_flags = 0, - .cf_pspec = drmparent, - }, - { NULL } -}; +#ifdef _MODULE +#include ioconf.c +#endif static int viadrm_modcmd(modcmd_t cmd, void *arg) { - int err; + int err = 0; switch (cmd) { case MODULE_CMD_INIT: - err = config_cfdriver_attach(viadrm_cd); - if (err) - return err; - err = config_cfattach_attach(viadrm, viadrm_ca); - if (err) { - config_cfdriver_detach(viadrm_cd); - return err; - } - err = config_cfdata_attach(viadrm_cfdata, 1); - if (err) { - config_cfattach_detach(viadrm, viadrm_ca); - config_cfdriver_detach(viadrm_cd); - return err; - } - return 0; +#ifdef _MODULE + err = config_init_component(cfdriver_ioconf_viadrm, + cfattach_ioconf_viadrm, cfdata_ioconf_viadrm); +#endif + return err; case MODULE_CMD_FINI: - err = config_cfdata_detach(viadrm_cfdata); - if (err) - return err; - config_cfattach_detach(viadrm, viadrm_ca); - config_cfdriver_detach(viadrm_cd); - return 0; +#ifdef _MODULE + err = config_fini_component(cfdriver_ioconf_viadrm, + cfattach_ioconf_viadrm, cfdata_ioconf_viadrm); +#endif + return err; default: return ENOTTY; } } -#endif /* _MODULE */ - -#endif Index: src/sys/modules/viadrm/Makefile diff -u src/sys/modules/viadrm/Makefile:1.1 src/sys/modules/viadrm/Makefile:1.2 --- src/sys/modules/viadrm/Makefile:1.1 Sun Sep 27 12:44:05 2009 +++ src/sys/modules/viadrm/Makefile Fri Feb 18 02:00:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2009/09/27 12:44:05 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2011/02/18 02:00:36 jmcneill Exp $ .include ../Makefile.inc @@ -6,6 +6,7 @@ .PATH: ${S}/external/bsd/drm/dist/shared-core KMOD= viadrm +IOCONF= viadrm.ioconf SRCS= via_drv.c SRCS+= via_dma.c Added files: Index:
CVS commit: src/sys/external/bsd/drm/dist/shared-core
Module Name:src Committed By: jmcneill Date: Fri Feb 18 02:52:42 UTC 2011 Removed Files: src/sys/external/bsd/drm/dist/shared-core: via_drv.c Log Message: get rid of this stale copy of via_drv.c, the one we want is in bsd-core To generate a diff of this commit: cvs rdiff -u -r1.3 -r0 src/sys/external/bsd/drm/dist/shared-core/via_drv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Fri Feb 18 07:00:05 UTC 2011 Modified Files: src/sys/dev/acpi: acpi_cpu_tstate.c Log Message: Remove the (debug) check that evaluated whether the first T-state (i.e. the 100 % duty cycle) had control value of zero, as in the IA32 clock modulation MSR. As the access may be based on I/O, it is unclear if a strict validation like this was correct. Should fix the problem reported by Hisashi T Fujinaka on current users. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/acpi/acpi_cpu_tstate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_cpu_tstate.c diff -u src/sys/dev/acpi/acpi_cpu_tstate.c:1.19 src/sys/dev/acpi/acpi_cpu_tstate.c:1.20 --- src/sys/dev/acpi/acpi_cpu_tstate.c:1.19 Sun Jan 30 08:55:52 2011 +++ src/sys/dev/acpi/acpi_cpu_tstate.c Fri Feb 18 07:00:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_cpu_tstate.c,v 1.19 2011/01/30 08:55:52 jruoho Exp $ */ +/* $NetBSD: acpi_cpu_tstate.c,v 1.20 2011/02/18 07:00:05 jruoho Exp $ */ /*- * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.19 2011/01/30 08:55:52 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: acpi_cpu_tstate.c,v 1.20 2011/02/18 07:00:05 jruoho Exp $); #include sys/param.h #include sys/evcnt.h @@ -355,15 +355,6 @@ goto out; } - /* - * The first entry with 100 % duty cycle - * should have zero in the control field. - */ - if (sc-sc_tstate[0].ts_control != 0) { - rv = AE_AML_BAD_RESOURCE_VALUE; - goto out; - } - out: if (buf.Pointer != NULL) ACPI_FREE(buf.Pointer);