From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 04:22:37 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E332CBD7; Sun, 30 Dec 2012 04:22:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5E5C8FC08; Sun, 30 Dec 2012 04:22:36 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU4MaXS022766; Sun, 30 Dec 2012 04:22:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU4MZDk022755; Sun, 30 Dec 2012 04:22:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201212300422.qBU4MZDk022755@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 30 Dec 2012 04:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244850 - in head: contrib/dialog contrib/dialog/package contrib/dialog/package/debian contrib/dialog/po contrib/dialog/samples contrib/dialog/samples/copifuncs gnu/lib/libdialog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 04:22:37 -0000 Author: nwhitehorn Date: Sun Dec 30 04:22:34 2012 New Revision: 244850 URL: http://svnweb.freebsd.org/changeset/base/244850 Log: Revert r241818 that updated dialog to 20120706. This turns out to horribly break mixed form dialogs in conjunction with the FreeBSD termcap, making the bsdinstall partition editor Add dialog, among other things, completely nonfunctional. This restores dialog 20110707. Added: head/contrib/dialog/samples/dselect - copied unchanged from r241817, head/contrib/dialog/samples/dselect head/contrib/dialog/samples/valgrind.log - copied unchanged from r241817, head/contrib/dialog/samples/valgrind.log Deleted: head/contrib/dialog/samples/dft-cancel head/contrib/dialog/samples/dft-extra head/contrib/dialog/samples/dft-help head/contrib/dialog/samples/dft-no head/contrib/dialog/samples/fselect0 head/contrib/dialog/samples/with-dquotes head/contrib/dialog/samples/with-squotes Modified: head/contrib/dialog/CHANGES head/contrib/dialog/VERSION head/contrib/dialog/aclocal.m4 head/contrib/dialog/arrows.c head/contrib/dialog/buttons.c head/contrib/dialog/calendar.c head/contrib/dialog/checklist.c head/contrib/dialog/columns.c head/contrib/dialog/configure head/contrib/dialog/configure.in head/contrib/dialog/dialog.1 head/contrib/dialog/dialog.3 head/contrib/dialog/dialog.c head/contrib/dialog/dialog.h head/contrib/dialog/dlg_colors.h head/contrib/dialog/dlg_keys.c head/contrib/dialog/dlg_keys.h head/contrib/dialog/editbox.c head/contrib/dialog/formbox.c head/contrib/dialog/fselect.c head/contrib/dialog/guage.c head/contrib/dialog/headers-sh.in head/contrib/dialog/inputbox.c head/contrib/dialog/inputstr.c head/contrib/dialog/makefile.in head/contrib/dialog/menubox.c head/contrib/dialog/mixedform.c head/contrib/dialog/mixedgauge.c head/contrib/dialog/msgbox.c head/contrib/dialog/package/debian/changelog head/contrib/dialog/package/dialog.spec head/contrib/dialog/pause.c head/contrib/dialog/po/cs.po head/contrib/dialog/po/el.po head/contrib/dialog/po/hr.po head/contrib/dialog/po/sr.po head/contrib/dialog/prgbox.c head/contrib/dialog/progressbox.c head/contrib/dialog/rc.c head/contrib/dialog/samples/copifuncs/admin.funcs head/contrib/dialog/samples/copifuncs/common.funcs head/contrib/dialog/samples/copifuncs/copi.funcs head/contrib/dialog/samples/copifuncs/copi.ifman2 head/contrib/dialog/samples/copifuncs/copi.ifpoll2 head/contrib/dialog/samples/copifuncs/copi.ifreq2 head/contrib/dialog/samples/copifuncs/copi.sendifm1 head/contrib/dialog/samples/copifuncs/copi.wheel head/contrib/dialog/samples/copismall head/contrib/dialog/samples/debian.rc head/contrib/dialog/samples/dialog.py head/contrib/dialog/samples/form1 head/contrib/dialog/samples/inputmenu head/contrib/dialog/samples/inputmenu-stdout head/contrib/dialog/samples/inputmenu1 head/contrib/dialog/samples/inputmenu2 head/contrib/dialog/samples/inputmenu3 head/contrib/dialog/samples/inputmenu4 head/contrib/dialog/samples/killall head/contrib/dialog/samples/prgbox head/contrib/dialog/samples/prgbox2 head/contrib/dialog/samples/report-button head/contrib/dialog/samples/report-edit head/contrib/dialog/samples/report-string head/contrib/dialog/samples/report-tempfile head/contrib/dialog/samples/report-yesno head/contrib/dialog/samples/setup-edit head/contrib/dialog/samples/setup-tempfile head/contrib/dialog/samples/setup-utf8 head/contrib/dialog/samples/setup-vars head/contrib/dialog/samples/slackware.rc head/contrib/dialog/samples/sourcemage.rc head/contrib/dialog/samples/suse.rc head/contrib/dialog/samples/tailboxbg head/contrib/dialog/samples/tailboxbg1 head/contrib/dialog/samples/tailboxbg2 head/contrib/dialog/samples/testdata-8bit head/contrib/dialog/samples/wheel head/contrib/dialog/samples/whiptail.rc head/contrib/dialog/tailbox.c head/contrib/dialog/textbox.c head/contrib/dialog/timebox.c head/contrib/dialog/trace.c head/contrib/dialog/ui_getc.c head/contrib/dialog/util.c head/contrib/dialog/yesno.c head/gnu/lib/libdialog/dlg_config.h Directory Properties: head/contrib/dialog/ (props changed) Modified: head/contrib/dialog/CHANGES ============================================================================== --- head/contrib/dialog/CHANGES Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/CHANGES Sun Dec 30 04:22:34 2012 (r244850) @@ -1,172 +1,9 @@ --- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 tom Exp $ +-- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $ -- Thomas E. Dickey This version of dialog was originally from a Debian snapshot. I've done this to it: -2012/07/06 - + modify samples/setup-tempfile to work with Tru64's shell. - + modify inputmenu sample scripts to make them more portable: - + use "id" rather than "$GROUPS", use sed to work with Solaris. - + use sed to split-up the rename results to work with HPUX. - + fix regression in msgbox (ArchLinux #30574) - -2012/07/03 - + modify prgbox widget to work with --extra-button, etc. - + add case values to several widgets to allow for mouse-clicks with - "--extra-button" and "--help-button" additions. - + correct timebox widget's exit code for "--extra-button" when handing - the "enter" key. - + modify msgbox widget to honor "--extra-button". - + corrected processing of "--trace" option, which did not update the - index into command-line to point past its value. - + add a check in dialog program for valid characters used in option, - e.g., to generate an error if a script attempts to add option value - using "=" rather than with whitespace. - + add new command-line option --default-button and library function - dlg_default_button() to retrieve the value set by the option - to provide a way to set the default button directly rather than - by combining --nook, etc. (patch by Zoltan Kelemen). - + amend include of unctrl.h to apply only to the case where curses.h - is included, to avoid conflict of ncurses' unctrl.h with a system - implementation (report by Martin Roedlach) - + add limit-check to dlg_toupper() in non-wide curses mode to work - when non-character values such as arrow-key codes are passed to - it (patch by Zoltan Kelemen). - + override timeout value, e.g., as set via --timeout command-line - option in pause widget because that interferes with pause's behavior - (report by Jan Spitalnik). - + modify samples/inputmenu* to allow ":" in renamed text (report by - Andreas Stoewing). - + modify double-quoting to make it more consistent, i.e., checklist - output is quoted only when needed. This fixes the case where - single-quotes were used whether or not needed, but also modifies - older checklist behavior for double-quoting which always added those - (Debian #663664). - + correct exit-code used in inputmenu for "rename" button (Debian - #673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim). - + update el.po and hr.po from - http://translationproject.org/latest/dialog/ - + use checkbashisms to clean up sample scripts. - -2012/02/15 - + modify menubox.c to use the same improvement as in checklist.c - + improve auto width computation for checklist widget by using - dlg_calc_list_width as in the non-auto case (Edho Arief). - + eliminate some bashisms in the sample scripts (Pedro Giffuni). - + makefile fixes from FreeBSD ports (Li-Wen Hsu): - + make --with-package option of configure script work. - + get LIBTOOL_VERSION from configure script, needed by - ${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and - aclocal.m4) - + update cs.po and sr.po from - http://translationproject.org/latest/dialog/ - + updated configure script macros, improving CF_XOPEN_SOURCE among - other fixes. - -2011/10/20 - + fix --analyze warnings for clang versions 2.8, 2.9. - + add configure check for lint program. - + add check in dlg_getc() in case its window is freed as a side effect - of removing callbacks. - + fix logic in freeing subwindows (report by xDog Walker). - + fix a regression in logic distinguishing between inputmenu and menu - widgets (report by xDog Walker). - + minor fixes to library manpage. - -2011/10/18 - + modify header-sh.in to work around limit on sed script length on - HPUX. - + add a special case of parameter parsing for "--trace" to the - initialization done before calling init_dialog(), to allow users to - capture the initial state of the parameter list before any options - are processed and removed. This is only done if "--trace" is the - first option, otherwise it is handled in the common options as before - (report by xDog Walker). - + modify samples/testdata-8bit, discarding $1 from the parameter list - if it was used, so that the source'ing scripts can consistently use - "$@" to insert parameters before the widget, e.g., as an alternative - to using $DIALOGOPTS (report by xDog Walker). - + modify treatment of function pointers in menubox.c, make - dlg_renamed_menutext() and dlg_dummy_menutext() visible to library - users (request by xDog Walker). - + add dlg_count_real_columns(), use to modify centering for "--hline" - text to account for "\Z"s (report by xDog Walker). - + improve check in dlg_draw_arrows2() for conflict between the window - title and up-arrow marker to take into account that the given window - may not be the top-level window of the widget. - + change width of page up/down mouse areas in fselect panes to use the - full width of the panes rather than only the portion from the left - margin to the up/down arrow. - + add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the - secondary borders. - + modify rc-file read/write to accept/generate color values that refer - to previously-processed items in the color table. This reduces the - number of distinct colors that must be specified to set up a color - scheme. - + add color table entries for secondary borders, i.e., the ones that - are normally drawn with the dialog's text-colors (Debian #641168). - + modify fselect.c to scan the current directory if the input field - happens to be empty (Debian #640905). - + repeated the discussion of environment variables that can override - the exit-status values in the manpage's return-codes section - (Debian #642105). - + add an example to the manpage showing how to override the form - widget's keys used for field/button traversal (Debian #642108). - + modify call to dlg_register_window() in formbox.c so that the editing - bindings are attached to the form sub-window rather than the - top-level dialog window. Also change the name by which the editing - bindings are bound for editbox.c, fselect.c and inputbox.c, so that - the editing and navigation bindings can be different. - + correct logic in dlg_lookup_key() so that it matches the widget name - before using a binding from .dialogrc, allowing the inner/outer - windows of form and other editing widgets to have different bindings. - + modify dlg_register_window() to call dlg_dump_window_keys() after - its updates, via the --trace output, to supplement the manpage - description of key bindings (Debian #642108). - + add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to - allow binding a single key to traverse both form-fields and buttons - (Debian #642108). - + modify dlg_parse_rc() to check for error return from - dlg_parse_bindkey(). - + add function dlg_dump_window_keys(), to help with debugging widgets. - + add CR, LF, TAB, FF and ESC to table of curses names to help make - key bindings more readable. - + update table of dialog key-names so that helpfile and trace are - dumped properly. - + correct dlg_dump_keys(), which was showing only the first item in - the matched binding table. - + save/restore window current position in dlg_update_mixedgauge(). - + pass return-code from pause_for_ok() from dlg_progressbox() when - pauseopt is set, rather than only DLG_OK. - + call setlocale() in init_dialog() rather than relying on on-demand - use within inputstr.c, since there are paths in textbox widget which - do not exercise the latter (report by xDog Walker). - + fix some places where checks for "\Z" were done without also checking - dialog_vars.colors (report by Moray Henderson). - + correct logic for DIALOGOPTS parsing so that the parse happens only - once unless memory leak checking is enabled (report by xDog Walker). - + remove an incorrect free() call in dlg_free_gauge() (report by xDog - Walker). - + modify dlg_trace_win() to log wide-characters (report by xDog Walker). - + make traces shorter by skipping repeated ERR's, but showing the - number skipped (report by xDog Walker). - + improve description in manpage to distinguish program box and - progress box from tailboxes (adapted from email by xDog Walker). - + modify dlg_trace_win() so that it looks for the topmost window in a - dialog. Because subwindows share space with the top window, tracing - the latter shows the whole widget (report by xDog Walker). - + expand tracing so that each window is traced before soliciting input, - making the ^T feature to print a window on demand partly redundant - (suggested by xDog Walker). - + cosmetic change in dialog.h to avoid "*/*" strings from comments next - to "*" (report by xDog Walker). - + ensure result from dlg_align_columns() has trailing null on each - string. Analysis was hindered by libc6's continuance of libc5's - early-1990s misfeature of clearing the result from malloc, noting - that libc6's documentation incorrectly claims that it does not do - this (report by xDog Walker). - 2011/07/07 + modify util.c to work better with old versions of ncurses: + suppress use of wchgat() before fix in 20060715 which is needed @@ -250,7 +87,7 @@ to it: + CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h doesn't do anything, so it needs a crutch). - + update config.guess, config.sub + + updated config.guess, config.sub 2011/03/02 + add --prgbox and --programbox (adapted from patch by David Boyd). @@ -318,7 +155,7 @@ to it: CF_ADD_LIBDIR for the curses-directory here, from CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even with the default checking, e.g., no --with-ncurses, etc. - + update config.guess, config.sub + + updated config.guess, config.sub 2010/04/28 + several improvements to configure script: @@ -413,7 +250,7 @@ to it: libutf8 and libiconv. + update da.po, ru.po from http://translationproject.org/latest/dialog/ - + update config.guess, config.sub + + updated config.guess, config.sub 2008/08/19 + amend changes to quoting; by default, the checklist widget quotes its @@ -496,7 +333,7 @@ to it: ESC to be returned, quitting dialog (report by Reiner Huober). + add extern "C" declarations to dlg_keys.h so the corresponding function declarations are exported to C++ as C symbols. - + update config.guess, config.sub + + updated config.guess, config.sub 2007/06/04 + fix a memory leak in editbox.c @@ -599,7 +436,7 @@ to it: CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS, CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC, CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE. - + update config.guess, config.sub + + updated config.guess, config.sub > adapted fixes from SuSE package (Werner Fink): + add some limit-checks in dlg_draw_shadow(). + make shadows resizable, using new dlg_move_window() in msgbox.c Modified: head/contrib/dialog/VERSION ============================================================================== --- head/contrib/dialog/VERSION Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/VERSION Sun Dec 30 04:22:34 2012 (r244850) @@ -1 +1 @@ -10:4:0 1.1 20120706 +10:0:0 1.1 20110707 Modified: head/contrib/dialog/aclocal.m4 ============================================================================== --- head/contrib/dialog/aclocal.m4 Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/aclocal.m4 Sun Dec 30 04:22:34 2012 (r244850) @@ -1,7 +1,7 @@ dnl macros used for DIALOG configure script -dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $ +dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $ dnl --------------------------------------------------------------------------- -dnl Copyright 1999-2011,2012 -- Thomas E. Dickey +dnl Copyright 1999-2010,2011 -- Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the @@ -592,31 +592,6 @@ changequote([,])dnl AC_SUBST(GENCAT) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03 -dnl ------------------ -dnl Conditionally generate script according to whether we're using a given autoconf. -dnl -dnl $1 = version to compare against -dnl $2 = code to use if AC_ACVERSION is at least as high as $1. -dnl $3 = code to use if AC_ACVERSION is older than $1. -define(CF_ACVERSION_CHECK, -[ -ifdef([m4_version_compare], -[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], -[CF_ACVERSION_COMPARE( -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), -AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl -dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50 -dnl -------------------- -dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, -dnl MAJOR2, MINOR2, TERNARY2, -dnl PRINTABLE2, not FOUND, FOUND) -define(CF_ACVERSION_COMPARE, -[ifelse(builtin([eval], [$2 < $5]), 1, -[ifelse([$8], , ,[$8])], -[ifelse([$9], , ,[$9])])])dnl -dnl --------------------------------------------------------------------------- dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 dnl ------------ dnl Conditionally generate script according to whether we're using the release @@ -1252,7 +1227,7 @@ fi AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37 +dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. @@ -1332,7 +1307,7 @@ if test ".$ac_cv_func_initscr" != .yes ; # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ - for cf_term_lib in $cf_check_list otermcap termcap termlib unknown + for cf_term_lib in $cf_check_list termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done @@ -1558,30 +1533,6 @@ fi test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04 -dnl -------------------- -dnl Check for curses support for directly determining the parent of a given -dnl window. Some implementations make this difficult, so we provide for -dnl defining an application-specific function that gives this functionality. -dnl -dnl $1 = name of function to use if the feature is missing -AC_DEFUN([CF_CURSES_WGETPARENT],[ -CF_CURSES_FUNCS(wgetparent) -if test "x$cf_cv_func_wgetparent" != xyes -then - AC_MSG_CHECKING(if WINDOW has _parent member) - AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], - [WINDOW *p = stdscr->_parent], - [cf_window__parent=yes], - [cf_window__parent=no]) - AC_MSG_RESULT($cf_window__parent) - if test "$cf_window__parent" = yes - then - AC_DEFINE(HAVE_WINDOW__PARENT) - fi -fi -])dnl -dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. @@ -2386,7 +2337,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41 +dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13 dnl --------------- dnl For the given system and compiler, find the compiler flags to pass to the dnl loader to use the "rpath" feature. @@ -2410,7 +2361,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi openbsd[[2-9]].*|mirbsd*) #(vi LD_RPATH_OPT="-Wl,-rpath," ;; -dragonfly*|freebsd*) #(vi +freebsd*) #(vi LD_RPATH_OPT="-rpath " ;; netbsd*) #(vi @@ -2469,11 +2420,11 @@ CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10 +dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16 dnl ------------- dnl Compute the library-prefix for the given host system dnl $1 = variable to set -define([CF_LIB_PREFIX], +AC_DEFUN([CF_LIB_PREFIX], [ case $cf_cv_system_name in #(vi OS/2*|os2*) #(vi @@ -2694,7 +2645,7 @@ printf("old\n"); ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05 +dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30 dnl ----------------- dnl Tie together the configure-script macros for ncurses. dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis. @@ -2706,10 +2657,7 @@ AC_DEFUN([CF_NCURSES_CONFIG], cf_ncuconfig_root=ifelse($1,,ncurses,$1) echo "Looking for ${cf_ncuconfig_root}-config" - -CF_ACVERSION_CHECK(2.52, - [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)], - [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)]) +AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none) if test "$NCURSES_CONFIG" != none ; then @@ -3223,14 +3171,6 @@ AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT") ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 -dnl ------------ -AC_DEFUN([CF_PROG_LINT], -[ -AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint) -AC_SUBST(LINT_OPTS) -])dnl -dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list @@ -3478,45 +3418,6 @@ ncursesw/term.h) esac ])dnl dnl --------------------------------------------------------------------------- -dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50 -dnl ------------------- -dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we -dnl can define it successfully. -AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ -AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifndef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - AC_TRY_COMPILE([ -#include -#include -#include -],[ -#ifdef _XOPEN_SOURCE -make an error -#endif], - [cf_cv_xopen_source=no], - [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) - CPPFLAGS="$cf_save" - ]) -]) - -if test "$cf_cv_xopen_source" != no ; then - CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) - CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) - cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" - CF_ADD_CFLAGS($cf_temp_xopen_source) -fi -]) -dnl --------------------------------------------------------------------------- dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44 dnl ------------- dnl Check to see if the BSD-style union wait is declared. Some platforms may @@ -3779,7 +3680,7 @@ if test "$with_dmalloc" = yes ; then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32 +dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -3880,7 +3781,7 @@ ifdef([AC_PROG_LIBTOOL],[ # special hack to add -no-undefined (which libtool should do for itself) LT_UNDEF= case "$cf_cv_system_name" in #(vi - cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi + cygwin*|mingw32*|uwin*|aix[[456]]) #(vi LT_UNDEF=-no-undefined ;; esac @@ -4049,7 +3950,7 @@ AC_TRY_LINK([ test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49 +dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -4065,7 +3966,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[ cf_xopen_source= case $host_os in #(vi -aix[[4-7]]*) #(vi +aix[[456]]*) #(vi cf_xopen_source="-D_ALL_SOURCE" ;; cygwin) #(vi @@ -4076,7 +3977,6 @@ darwin[[0-8]].*) #(vi ;; darwin*) #(vi cf_xopen_source="-D_DARWIN_C_SOURCE" - cf_XOPEN_SOURCE= ;; freebsd*|dragonfly*) #(vi # 5.x headers associate @@ -4094,23 +3994,15 @@ hpux*) #(vi ;; irix[[56]].*) #(vi cf_xopen_source="-D_SGI_SOURCE" - cf_XOPEN_SOURCE= ;; linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; mirbsd*) #(vi - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types - cf_XOPEN_SOURCE= - CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks ;; netbsd*) #(vi - cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw - ;; -openbsd[[4-9]]*) #(vi - # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw - cf_xopen_source="-D_BSD_SOURCE" - cf_XOPEN_SOURCE=600 + # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw @@ -4124,46 +4016,42 @@ nto-qnx*) #(vi sco*) #(vi # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; -solaris2.*) #(vi +solaris2.1[[0-9]]) #(vi + cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" + ;; +solaris2.[[1-9]]) #(vi cf_xopen_source="-D__EXTENSIONS__" ;; *) - CF_TRY_XOPEN_SOURCE - CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) - ;; -esac - -if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source) -fi - -dnl In anything but the default case, we may have system-specific setting -dnl which is still not guaranteed to provide all of the entrypoints that -dnl _XOPEN_SOURCE would yield. -if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then - AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) - AC_TRY_COMPILE([#include ],[ + AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ + AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE make an error #endif], - [cf_XOPEN_SOURCE_set=yes], - [cf_XOPEN_SOURCE_set=no]) - AC_MSG_RESULT($cf_XOPEN_SOURCE_set) - if test $cf_XOPEN_SOURCE_set = yes - then - AC_TRY_COMPILE([#include ],[ -#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE + [cf_cv_xopen_source=no], + [cf_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" + AC_TRY_COMPILE([#include ],[ +#ifdef _XOPEN_SOURCE make an error #endif], - [cf_XOPEN_SOURCE_set_ok=yes], - [cf_XOPEN_SOURCE_set_ok=no]) - if test $cf_XOPEN_SOURCE_set_ok = no - then - AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) - fi - else - CF_TRY_XOPEN_SOURCE + [cf_cv_xopen_source=no], + [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) + CPPFLAGS="$cf_save" + ]) +]) + if test "$cf_cv_xopen_source" != no ; then + CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) + CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) + cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" + CF_ADD_CFLAGS($cf_temp_xopen_source) fi + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) + ;; +esac + +if test -n "$cf_xopen_source" ; then + CF_ADD_CFLAGS($cf_xopen_source) fi ]) dnl --------------------------------------------------------------------------- Modified: head/contrib/dialog/arrows.c ============================================================================== --- head/contrib/dialog/arrows.c Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/arrows.c Sun Dec 30 04:22:34 2012 (r244850) @@ -1,5 +1,5 @@ /* - * $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $ + * $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $ * * arrows.c -- draw arrows to indicate end-of-range for lists * @@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool deco const int *cols = dlg_index_columns(dialog_vars.help_line); int other = decorations ? (ON_LEFT + ON_RIGHT) : 0; int avail = (getmaxx(win) - other - 2); - int limit = dlg_count_real_columns(dialog_vars.help_line) + 2; + int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0); - if (limit < avail) { + if (limit > 0) { getyx(win, cur_y, cur_x); other = decorations ? ON_LEFT : 0; (void) wmove(win, bottom, other + (avail - limit) / 2); @@ -107,14 +107,13 @@ dlg_draw_arrows2(WINDOW *win, int cur_x, cur_y; int limit_x = getmaxx(win); bool draw_top = TRUE; - bool is_toplevel = (wgetparent(win) == stdscr); getyx(win, cur_y, cur_x); /* * If we're drawing a centered title, do not overwrite with the arrows. */ - if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) { + if (dialog_vars.title) { int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2; int need = x + 5; if (need > have) @@ -124,11 +123,11 @@ dlg_draw_arrows2(WINDOW *win, if (draw_top) { (void) wmove(win, top, x); if (top_arrow) { - (void) wattrset(win, merge_colors(uarrow_attr, attr)); + wattrset(win, merge_colors(uarrow_attr, attr)); (void) add_acs(win, ACS_UARROW); (void) waddstr(win, "(-)"); } else { - (void) wattrset(win, attr); + wattrset(win, attr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } } @@ -136,11 +135,11 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, bottom, x); if (bottom_arrow) { - (void) wattrset(win, merge_colors(darrow_attr, attr)); + wattrset(win, merge_colors(darrow_attr, attr)); (void) add_acs(win, ACS_DARROW); (void) waddstr(win, "(+)"); } else { - (void) wattrset(win, borderattr); + wattrset(win, borderattr); (void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT); } mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE); @@ -148,7 +147,7 @@ dlg_draw_arrows2(WINDOW *win, (void) wmove(win, cur_y, cur_x); wrefresh(win); - (void) wattrset(win, save); + wattrset(win, save); } void @@ -167,13 +166,14 @@ dlg_draw_scrollbar(WINDOW *win, char buffer[80]; int percent; int len; - int oldy, oldx; + int oldy, oldx, maxy, maxx; chtype save = dlg_get_attrs(win); int top_arrow = (first_data != 0); int bottom_arrow = (next_data < total_data); getyx(win, oldy, oldx); + getmaxyx(win, maxy, maxx); dlg_draw_helpline(win, TRUE); if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) { @@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win, else if (percent > 100) percent = 100; - (void) wattrset(win, position_indicator_attr); + wattrset(win, position_indicator_attr); (void) sprintf(buffer, "%d%%", percent); (void) wmove(win, bottom, right - 7); (void) waddstr(win, buffer); if ((len = dlg_count_columns(buffer)) < 4) { - (void) wattrset(win, border_attr); + wattrset(win, border_attr); whline(win, dlg_boxchar(ACS_HLINE), 4 - len); } } @@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win, if (bar_high < all_high) { wmove(win, top + 1, right); - (void) wattrset(win, save); + wattrset(win, save); wvline(win, ACS_VLINE | A_REVERSE, all_high); bar_y = BARSIZE(this_data); @@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win, wmove(win, top + 1 + bar_y, right); - (void) wattrset(win, position_indicator_attr); + wattrset(win, position_indicator_attr); wattron(win, A_REVERSE); wvline(win, ACS_BLOCK, bar_high); } @@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win, attr, borderattr); - (void) wattrset(win, save); + wattrset(win, save); wmove(win, oldy, oldx); } @@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win, x, top, bottom, - menubox_border2_attr, + menubox_attr, menubox_border_attr); } Modified: head/contrib/dialog/buttons.c ============================================================================== --- head/contrib/dialog/buttons.c Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/buttons.c Sun Dec 30 04:22:34 2012 (r244850) @@ -1,9 +1,9 @@ /* - * $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $ + * $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $ * * buttons.c -- draw buttons, e.g., OK/Cancel * - * Copyright 2000-2011,2012 Thomas E. Dickey + * Copyright 2000-2010,2011 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, i : button_label_inactive_attr); (void) wmove(win, y, x); - (void) wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, "<"); - (void) wattrset(win, label_attr); + wattrset(win, label_attr); for (i = 0; i < limit; ++i) { int first = indx[i]; int last = indx[i + 1]; @@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, i const char *temp = (label + first); int cmp = string_to_char(&temp); if (dlg_isupper(cmp)) { - (void) wattrset(win, key_attr); + wattrset(win, key_attr); state = 1; } break; } #endif if (dlg_isupper(UCH(label[first]))) { - (void) wattrset(win, key_attr); + wattrset(win, key_attr); state = 1; } break; @@ -138,9 +138,9 @@ print_button(WINDOW *win, char *label, i } waddnstr(win, label + first, last - first); } - (void) wattrset(win, selected - ? button_active_attr - : button_inactive_attr); + wattrset(win, selected + ? button_active_attr + : button_inactive_attr); (void) waddstr(win, ">"); (void) wmove(win, y, x + ((int) strspn(label, " ")) + 1); } @@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win, (void) wmove(win, final_y, final_x); wrefresh(win); free(buffer); - (void) wattrset(win, save); + wattrset(win, save); } /* @@ -488,12 +488,10 @@ dlg_exit_buttoncode(int button) const char ** dlg_ok_label(void) { - static const char *labels[4]; + static const char *labels[3]; int n = 0; labels[n++] = my_ok_label(); - if (dialog_vars.extra_button) - labels[n++] = my_extra_label(); if (dialog_vars.help_button) labels[n++] = my_help_label(); labels[n] = 0; @@ -539,7 +537,6 @@ dlg_ok_buttoncode(int button) } else if (dialog_vars.help_button && (button == n)) { result = DLG_EXIT_HELP; } - dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result); return result; } @@ -578,7 +575,7 @@ dlg_prev_ok_buttonindex(int current, int /* * Find the button-index for the "OK" or "Cancel" button, according to * whether --defaultno is given. If --nocancel was given, we always return - * the index for the first button (usually "OK" unless --nook was used). + * the index for "OK". */ int dlg_defaultno_button(void) @@ -589,30 +586,6 @@ dlg_defaultno_button(void) while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL) ++result; } - dlg_trace_msg("# dlg_defaultno_button() = %d\n", result); - return result; -} - -/* - * Find the button-index for a button named with --default-button. If the - * option was not specified, or if the selected button does not exist, return - * the index of the first button (usually "OK" unless --nook was used). - */ -int -dlg_default_button(void) -{ - int i, n; - int result = 0; - - if (dialog_vars.default_button >= 0) { - for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) { - if (n == dialog_vars.default_button) { - result = i; - break; - } - } - } - dlg_trace_msg("# dlg_default_button() = %d\n", result); return result; } Modified: head/contrib/dialog/calendar.c ============================================================================== --- head/contrib/dialog/calendar.c Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/calendar.c Sun Dec 30 04:22:34 2012 (r244850) @@ -1,9 +1,9 @@ /* - * $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $ + * $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $ * * calendar.c -- implements the calendar box * - * Copyright 2001-2011,2012 Thomas E. Dickey + * Copyright 2001-2010,2011 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -225,14 +225,12 @@ draw_day(BOX * data, struct tm *current) int prev = days_in_month(current, -1); werase(data->window); - dlg_draw_box2(data->parent, - data->y - MARGIN, data->x - MARGIN, - data->height + (2 * MARGIN), data->width + (2 * MARGIN), - menubox_attr, - menubox_border_attr, - menubox_border2_attr); + dlg_draw_box(data->parent, + data->y - MARGIN, data->x - MARGIN, + data->height + (2 * MARGIN), data->width + (2 * MARGIN), + menubox_border_attr, menubox_attr); /* border of daybox */ - (void) wattrset(data->window, menubox_attr); /* daynames headline */ + wattrset(data->window, menubox_attr); /* daynames headline */ for (x = 0; x < 7; x++) { mvwprintw(data->window, 0, (x + 1) * cell_wide, "%*.*s ", @@ -248,7 +246,7 @@ draw_day(BOX * data, struct tm *current) week = (current->tm_yday + 6 + mday - current->tm_mday) / 7; for (y = 1; mday < last; y++) { - (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */ + wattrset(data->window, menubox_attr); /* weeknumbers headline */ mvwprintw(data->window, y, 0, "%*d ", @@ -259,9 +257,9 @@ draw_day(BOX * data, struct tm *current) ++mday; if (wmove(data->window, y, this_x) == ERR) continue; - (void) wattrset(data->window, item_attr); /* not selected days */ + wattrset(data->window, item_attr); /* not selected days */ if (mday == day) { - (void) wattrset(data->window, item_selected_attr); /* selected day */ + wattrset(data->window, item_selected_attr); /* selected day */ save_y = y; save_x = this_x; } @@ -296,15 +294,13 @@ draw_month(BOX * data, struct tm *curren month = current->tm_mon + 1; - (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */ + wattrset(data->parent, dialog_attr); /* Headline "Month" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month")); - dlg_draw_box2(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_attr, - menubox_border_attr, - menubox_border2_attr); - (void) wattrset(data->window, item_attr); /* color the month selection */ + dlg_draw_box(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_border_attr, menubox_attr); /* borders of monthbox */ + wattrset(data->window, item_attr); /* color the month selection */ mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1)); wmove(data->window, 0, 0); return 0; @@ -318,15 +314,13 @@ draw_year(BOX * data, struct tm *current { int year = current->tm_year + 1900; - (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */ + wattrset(data->parent, dialog_attr); /* Headline "Year" */ (void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year")); - dlg_draw_box2(data->parent, - data->y - 1, data->x - 1, - data->height + 2, data->width + 2, - menubox_attr, - menubox_border_attr, - menubox_border2_attr); - (void) wattrset(data->window, item_attr); /* color the year selection */ + dlg_draw_box(data->parent, + data->y - 1, data->x - 1, + data->height + 2, data->width + 2, + menubox_border_attr, menubox_attr); /* borders of yearbox */ + wattrset(data->window, item_attr); /* color the year selection */ mvwprintw(data->window, 0, 0, "%4d", year); wmove(data->window, 0, 0); return 0; @@ -436,7 +430,7 @@ dialog_calendar(const char *title, WINDOW *dialog; time_t now_time = time((time_t *) 0); struct tm current; - int state = dlg_default_button(); + int state = dlg_defaultno_button(); const char **buttons = dlg_ok_labels(); char *prompt = dlg_strclone(subtitle); int mincols = MIN_WIDE; @@ -497,11 +491,11 @@ dialog_calendar(const char *title, dlg_register_buttons(dialog, "calendar", buttons); /* mainbox */ - dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr); - dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr); + dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr); + dlg_draw_bottom_box(dialog); dlg_draw_title(dialog, title); - (void) wattrset(dialog, dialog_attr); /* text mainbox */ + wattrset(dialog, dialog_attr); /* text mainbox */ dlg_print_autowrap(dialog, prompt, height, width); /* compute positions of day, month and year boxes */ @@ -545,7 +539,6 @@ dialog_calendar(const char *title, return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars); } - dlg_trace_win(dialog); while (result == DLG_EXIT_UNKNOWN) { BOX *obj = (state == sDAY ? &dy_box : (state == sMONTH ? &mn_box : Modified: head/contrib/dialog/checklist.c ============================================================================== --- head/contrib/dialog/checklist.c Sun Dec 30 01:32:15 2012 (r244849) +++ head/contrib/dialog/checklist.c Sun Dec 30 04:22:34 2012 (r244850) @@ -1,9 +1,9 @@ /* - * $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $ + * $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $ * * checklist.c -- implements the checklist box * - * Copyright 2000-2011,2012 Thomas E. Dickey + * Copyright 2000-2010,2011 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -58,7 +58,7 @@ print_arrows(WINDOW *win, box_x + list_width, box_y, box_y + list_height + 1, - menubox_border2_attr, + menubox_attr, menubox_border_attr); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 06:46:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C477BDB0; Sun, 30 Dec 2012 06:46:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A8CC38FC0A; Sun, 30 Dec 2012 06:46:11 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU6kBBb044754; Sun, 30 Dec 2012 06:46:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU6kB4d044753; Sun, 30 Dec 2012 06:46:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201212300646.qBU6kB4d044753@svn.freebsd.org> From: Adrian Chadd Date: Sun, 30 Dec 2012 06:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244853 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 06:46:11 -0000 Author: adrian Date: Sun Dec 30 06:46:11 2012 New Revision: 244853 URL: http://svnweb.freebsd.org/changeset/base/244853 Log: Add spectral scan capability. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sun Dec 30 06:00:55 2012 (r244852) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sun Dec 30 06:46:11 2012 (r244853) @@ -278,7 +278,8 @@ typedef struct { hal49GhzSupport : 1, halAntDivCombSupport : 1, halAntDivCombSupportOrg : 1, - halRadioRetentionSupport : 1; + halRadioRetentionSupport : 1, + halSpectralScanSupport : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 06:48:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 721BDF1D; Sun, 30 Dec 2012 06:48:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1748FC0A; Sun, 30 Dec 2012 06:48:13 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU6mD4u045052; Sun, 30 Dec 2012 06:48:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU6mCGt045050; Sun, 30 Dec 2012 06:48:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201212300648.qBU6mCGt045050@svn.freebsd.org> From: Adrian Chadd Date: Sun, 30 Dec 2012 06:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244854 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 06:48:13 -0000 Author: adrian Date: Sun Dec 30 06:48:12 2012 New Revision: 244854 URL: http://svnweb.freebsd.org/changeset/base/244854 Log: Add the initial HAL glue for the spectral analysis support. * Finish adding the HAL capability to announce whether a NIC supports spectral scan or not; * Add spectral scan methods to the HAL structure; * Add HAL_SPECTRAL_PARAM for configuration of the spectral scan logic. The capability ID and HAL_SPECTRAL_PARAM struct are from Qualcomm Atheros. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sun Dec 30 06:46:11 2012 (r244853) +++ head/sys/dev/ath/ath_hal/ah.c Sun Dec 30 06:48:12 2012 (r244854) @@ -734,6 +734,8 @@ ath_hal_getcapability(struct ath_hal *ah return HAL_OK; case HAL_CAP_BT_COEX: return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_SPECTRAL_SCAN: + return pCap->halSpectralScanSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_HT20_SGI: return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sun Dec 30 06:46:11 2012 (r244853) +++ head/sys/dev/ath/ath_hal/ah.h Sun Dec 30 06:48:12 2012 (r244854) @@ -156,6 +156,7 @@ typedef enum { HAL_CAP_RXBUFSIZE = 81, /* Receive Buffer Length */ HAL_CAP_NUM_MR_RETRIES = 82, /* limit on multirate retries */ HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ + HAL_CAP_SPECTRAL_SCAN = 90, /* Hardware supports spectral scan */ HAL_CAP_BB_PANIC_WATCHDOG = 92, @@ -930,6 +931,20 @@ typedef struct { #define HAL_PHYERR_PARAM_NOVAL 65535 +typedef struct { + u_int16_t ss_fft_period; /* Skip interval for FFT reports */ + u_int16_t ss_period; /* Spectral scan period */ + u_int16_t ss_count; /* # of reports to return from ss_active */ + u_int16_t ss_short_report;/* Set to report ony 1 set of FFT results */ + u_int8_t radar_bin_thresh_sel; /* strong signal radar FFT threshold configuration */ + u_int16_t ss_spectral_pri; /* are we doing a noise power cal ? */ + int8_t ss_nf_cal[AH_MAX_CHAINS*2]; /* nf calibrated values for ctl+ext from eeprom */ + int8_t ss_nf_pwr[AH_MAX_CHAINS*2]; /* nf pwr values for ctl+ext from eeprom */ + int32_t ss_nf_temp_data; /* temperature data taken during nf scan */ +} HAL_SPECTRAL_PARAM; +#define HAL_SPECTRAL_PARAM_NOVAL 0xFFFF +#define HAL_SPECTRAL_PARAM_ENABLE 0x8000 /* Enable/Disable if applicable */ + /* * DFS operating mode flags. */ @@ -1433,6 +1448,17 @@ struct ath_hal { const char *buf, HAL_DFS_EVENT *event); HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah); + /* Spectral Scan functions */ + void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah, + HAL_SPECTRAL_PARAM *sp); + void __ahdecl(*ah_spectralGetConfig)(struct ath_hal *ah, + HAL_SPECTRAL_PARAM *sp); + void __ahdecl(*ah_spectralStart)(struct ath_hal *); + void __ahdecl(*ah_spectralStop)(struct ath_hal *); + HAL_BOOL __ahdecl(*ah_spectralIsEnabled)(struct ath_hal *); + HAL_BOOL __ahdecl(*ah_spectralIsActive)(struct ath_hal *); + /* XXX getNfPri() and getNfExt() */ + /* Key Cache Functions */ uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*); HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, uint16_t); From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 08:00:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB718829; Sun, 30 Dec 2012 08:00:41 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F97E8FC13; Sun, 30 Dec 2012 08:00:41 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBU80f89055696; Sun, 30 Dec 2012 08:00:41 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBU80fRs055690; Sun, 30 Dec 2012 08:00:41 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201212300800.qBU80fRs055690@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 30 Dec 2012 08:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244855 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 08:00:41 -0000 Author: ume Date: Sun Dec 30 08:00:40 2012 New Revision: 244855 URL: http://svnweb.freebsd.org/changeset/base/244855 Log: Add directories which were wrongly created during auditdistd addition. Requested by: netchild Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 30 06:48:12 2012 (r244854) +++ head/ObsoleteFiles.inc Sun Dec 30 08:00:40 2012 (r244855) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20121230: remove wrongly created directories for auditdistd +OLD_DIRS+=var/dist +OLD_DIRS+=var/remote # 20121114: zpool-features manual page moved from section 5 to 7 OLD_FILES+=usr/share/man/man5/zpool-features.5.gz # 20121022: remove harp, hfa and idt man page From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 13:47:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8CB1E44; Sun, 30 Dec 2012 13:47:40 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BC90E8FC0C; Sun, 30 Dec 2012 13:47:40 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUDleZt012110; Sun, 30 Dec 2012 13:47:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUDleZn012109; Sun, 30 Dec 2012 13:47:40 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201212301347.qBUDleZn012109@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 30 Dec 2012 13:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244857 - head/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 13:47:40 -0000 Author: pjd Date: Sun Dec 30 13:47:40 2012 New Revision: 244857 URL: http://svnweb.freebsd.org/changeset/base/244857 Log: Allow to create pool even if mount point directory is not empty if -f is given. Obtained from: WHEEL Systems Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Dec 30 08:16:05 2012 (r244856) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Dec 30 13:47:40 2012 (r244857) @@ -906,10 +906,11 @@ zpool_do_create(int argc, char **argv) /* * Check the validity of the mountpoint and direct the user to use the * '-m' mountpoint option if it looks like its in use. + * Ignore the checks if the '-f' option is given. */ - if (mountpoint == NULL || + if (!force && (mountpoint == NULL || (strcmp(mountpoint, ZFS_MOUNTPOINT_LEGACY) != 0 && - strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0)) { + strcmp(mountpoint, ZFS_MOUNTPOINT_NONE) != 0))) { char buf[MAXPATHLEN]; DIR *dirp; From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 14:33:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9ABA5A04; Sun, 30 Dec 2012 14:33:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 630598FC0C; Sun, 30 Dec 2012 14:33:17 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUEXHae019325; Sun, 30 Dec 2012 14:33:17 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUEXHf4019323; Sun, 30 Dec 2012 14:33:17 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201212301433.qBUEXHf4019323@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 30 Dec 2012 14:33:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244858 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 14:33:17 -0000 Author: nwhitehorn Date: Sun Dec 30 14:33:16 2012 New Revision: 244858 URL: http://svnweb.freebsd.org/changeset/base/244858 Log: If invoked as sade, don't complain about having a filesystem on / already -- it's something you expect (and indeed hope for). MFC after: 1 week Modified: head/usr.sbin/bsdinstall/partedit/partedit.c Modified: head/usr.sbin/bsdinstall/partedit/partedit.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.c Sun Dec 30 13:47:40 2012 (r244857) +++ head/usr.sbin/bsdinstall/partedit/partedit.c Sun Dec 30 14:33:16 2012 (r244858) @@ -41,6 +41,7 @@ #include "partedit.h" struct pmetadata_head part_metadata; +static int sade_mode = 0; static int apply_changes(struct gmesh *mesh); static struct partedit_item *read_geom_mesh(struct gmesh *mesh, int *nitems); @@ -75,12 +76,15 @@ main(int argc, const char **argv) int i, op, nitems, nscroll; int error; + if (strcmp(basename(argv[0]), "sade") == 0) + sade_mode = 1; + TAILQ_INIT(&part_metadata); init_fstab_metadata(); init_dialog(stdin, stdout); - if (strcmp(basename(argv[0]), "sade") != 0) + if (!sade_mode) dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer"); dialog_vars.item_help = TRUE; nscroll = i = 0; @@ -261,7 +265,7 @@ validate_setup(void) * Check for root partitions that we aren't formatting, which is * usually a mistake */ - if (root->newfs == NULL) { + if (root->newfs == NULL && !sade_mode) { dialog_vars.defaultno = TRUE; cancel = dialog_yesno("Warning", "The chosen root partition " "has a preexisting filesystem. If it contains an existing " From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 14:35:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A7854B74; Sun, 30 Dec 2012 14:35:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 724678FC0A; Sun, 30 Dec 2012 14:35:01 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUEZ1nq019604; Sun, 30 Dec 2012 14:35:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUEZ02Z019596; Sun, 30 Dec 2012 14:35:00 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201212301435.qBUEZ02Z019596@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 30 Dec 2012 14:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244859 - in head/usr.sbin: . bsdinstall/partedit sade X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 14:35:01 -0000 Author: nwhitehorn Date: Sun Dec 30 14:35:00 2012 New Revision: 244859 URL: http://svnweb.freebsd.org/changeset/base/244859 Log: Replace sade the extracted piece of sysinstall with sade the extracted piece of bsdinstall (although this time with a symlink instead of duplicated source code). Discussed on: freebsd-geom MFC after: 3 months Deleted: head/usr.sbin/sade/ Modified: head/usr.sbin/Makefile.amd64 head/usr.sbin/Makefile.i386 head/usr.sbin/Makefile.sparc64 head/usr.sbin/bsdinstall/partedit/Makefile Modified: head/usr.sbin/Makefile.amd64 ============================================================================== --- head/usr.sbin/Makefile.amd64 Sun Dec 30 14:33:16 2012 (r244858) +++ head/usr.sbin/Makefile.amd64 Sun Dec 30 14:35:00 2012 (r244859) @@ -23,7 +23,4 @@ SUBDIR+= ndiscvt .endif SUBDIR+= sicontrol SUBDIR+= spkrtest -.if ${MK_SYSINSTALL} != "no" -SUBDIR+= sade -.endif SUBDIR+= zzz Modified: head/usr.sbin/Makefile.i386 ============================================================================== --- head/usr.sbin/Makefile.i386 Sun Dec 30 14:33:16 2012 (r244858) +++ head/usr.sbin/Makefile.i386 Sun Dec 30 14:35:00 2012 (r244859) @@ -17,9 +17,6 @@ SUBDIR+= mptable SUBDIR+= ndiscvt .endif SUBDIR+= pnpinfo -.if ${MK_SYSINSTALL} != "no" -SUBDIR+= sade -.endif SUBDIR+= sicontrol SUBDIR+= spkrtest SUBDIR+= zzz Modified: head/usr.sbin/Makefile.sparc64 ============================================================================== --- head/usr.sbin/Makefile.sparc64 Sun Dec 30 14:33:16 2012 (r244858) +++ head/usr.sbin/Makefile.sparc64 Sun Dec 30 14:35:00 2012 (r244859) @@ -2,6 +2,3 @@ SUBDIR+= eeprom SUBDIR+= ofwdump -.if ${MK_SYSINSTALL} != "no" -SUBDIR+= sade -.endif Modified: head/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/partedit/Makefile Sun Dec 30 14:33:16 2012 (r244858) +++ head/usr.sbin/bsdinstall/partedit/Makefile Sun Dec 30 14:35:00 2012 (r244859) @@ -2,7 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= partedit -LINKS= ${BINDIR}/partedit ${BINDIR}/autopart +LINKS= ${BINDIR}/partedit ${BINDIR}/autopart ${BINDIR}/partedit /usr/sbin/sade LDADD= -lgeom -lncursesw -lutil -ldialog -lm PARTEDIT_ARCH= ${MACHINE} From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 14:44:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE294D7D; Sun, 30 Dec 2012 14:44:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91A658FC08; Sun, 30 Dec 2012 14:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUEiFaZ020895; Sun, 30 Dec 2012 14:44:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUEiFqd020893; Sun, 30 Dec 2012 14:44:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201212301444.qBUEiFqd020893@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 30 Dec 2012 14:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244860 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 14:44:15 -0000 Author: nwhitehorn Date: Sun Dec 30 14:44:14 2012 New Revision: 244860 URL: http://svnweb.freebsd.org/changeset/base/244860 Log: Add a man page for the new sade(8), which is mostly the same uninformative manpage as the old sade(8). Added: head/usr.sbin/bsdinstall/partedit/sade.8 (contents, props changed) Modified: head/usr.sbin/bsdinstall/partedit/Makefile Modified: head/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/partedit/Makefile Sun Dec 30 14:35:00 2012 (r244859) +++ head/usr.sbin/bsdinstall/partedit/Makefile Sun Dec 30 14:44:14 2012 (r244860) @@ -17,6 +17,6 @@ SRCS= diskeditor.c partedit.c gpart_ops. part_wizard.c WARNS?= 3 -NO_MAN= true +MAN= sade.8 .include Added: head/usr.sbin/bsdinstall/partedit/sade.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdinstall/partedit/sade.8 Sun Dec 30 14:44:14 2012 (r244860) @@ -0,0 +1,75 @@ +.\" Copyright (c) 1997 +.\" Jordan Hubbard . All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY Jordan Hubbard 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 Jordan Hubbard OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 30, 2012 +.Dt SADE 8 +.Os +.Sh NAME +.Nm sade +.Nd sysadmins disk editor +.Sh SYNOPSIS +.Nm +.Sh DESCRIPTION +The +.Nm +utility is used for various disk administration tasks on +.Fx +systems. +.Pp +It is generally invoked without arguments for the default +behavior, where the main menu is presented. +.Sh NOTES +The +.Nm +utility aims to provide a handy tool for disk management +tasks on an already installed system. +The goal is to provide the same text interface for disk management in +.Xr bsdinstall 8 +in the post-installation environment. +.Sh SEE ALSO +.Xr bsdinstall 8 , +.Xr gpart 8 +.Sh HISTORY +A program called +.Nm +first appeared in +.Fx 6.3 +as a utility encapsulating features from the +.Xr sysinstall 8 +installer. It was replaced in +.Fx 10.0 +with the equivalent part of +.Xr bsdinstall 8 . +.Sh AUTHORS +.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org +.Sh BUGS +The utility misses a lot of nice features, such as tools for +manipulating +.Xr gmirror 8 +or +.Xr zfs 8 +. +These will be added later. From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 15:20:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BA09570; Sun, 30 Dec 2012 15:20:28 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB538FC14; Sun, 30 Dec 2012 15:20:28 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUFKSYA026449; Sun, 30 Dec 2012 15:20:28 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUFKR0o026446; Sun, 30 Dec 2012 15:20:27 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201212301520.qBUFKR0o026446@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Dec 2012 15:20:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244861 - head/usr.bin/dc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 15:20:28 -0000 Author: kevlo Date: Sun Dec 30 15:20:27 2012 New Revision: 244861 URL: http://svnweb.freebsd.org/changeset/base/244861 Log: - Use BN_set_negative() and BN_is_negative() instead of subtracting or comparing to zero. - Fix fractional number exponentiation, especially for negative exponents. Obtained from: OpenBSD Modified: head/usr.bin/dc/bcode.c head/usr.bin/dc/bcode.h head/usr.bin/dc/inout.c Modified: head/usr.bin/dc/bcode.c ============================================================================== --- head/usr.bin/dc/bcode.c Sun Dec 30 14:44:14 2012 (r244860) +++ head/usr.bin/dc/bcode.c Sun Dec 30 15:20:27 2012 (r244861) @@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$"); #include "extern.h" -BIGNUM zero; - #define __inline #define MAX_ARRAY_INDEX 2048 @@ -250,8 +248,12 @@ init_bmachine(bool extended_registers) if (bmachine.readstack == NULL) err(1, NULL); bmachine.obase = bmachine.ibase = 10; - BN_init(&zero); - bn_check(BN_zero(&zero)); +} + +u_int +bmachine_scale(void) +{ + return (bmachine.scale); } /* Reset the things needed before processing a (new) file */ @@ -407,7 +409,7 @@ split_number(const struct number *n, BIG } } -__inline void +void normalize(struct number *n, u_int s) { @@ -427,7 +429,7 @@ void negate(struct number *n) { - bn_check(BN_sub(n->number, &zero, n->number)); + BN_set_negative(n->number, !BN_is_negative(n->number)); } static __inline void @@ -581,7 +583,7 @@ set_scale(void) n = pop_number(); if (n != NULL) { - if (BN_cmp(n->number, &zero) < 0) + if (BN_is_negative(n->number)) warnx("scale must be a nonnegative number"); else { scale = get_ulong(n); @@ -878,7 +880,7 @@ load_array(void) if (inumber == NULL) return; idx = get_ulong(inumber); - if (BN_cmp(inumber->number, &zero) < 0) + if (BN_is_negative(inumber->number)) warnx("negative idx"); else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX) warnx("idx too big"); @@ -917,7 +919,7 @@ store_array(void) return; } idx = get_ulong(inumber); - if (BN_cmp(inumber->number, &zero) < 0) { + if (BN_is_negative(inumber->number)) { warnx("negative idx"); stack_free_value(value); } else if (idx == BN_MASK2 || idx > MAX_ARRAY_INDEX) { @@ -1009,7 +1011,7 @@ bsub(void) } void -bmul_number(struct number *r, struct number *a, struct number *b) +bmul_number(struct number *r, struct number *a, struct number *b, u_int scale) { BN_CTX *ctx; @@ -1023,11 +1025,9 @@ bmul_number(struct number *r, struct num bn_check(BN_mul(r->number, a->number, b->number, ctx)); BN_CTX_free(ctx); - if (rscale > bmachine.scale && rscale > ascale && rscale > bscale) { - r->scale = rscale; - normalize(r, max(bmachine.scale, max(ascale, bscale))); - } else - r->scale = rscale; + r->scale = rscale; + if (rscale > bmachine.scale && rscale > ascale && rscale > bscale) + normalize(r, max(scale, max(ascale, bscale))); } static void @@ -1046,7 +1046,7 @@ bmul(void) } r = new_number(); - bmul_number(r, a, b); + bmul_number(r, a, b, bmachine.scale); push_number(r); free_number(a); @@ -1172,7 +1172,7 @@ static void bexp(void) { struct number *a, *p, *r; - u_int scale; + u_int rscale; bool neg; p = pop_number(); @@ -1185,15 +1185,27 @@ bexp(void) return; } - if (p->scale != 0) - warnx("Runtime warning: non-zero scale in exponent"); + if (p->scale != 0) { + BIGNUM *i, *f; + i = BN_new(); + bn_checkp(i); + f = BN_new(); + bn_checkp(f); + split_number(p, i, f); + if (!BN_is_zero(f)) + warnx("Runtime warning: non-zero fractional part " + "in exponent"); + BN_free(i); + BN_free(f); + } + normalize(p, 0); neg = false; - if (BN_cmp(p->number, &zero) < 0) { + if (BN_is_negative(p->number)) { neg = true; negate(p); - scale = bmachine.scale; + rscale = bmachine.scale; } else { /* Posix bc says min(a.scale * b, max(a.scale, scale) */ u_long b; @@ -1201,30 +1213,37 @@ bexp(void) b = BN_get_word(p->number); m = max(a->scale, bmachine.scale); - scale = a->scale * (u_int)b; - if (scale > m || (a->scale > 0 && (b == BN_MASK2 || + rscale = a->scale * (u_int)b; + if (rscale > m || (a->scale > 0 && (b == BN_MASK2 || b > UINT_MAX))) - scale = m; + rscale = m; } if (BN_is_zero(p->number)) { r = new_number(); bn_check(BN_one(r->number)); - normalize(r, scale); + normalize(r, rscale); } else { + u_int ascale, mscale; + + ascale = a->scale; while (!BN_is_bit_set(p->number, 0)) { - bmul_number(a, a, a); + ascale *= 2; + bmul_number(a, a, a, ascale); bn_check(BN_rshift1(p->number, p->number)); } r = dup_number(a); - normalize(r, scale); bn_check(BN_rshift1(p->number, p->number)); + mscale = ascale; while (!BN_is_zero(p->number)) { - bmul_number(a, a, a); - if (BN_is_bit_set(p->number, 0)) - bmul_number(r, r, a); + ascale *= 2; + bmul_number(a, a, a, ascale); + if (BN_is_bit_set(p->number, 0)) { + mscale += ascale; + bmul_number(r, r, a, mscale); + } bn_check(BN_rshift1(p->number, p->number)); } @@ -1237,13 +1256,18 @@ bexp(void) bn_check(BN_one(one)); ctx = BN_CTX_new(); bn_checkp(ctx); - scale_number(one, r->scale + scale); - normalize(r, scale); - bn_check(BN_div(r->number, NULL, one, r->number, ctx)); + scale_number(one, r->scale + rscale); + + if (BN_is_zero(r->number)) + warnx("divide by zero"); + else + bn_check(BN_div(r->number, NULL, one, + r->number, ctx)); BN_free(one); BN_CTX_free(ctx); + r->scale = rscale; } else - normalize(r, scale); + normalize(r, rscale); } push_number(r); free_number(a); @@ -1282,7 +1306,7 @@ bsqrt(void) if (BN_is_zero(n->number)) { r = new_number(); push_number(r); - } else if (BN_cmp(n->number, &zero) < 0) + } else if (BN_is_negative(n->number)) warnx("square root of negative number"); else { scale = max(bmachine.scale, n->scale); Modified: head/usr.bin/dc/bcode.h ============================================================================== --- head/usr.bin/dc/bcode.h Sun Dec 30 14:44:14 2012 (r244860) +++ head/usr.bin/dc/bcode.h Sun Dec 30 15:20:27 2012 (r244861) @@ -85,6 +85,7 @@ struct source { void init_bmachine(bool); void reset_bmachine(struct source *); +u_int bmachine_scale(void); void scale_number(BIGNUM *, int); void normalize(struct number *, u_int); void eval(void); @@ -93,6 +94,4 @@ void pbn(const char *, const BIGNUM * void negate(struct number *); void split_number(const struct number *, BIGNUM *, BIGNUM *); void bmul_number(struct number *, struct number *, - struct number *); - -extern BIGNUM zero; + struct number *, u_int); Modified: head/usr.bin/dc/inout.c ============================================================================== --- head/usr.bin/dc/inout.c Sun Dec 30 14:44:14 2012 (r244860) +++ head/usr.bin/dc/inout.c Sun Dec 30 15:20:27 2012 (r244861) @@ -322,7 +322,7 @@ printnumber(FILE *f, const struct number i++; } sz = i; - if (BN_cmp(b->number, &zero) < 0) + if (BN_is_negative(b->number)) putcharwrap(f, '-'); for (i = 0; i < sz; i++) { p = stack_popstring(&stack); @@ -353,7 +353,8 @@ printnumber(FILE *f, const struct number putcharwrap(f, ' '); i = 1; - bmul_number(fract_part, fract_part, num_base); + bmul_number(fract_part, fract_part, num_base, + bmachine_scale()); split_number(fract_part, int_part->number, NULL); rem = BN_get_word(int_part->number); p = get_digit(rem, digits, base); @@ -402,8 +403,8 @@ print_ascii(FILE *f, const struct number v = BN_dup(n->number); bn_checkp(v); - if (BN_cmp(v, &zero) < 0) - bn_check(BN_sub(v, &zero, v)); + if (BN_is_negative(v)) + BN_set_negative(v, 0); numbits = BN_num_bytes(v) * 8; while (numbits > 0) { From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 16:28:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 607C1559; Sun, 30 Dec 2012 16:28:07 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBED8FC0A; Sun, 30 Dec 2012 16:28:07 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBUGS7MZ037197; Sun, 30 Dec 2012 16:28:07 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBUGS6tE037193; Sun, 30 Dec 2012 16:28:06 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201212301628.qBUGS6tE037193@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 30 Dec 2012 16:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244865 - in head: . lib lib/libdisk share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 16:28:07 -0000 Author: nwhitehorn Date: Sun Dec 30 16:28:06 2012 New Revision: 244865 URL: http://svnweb.freebsd.org/changeset/base/244865 Log: With the old sade removed, libdisk is no longer used by anything in HEAD and uses a number of problematic pre-gpart interfaces. Since it has been entirely obsoleted by interfaces in geom, remove it. Deleted: head/lib/libdisk/ Modified: head/ObsoleteFiles.inc head/lib/Makefile head/share/mk/bsd.libnames.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 30 15:38:06 2012 (r244864) +++ head/ObsoleteFiles.inc Sun Dec 30 16:28:06 2012 (r244865) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20121230: libdisk removed +OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h +OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a # 20121230: remove wrongly created directories for auditdistd OLD_DIRS+=var/dist OLD_DIRS+=var/remote Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Sun Dec 30 15:38:06 2012 (r244864) +++ head/lib/Makefile Sun Dec 30 16:28:06 2012 (r244865) @@ -69,7 +69,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ libcompat \ libdevinfo \ libdevstat \ - libdisk \ libdwarf \ libedit \ ${_libefi} \ Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Sun Dec 30 15:38:06 2012 (r244864) +++ head/share/mk/bsd.libnames.mk Sun Dec 30 16:28:06 2012 (r244865) @@ -45,7 +45,6 @@ LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurse LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a -LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a @@ -54,7 +53,6 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a -LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgcc_pic.a From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 21:10:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D919DB2; Sun, 30 Dec 2012 21:10:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 324D68FC08; Sun, 30 Dec 2012 21:10:49 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBULAnmb081347; Sun, 30 Dec 2012 21:10:49 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBULAnYm081346; Sun, 30 Dec 2012 21:10:49 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212302110.qBULAnYm081346@svn.freebsd.org> From: Robert Watson Date: Sun, 30 Dec 2012 21:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244871 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 21:10:49 -0000 Author: rwatson Date: Sun Dec 30 21:10:48 2012 New Revision: 244871 URL: http://svnweb.freebsd.org/changeset/base/244871 Log: When a partially initialised FDT-based device instance can't attach, perhaps due to an interrupt configuration problem, do not try to free device ivars that have not yet have been allocated. MFC after: 1 week Reviewed by: gonzo Sponsored by: DARPA, AFRL Modified: head/sys/dev/fdt/fdtbus.c Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Sun Dec 30 21:07:21 2012 (r244870) +++ head/sys/dev/fdt/fdtbus.c Sun Dec 30 21:10:48 2012 (r244871) @@ -257,6 +257,8 @@ newbus_device_destroy(device_t dev) struct fdtbus_devinfo *di; di = device_get_ivars(dev); + if (di == NULL) + return; free(di->di_name, M_OFWPROP); free(di->di_type, M_OFWPROP); From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 02:54:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F0BACE7; Mon, 31 Dec 2012 02:54:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx1.freebsd.org (Postfix) with ESMTP id 59F928FC13; Mon, 31 Dec 2012 02:54:41 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id dq11so5460440wgb.26 for ; Sun, 30 Dec 2012 18:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=E2ybxjALRIBmMhkONBfFD0J/Z3j4fDWSljGsLKZ6qRE=; b=LTe/Dntlff+7aQ0p1ZFO9Scvn3TYyF9UWajOtOs1X1q2mAPOOkz1OQtPuvZMpDsJ08 ypEE81l6Fd2Y6CxuIsj+91tKb7ERhnrhQrkM+vcfLDv/uda0V3fT1sxozF+cpNcK59sD xbhjLFhHnmw9vHtFbNnsCt+tLsIU/pL7o5e6ZRDVIW5otJiNnIbsTqE6tESiPAkrkJaK j/jwpSwuVzU+aMGflp3J08GDKiGmukRFiGalg4vDeXkCQEs+35keHd1FuWMjBNxvvCFb yn6/rKUG9JM9XYBQZ7h+2ztAnQhCRkccKWuK/YV3f+nHkFhaxEObXZUQO3rexffFR/0n xm1w== MIME-Version: 1.0 Received: by 10.180.109.201 with SMTP id hu9mr10698114wib.32.1356922475274; Sun, 30 Dec 2012 18:54:35 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Sun, 30 Dec 2012 18:54:35 -0800 (PST) In-Reply-To: <201212301628.qBUGS6tE037193@svn.freebsd.org> References: <201212301628.qBUGS6tE037193@svn.freebsd.org> Date: Sun, 30 Dec 2012 18:54:35 -0800 X-Google-Sender-Auth: RQjwDM7trmn4JXYVEvOTXIZh_04 Message-ID: Subject: Re: svn commit: r244865 - in head: . lib lib/libdisk share/mk From: Adrian Chadd To: Nathan Whitehorn , freebsd-current Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 02:54:43 -0000 .. not that I mind old things being retired, but we really should announce things like this. Also - you disconnected libftpio too; is that intentional? Just because libdisk/libftpio isn't used by anything in the base -HEAD doesn't mean that: * it's not used by third party programs in ports; * it's not used by any external, non open source utilities that people have read. So I'd suggest creating a port for them both and begin the process of deprecating the kernel side interfaces that are unique to this API. Thanks, Adrian On 30 December 2012 08:28, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Dec 30 16:28:06 2012 > New Revision: 244865 > URL: http://svnweb.freebsd.org/changeset/base/244865 > > Log: > With the old sade removed, libdisk is no longer used by anything in HEAD > and uses a number of problematic pre-gpart interfaces. Since it has been > entirely obsoleted by interfaces in geom, remove it. > > Deleted: > head/lib/libdisk/ > Modified: > head/ObsoleteFiles.inc > head/lib/Makefile > head/share/mk/bsd.libnames.mk > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sun Dec 30 15:38:06 2012 (r244864) > +++ head/ObsoleteFiles.inc Sun Dec 30 16:28:06 2012 (r244865) > @@ -38,6 +38,9 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20121230: libdisk removed > +OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h > +OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a > # 20121230: remove wrongly created directories for auditdistd > OLD_DIRS+=var/dist > OLD_DIRS+=var/remote > > Modified: head/lib/Makefile > ============================================================================== > --- head/lib/Makefile Sun Dec 30 15:38:06 2012 (r244864) > +++ head/lib/Makefile Sun Dec 30 16:28:06 2012 (r244865) > @@ -69,7 +69,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ > libcompat \ > libdevinfo \ > libdevstat \ > - libdisk \ > libdwarf \ > libedit \ > ${_libefi} \ > > Modified: head/share/mk/bsd.libnames.mk > ============================================================================== > --- head/share/mk/bsd.libnames.mk Sun Dec 30 15:38:06 2012 (r244864) > +++ head/share/mk/bsd.libnames.mk Sun Dec 30 16:28:06 2012 (r244865) > @@ -45,7 +45,6 @@ LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurse > LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a > LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a > LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a > -LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a > LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a > LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a > LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a > @@ -54,7 +53,6 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a > LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a > LIBFL?= "don't use LIBFL, use LIBL" > LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a > -LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a > LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a > LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a > LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgcc_pic.a From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 02:57:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F6F7F66; Mon, 31 Dec 2012 02:57:47 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) by mx1.freebsd.org (Postfix) with ESMTP id B272C8FC08; Mon, 31 Dec 2012 02:57:46 +0000 (UTC) Received: by mail-ob0-f171.google.com with SMTP id dn14so11173707obc.16 for ; Sun, 30 Dec 2012 18:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Mg0DZsPzAODgqsg5fM3XJPSmVakiZNdbWoLVl6vLm9E=; b=FtONUvTOi8VK+MTpltMTF3GNPKW5hiS1lhmadsWdWTL7ngMlRJf/B5Wvk2t8F1I5CL DIzuepWU2dgthGH0zxhfSjyDZZqWCQEJeW0/CpuIx07ZUqLWvwxPXjvnX4AwLkpbbsAL Ij5M6GPUGrgBeOKFDcsbidzVolAaFSCaMLCaDap/1fIw8iN83o5LT69VXUjnek40jvnU 7xafw5R/llSlu3scMfb+U6tz8/bqd7SEl6xYX99nBd4sU35twRIrWuFx+zIdSehb6sw0 nQ3Zb6/VV/y06Aon32fx1YCDvyiwRsHRQvbyxn9C/y+qQGEQxwVy2jnV7HtvSqzKCQFC Qveg== MIME-Version: 1.0 Received: by 10.182.95.205 with SMTP id dm13mr33508079obb.9.1356922665763; Sun, 30 Dec 2012 18:57:45 -0800 (PST) Received: by 10.76.143.33 with HTTP; Sun, 30 Dec 2012 18:57:45 -0800 (PST) In-Reply-To: References: <201212301628.qBUGS6tE037193@svn.freebsd.org> Date: Sun, 30 Dec 2012 18:57:45 -0800 Message-ID: Subject: Re: svn commit: r244865 - in head: . lib lib/libdisk share/mk From: Garrett Cooper To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, freebsd-current , src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 02:57:47 -0000 On Sun, Dec 30, 2012 at 6:54 PM, Adrian Chadd wrote: > .. not that I mind old things being retired, but we really should > announce things like this. > > Also - you disconnected libftpio too; is that intentional? > > Just because libdisk/libftpio isn't used by anything in the base -HEAD > doesn't mean that: > > * it's not used by third party programs in ports; > * it's not used by any external, non open source utilities that people > have read. > > So I'd suggest creating a port for them both and begin the process of > deprecating the kernel side interfaces that are unique to this API. +1 This is what exp- runs are for (portmgr can help with this). HTH, -Garrett From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 05:26:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7493171 for ; Mon, 31 Dec 2012 05:26:26 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-yh0-f45.google.com (mail-yh0-f45.google.com [209.85.213.45]) by mx1.freebsd.org (Postfix) with ESMTP id 86F998FC0C for ; Mon, 31 Dec 2012 05:26:26 +0000 (UTC) Received: by mail-yh0-f45.google.com with SMTP id f64so47478yha.4 for ; Sun, 30 Dec 2012 21:26:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=OiJKmgKBKLpgO5FlpDMiSdvA2liUNIRnjMqMfF8d4Ek=; b=ewqP7El+mnkvKD7MYmdo6Uo4udGTTJGn6Dr2x+ynQlMtimuww0UyIIwyzM2h9xTxLt L2ZlORGWZKKWHNHNI0BR958b3OA4KG6GlAbFPXLFrlAmokZcSd2AVaFCKDGh7niuFqJY eUDESNe1xk4hcLMnapl03nvb586u/hSkTpmCInZ53mjmm6DoYouVAcK/n1bMwpxmvoOE WIGlU0dlrDLq4/LT1rUm2xrl+78hq1xus1yrU2bfYw0fv6/KWUsmf3RYeeQQn00ufB4o hA1Rpv9KtOWypUrq3xGiqjRJpXM07xSsAVaRULPPwGW1+8eEzZqkoj+1RYYu6mg6sjeF L50Q== Received: by 10.236.154.165 with SMTP id h25mr36924331yhk.38.1356931150979; Sun, 30 Dec 2012 21:19:10 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.147.119.38 with HTTP; Sun, 30 Dec 2012 21:18:50 -0800 (PST) In-Reply-To: References: <201212301628.qBUGS6tE037193@svn.freebsd.org> From: Juli Mallett Date: Sun, 30 Dec 2012 21:18:50 -0800 X-Google-Sender-Auth: FCOkDL9foF8aXTLlXB-Xy2s3WP0 Message-ID: Subject: Re: svn commit: r244865 - in head: . lib lib/libdisk share/mk To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQknkhPl6FuvaXFtkdYqP1nJvvkKfdmSMTJ3wrZTm1K97y0Uu5ASCK6qZYoq2CBsft5r/Kz2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, freebsd-current , src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 05:26:26 -0000 On Sun, Dec 30, 2012 at 6:54 PM, Adrian Chadd wrote: > .. not that I mind old things being retired, but we really should > announce things like this. > > Also - you disconnected libftpio too; is that intentional? I would assume so, given that this only removed the static library name, which nothing else could be using still, seeing as how the library was disconnected and removed in r225952. > Just because libdisk/libftpio isn't used by anything in the base -HEAD > doesn't mean that: > > * it's not used by third party programs in ports; > * it's not used by any external, non open source utilities that people > have read. > > So I'd suggest creating a port for them both and begin the process of > deprecating the kernel side interfaces that are unique to this API. Pretty sure the addition of and widespread use of GEOM things initiated the deprecation of the really lousy and properly-disliked kernel interfaces involved. > On 30 December 2012 08:28, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Sun Dec 30 16:28:06 2012 >> New Revision: 244865 >> URL: http://svnweb.freebsd.org/changeset/base/244865 >> >> Log: >> With the old sade removed, libdisk is no longer used by anything in HEAD >> and uses a number of problematic pre-gpart interfaces. Since it has been >> entirely obsoleted by interfaces in geom, remove it. >> >> Deleted: >> head/lib/libdisk/ >> Modified: >> head/ObsoleteFiles.inc >> head/lib/Makefile >> head/share/mk/bsd.libnames.mk >> >> Modified: head/ObsoleteFiles.inc >> ============================================================================== >> --- head/ObsoleteFiles.inc Sun Dec 30 15:38:06 2012 (r244864) >> +++ head/ObsoleteFiles.inc Sun Dec 30 16:28:06 2012 (r244865) >> @@ -38,6 +38,9 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> >> +# 20121230: libdisk removed >> +OLD_FILES+=usr/share/man/man3/libdisk.3.gz usr/include/libdisk.h >> +OLD_FILES+=usr/lib/libdisk.a usr/lib32/libdisk.a >> # 20121230: remove wrongly created directories for auditdistd >> OLD_DIRS+=var/dist >> OLD_DIRS+=var/remote >> >> Modified: head/lib/Makefile >> ============================================================================== >> --- head/lib/Makefile Sun Dec 30 15:38:06 2012 (r244864) >> +++ head/lib/Makefile Sun Dec 30 16:28:06 2012 (r244865) >> @@ -69,7 +69,6 @@ SUBDIR= ${SUBDIR_ORDERED} \ >> libcompat \ >> libdevinfo \ >> libdevstat \ >> - libdisk \ >> libdwarf \ >> libedit \ >> ${_libefi} \ >> >> Modified: head/share/mk/bsd.libnames.mk >> ============================================================================== >> --- head/share/mk/bsd.libnames.mk Sun Dec 30 15:38:06 2012 (r244864) >> +++ head/share/mk/bsd.libnames.mk Sun Dec 30 16:28:06 2012 (r244865) >> @@ -45,7 +45,6 @@ LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurse >> LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a >> LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a >> LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a >> -LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a >> LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a >> LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a >> LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a >> @@ -54,7 +53,6 @@ LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a >> LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a >> LIBFL?= "don't use LIBFL, use LIBL" >> LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a >> -LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a >> LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a >> LIBGCC?= ${DESTDIR}${LIBDIR}/libgcc.a >> LIBGCC_PIC?= ${DESTDIR}${LIBDIR}/libgcc_pic.a From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 07:11:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72FCE2E7; Mon, 31 Dec 2012 07:11:23 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 46ECB8FC15; Mon, 31 Dec 2012 07:11:21 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 2F17C56078; Mon, 31 Dec 2012 01:11:21 -0600 (CST) Date: Mon, 31 Dec 2012 01:11:21 -0600 From: Mark Linimon To: Garrett Cooper Subject: Re: svn commit: r244865 - in head: . lib lib/libdisk share/mk Message-ID: <20121231071121.GA11697@lonesome.com> References: <201212301628.qBUGS6tE037193@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, freebsd-current , Nathan Whitehorn , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 07:11:23 -0000 On Sun, Dec 30, 2012 at 06:57:45PM -0800, Garrett Cooper wrote: > This is what exp- runs are for (portmgr can help with this). OTOH -exp runs are currently off the air. mcl From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 11:06:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AA4BB1C; Mon, 31 Dec 2012 11:06:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 55B048FC1F; Mon, 31 Dec 2012 11:06:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVB6c86016662; Mon, 31 Dec 2012 11:06:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVB6chM016661; Mon, 31 Dec 2012 11:06:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212311106.qBVB6chM016661@svn.freebsd.org> From: Robert Watson Date: Mon, 31 Dec 2012 11:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244899 - head/sys/mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 11:06:38 -0000 Author: rwatson Date: Mon Dec 31 11:06:37 2012 New Revision: 244899 URL: http://svnweb.freebsd.org/changeset/base/244899 Log: If FDT is compiled into a FreeBSD/beri kernel, initialise OpenFirmware. Sponsored by: DARPA, AFRL Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c ============================================================================== --- head/sys/mips/beri/beri_machdep.c Mon Dec 31 07:50:02 2012 (r244898) +++ head/sys/mips/beri/beri_machdep.c Mon Dec 31 11:06:37 2012 (r244899) @@ -1,7 +1,12 @@ /*- * Copyright (c) 2006 Wojciech A. Koszek + * Copyright (c) 2012 Robert N. M. Watson * All rights reserved. * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -27,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_platform.h" #include #include @@ -49,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include @@ -76,6 +85,17 @@ mips_init(void) { int i; +#ifdef FDT +#ifndef FDT_DTB_STATIC +#error "mips_init with FDT requires FDT_DTB_STATIC" +#endif + + if (OF_install(OFW_FDT, 0) == FALSE) + while (1); + if (OF_init(&fdt_static_dtb) != 0) + while (1); +#endif + for (i = 0; i < 10; i++) { phys_avail[i] = 0; } From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 11:22:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A00DA55; Mon, 31 Dec 2012 11:22:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE4E8FC12; Mon, 31 Dec 2012 11:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVBMtVw019353; Mon, 31 Dec 2012 11:22:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVBMtAb019351; Mon, 31 Dec 2012 11:22:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201212311122.qBVBMtAb019351@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 31 Dec 2012 11:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244900 - in head: . sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 11:22:56 -0000 Author: bz Date: Mon Dec 31 11:22:55 2012 New Revision: 244900 URL: http://svnweb.freebsd.org/changeset/base/244900 Log: Happy New Year 2013! Modified: head/COPYRIGHT head/sys/sys/copyright.h Modified: head/COPYRIGHT ============================================================================== --- head/COPYRIGHT Mon Dec 31 11:06:37 2012 (r244899) +++ head/COPYRIGHT Mon Dec 31 11:22:55 2012 (r244900) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2013 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Mon Dec 31 11:06:37 2012 (r244899) +++ head/sys/sys/copyright.h Mon Dec 31 11:22:55 2012 (r244900) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2013 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2012 The FreeBSD Project.\n" + "Copyright (c) 1992-2013 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 14:33:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03EAB791; Mon, 31 Dec 2012 14:33:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id BDBD68FC0C; Mon, 31 Dec 2012 14:33:02 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MFW00F00GF2QA00@smtpauth1.wiscmail.wisc.edu>; Mon, 31 Dec 2012 08:33:02 -0600 (CST) Received: from wanderer.tachypleus.net (pool-72-66-126-15.washdc.fios.verizon.net [72.66.126.15]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MFW008FCGEZ2A20@smtpauth1.wiscmail.wisc.edu>; Mon, 31 Dec 2012 08:33:01 -0600 (CST) Date: Mon, 31 Dec 2012 09:32:59 -0500 From: Nathan Whitehorn Subject: Re: svn commit: r244865 - in head: . lib lib/libdisk share/mk In-reply-to: Sender: whitehorn@wisc.edu To: Juli Mallett Message-id: <50E1A21B.5060008@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=72.66.126.15 X-Spam-PmxInfo: Server=avs-16, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.12.31.142119, SenderIP=72.66.126.15 References: <201212301628.qBUGS6tE037193@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 Cc: svn-src-head@freebsd.org, Adrian Chadd , freebsd-current , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 14:33:03 -0000 On 12/31/12 00:18, Juli Mallett wrote: > On Sun, Dec 30, 2012 at 6:54 PM, Adrian Chadd wrote: >> .. not that I mind old things being retired, but we really should >> announce things like this. >> >> Also - you disconnected libftpio too; is that intentional? > I would assume so, given that this only removed the static library > name, which nothing else could be using still, seeing as how the > library was disconnected and removed in r225952. > >> Just because libdisk/libftpio isn't used by anything in the base -HEAD >> doesn't mean that: >> >> * it's not used by third party programs in ports; >> * it's not used by any external, non open source utilities that people >> have read. >> >> So I'd suggest creating a port for them both and begin the process of >> deprecating the kernel side interfaces that are unique to this API. > Pretty sure the addition of and widespread use of GEOM things > initiated the deprecation of the really lousy and properly-disliked > kernel interfaces involved. > On a similar note, I am extremely doubtful that any external code used libdisk. It was basically an internal detail of sysinstall with an interface that hadn't worked properly for a lot of applications in a very long time. The only evidence I can find that anyone used it for anything in the last decade is bug reports related to how it makes sysinstall crash in even slightly unusual circumstances. That said, I'm perfectly happy to add it back or make a port or something, but I'd prefer some evidence that it was ever used outside of sysinstall before doing that. I think some of the kernel interfaces (kern.geom.conftxt, for instance) have ended up being used in various shell scripts and so should probably stay. -Nathan -Nathan From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 21:00:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C5A0E8F; Mon, 31 Dec 2012 21:00:39 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F5A18FC0C; Mon, 31 Dec 2012 21:00:39 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVL0dPu006104; Mon, 31 Dec 2012 21:00:39 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVL0c8Q006103; Mon, 31 Dec 2012 21:00:38 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201212312100.qBVL0c8Q006103@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 31 Dec 2012 21:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244912 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 21:00:39 -0000 Author: gonzo Date: Mon Dec 31 21:00:38 2012 New Revision: 244912 URL: http://svnweb.freebsd.org/changeset/base/244912 Log: Merge r234561 from busdma_machdep.c to ARMv6 version of busdma: Interrupts must be disabled while handling a partial cache line flush, as otherwise the interrupt handling code may modify data in the non-DMA part of the cache line while we have it stashed away in the temporary stack buffer, then we end up restoring a stale value. PR: 160431 Submitted by: Ian Lepore Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Mon Dec 31 16:52:52 2012 (r244911) +++ head/sys/arm/arm/busdma_machdep-v6.c Mon Dec 31 21:00:38 2012 (r244912) @@ -1347,35 +1347,49 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus while (sl != NULL) { /* write back the unaligned portions */ vm_paddr_t physaddr; + register_t s = 0; + buf = sl->vaddr; len = sl->datacount; physaddr = sl->busaddr; bbuf = buf & ~arm_dcache_align_mask; ebuf = buf + len; physaddr = physaddr & ~arm_dcache_align_mask; - unalign = buf & arm_dcache_align_mask; - if (unalign) { - memcpy(_tmp_cl, (void *)bbuf, unalign); - len += unalign; /* inv entire cache line */ - } - unalign = ebuf & arm_dcache_align_mask; - if (unalign) { - unalign = arm_dcache_align - unalign; - memcpy(_tmp_clend, (void *)ebuf, unalign); - len += unalign; /* inv entire cache line */ + + + if ((buf & arm_dcache_align_mask) || + (ebuf & arm_dcache_align_mask)) { + s = intr_disable(); + unalign = buf & arm_dcache_align_mask; + if (unalign) { + memcpy(_tmp_cl, (void *)bbuf, unalign); + len += unalign; /* inv entire cache line */ + } + + unalign = ebuf & arm_dcache_align_mask; + if (unalign) { + unalign = arm_dcache_align - unalign; + memcpy(_tmp_clend, (void *)ebuf, unalign); + len += unalign; /* inv entire cache line */ + } } - /* inv are cache length aligned */ + + /* inv are cache length aligned */ cpu_dcache_inv_range(bbuf, len); l2cache_inv_range(bbuf, physaddr, len); - unalign = (vm_offset_t)buf & arm_dcache_align_mask; - if (unalign) { - memcpy((void *)bbuf, _tmp_cl, unalign); - } - unalign = ebuf & arm_dcache_align_mask; - if (unalign) { - unalign = arm_dcache_align - unalign; - memcpy((void *)ebuf, _tmp_clend, unalign); + if ((buf & arm_dcache_align_mask) || + (ebuf & arm_dcache_align_mask)) { + unalign = (vm_offset_t)buf & arm_dcache_align_mask; + if (unalign) + memcpy((void *)bbuf, _tmp_cl, unalign); + + unalign = ebuf & arm_dcache_align_mask; + if (unalign) + memcpy((void *)ebuf, _tmp_clend, + arm_dcache_align - unalign); + + intr_restore(s); } sl = STAILQ_NEXT(sl, slinks); } From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 21:19:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E8373A2; Mon, 31 Dec 2012 21:19:45 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 62AB98FC0C; Mon, 31 Dec 2012 21:19:45 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVLJjZT009562; Mon, 31 Dec 2012 21:19:45 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVLJi3V009555; Mon, 31 Dec 2012 21:19:44 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201212312119.qBVLJi3V009555@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 31 Dec 2012 21:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244914 - in head/sys/arm: arm include ti/omap4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 21:19:45 -0000 Author: gonzo Date: Mon Dec 31 21:19:44 2012 New Revision: 244914 URL: http://svnweb.freebsd.org/changeset/base/244914 Log: PL310 driver update: - Add pl310.disable tunable to disable L2 cache altogether. In order to make sure that it's 100% disabled we use cache event counters for cache line eviction and read allocate events and panic if any of these counters increased. This is purely for debugging purpose - Direct access DEBUG_CTRL and CTRL might be unavailable in unsecure mode, so use platform-specific functions for these registers - Replace #if 1 with proper erratum numbers - Add erratum 753970 workaround - Remove wait function for atomic operations - Protect cache operations with spin mutex in order to prevent race condition - Disable instruction cache prefetch and make sure data cache prefetch is enabled in OMAP4-specific intialization Modified: head/sys/arm/arm/pl310.c head/sys/arm/include/pl310.h head/sys/arm/ti/omap4/omap4_l2cache.c head/sys/arm/ti/omap4/omap4_smc.h Modified: head/sys/arm/arm/pl310.c ============================================================================== --- head/sys/arm/arm/pl310.c Mon Dec 31 21:09:39 2012 (r244913) +++ head/sys/arm/arm/pl310.c Mon Dec 31 21:19:44 2012 (r244914) @@ -39,62 +39,39 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include + #include +#include #include #include #include #include -/** - * PL310 - L2 Cache Controller register offsets. - * +/* + * Define this if you need to disable PL310 for debugging purpose + * Spec: + * http://infocenter.arm.com/help/topic/com.arm.doc.ddi0246e/DDI0246E_l2c310_r3p1_trm.pdf + */ + +/* + * Hardcode errata for now + * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0246b/pr01s02s02.html */ -#define PL310_CACHE_ID 0x000 -#define PL310_CACHE_TYPE 0x004 -#define PL310_CTRL 0x100 -#define PL310_AUX_CTRL 0x104 -#define PL310_EVENT_COUNTER_CTRL 0x200 -#define PL310_EVENT_COUNTER1_CONF 0x204 -#define PL310_EVENT_COUNTER0_CONF 0x208 -#define PL310_EVENT_COUNTER1_VAL 0x20C -#define PL310_EVENT_COUNTER0_VAL 0x210 -#define PL310_INTR_MASK 0x214 -#define PL310_MASKED_INTR_STAT 0x218 -#define PL310_RAW_INTR_STAT 0x21C -#define PL310_INTR_CLEAR 0x220 -#define PL310_CACHE_SYNC 0x730 -#define PL310_INV_LINE_PA 0x770 -#define PL310_INV_WAY 0x77C -#define PL310_CLEAN_LINE_PA 0x7B0 -#define PL310_CLEAN_LINE_IDX 0x7B8 -#define PL310_CLEAN_WAY 0x7BC -#define PL310_CLEAN_INV_LINE_PA 0x7F0 -#define PL310_CLEAN_INV_LINE_IDX 0x7F8 -#define PL310_CLEAN_INV_WAY 0x7FC -#define PL310_LOCKDOWN_D_WAY(x) (0x900 + ((x) * 8)) -#define PL310_LOCKDOWN_I_WAY(x) (0x904 + ((x) * 8)) -#define PL310_LOCKDOWN_LINE_ENABLE 0x950 -#define PL310_UNLOCK_ALL_LINES_WAY 0x954 -#define PL310_ADDR_FILTER_START 0xC00 -#define PL310_ADDR_FILTER_END 0xC04 -#define PL310_DEBUG_CTRL 0xF40 - - -#define PL310_AUX_CTRL_MASK 0xc0000fff -#define PL310_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 -#define PL310_AUX_CTRL_WAY_SIZE_SHIFT 17 -#define PL310_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) -#define PL310_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 -#define PL310_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 -#define PL310_AUX_CTRL_NS_INT_CTRL_SHIFT 27 -#define PL310_AUX_CTRL_DATA_PREFETCH_SHIFT 28 -#define PL310_AUX_CTRL_INSTR_PREFETCH_SHIFT 29 -#define PL310_AUX_CTRL_EARLY_BRESP_SHIFT 30 +#define PL310_ERRATA_588369 +#define PL310_ERRATA_753970 +#define PL310_ERRATA_727915 + +#define PL310_LOCK(sc) do { \ + mtx_lock_spin(&(sc)->sc_mtx); \ +} while(0); + +#define PL310_UNLOCK(sc) do { \ + mtx_unlock_spin(&(sc)->sc_mtx); \ +} while(0); +static int pl310_enabled = 1; +TUNABLE_INT("pl310.enabled", &pl310_enabled); void omap4_l2cache_wbinv_range(vm_paddr_t physaddr, vm_size_t size); void omap4_l2cache_inv_range(vm_paddr_t physaddr, vm_size_t size); @@ -112,34 +89,31 @@ static uint32_t g_l2cache_size; static struct pl310_softc *pl310_softc; -/** - * pl310_read4 - read a 32-bit value from the PL310 registers - * pl310_write4 - write a 32-bit value from the PL310 registers - * @off: byte offset within the register set to read from - * @val: the value to write into the register - * - * - * LOCKING: - * None - * - * RETURNS: - * nothing in case of write function, if read function returns the value read. - */ -static __inline uint32_t -pl310_read4(bus_size_t off) -{ - return bus_read_4(pl310_softc->sc_mem_res, off); -} -static __inline void -pl310_write4(bus_size_t off, uint32_t val) +static int +pl310_filter(void *arg) { - bus_write_4(pl310_softc->sc_mem_res, off, val); + struct pl310_softc *sc = arg; + uint32_t intr; + + intr = pl310_read4(sc, PL310_INTR_MASK); + + if (!sc->sc_enabled && (intr & INTR_MASK_ECNTR)) { + /* + * This is for debug purpose, so be blunt about it + * We disable PL310 only when something fishy is going + * on and we need to make sure L2 cache is 100% disabled + */ + panic("pl310: caches disabled but cache event detected\n"); + } + + return (FILTER_HANDLED); } static __inline void pl310_wait_background_op(uint32_t off, uint32_t mask) { - while (pl310_read4(off) & mask); + + while (pl310_read4(pl310_softc, off) & mask); } @@ -157,29 +131,46 @@ pl310_wait_background_op(uint32_t off, u static __inline void pl310_cache_sync(void) { - pl310_write4(PL310_CACHE_SYNC, 0); + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + +#ifdef PL310_ERRATA_753970 + /* Write uncached PL310 register */ + pl310_write4(pl310_softc, 0x740, 0xffffffff); +#else + pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); +#endif } static void pl310_wbinv_all(void) { -#if 1 - pl310_write4(PL310_DEBUG_CTRL, 3); + + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + + PL310_LOCK(pl310_softc); +#ifdef PL310_ERRATA_727915 + platform_pl310_write_debug(pl310_softc, 3); #endif - pl310_write4(PL310_CLEAN_INV_WAY, g_l2cache_way_mask); + pl310_write4(pl310_softc, PL310_CLEAN_INV_WAY, g_l2cache_way_mask); pl310_wait_background_op(PL310_CLEAN_INV_WAY, g_l2cache_way_mask); pl310_cache_sync(); -#if 1 - pl310_write4(PL310_DEBUG_CTRL, 0); +#ifdef PL310_ERRATA_727915 + platform_pl310_write_debug(pl310_softc, 0); #endif - + PL310_UNLOCK(pl310_softc); } static void pl310_wbinv_range(vm_paddr_t start, vm_size_t size) { - + + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + + PL310_LOCK(pl310_softc); if (start & g_l2cache_align_mask) { size += start & g_l2cache_align_mask; start &= ~g_l2cache_align_mask; @@ -188,12 +179,13 @@ pl310_wbinv_range(vm_paddr_t start, vm_s size &= ~g_l2cache_align_mask; size += g_l2cache_line_size; } -#if 1 - pl310_write4(PL310_DEBUG_CTRL, 3); + +#ifdef PL310_ERRATA_727915 + platform_pl310_write_debug(pl310_softc, 3); #endif while (size > 0) { -#if 1 +#ifdef PL310_ERRATA_588369 /* * Errata 588369 says that clean + inv may keep the * cache line if it was clean, the recommanded workaround @@ -201,48 +193,58 @@ pl310_wbinv_range(vm_paddr_t start, vm_s * write-back and cache linefill disabled */ - pl310_write4(PL310_CLEAN_LINE_PA, start); - pl310_write4(PL310_INV_LINE_PA, start); + pl310_write4(pl310_softc, PL310_CLEAN_LINE_PA, start); + pl310_write4(pl310_softc, PL310_INV_LINE_PA, start); #else - pl310_write4(PL310_CLEAN_INV_LINE_PA, start); + pl310_write4(pl310_softc, PL310_CLEAN_INV_LINE_PA, start); #endif start += g_l2cache_line_size; size -= g_l2cache_line_size; } -#if 1 - pl310_write4(PL310_DEBUG_CTRL, 0); +#ifdef PL310_ERRATA_727915 + platform_pl310_write_debug(pl310_softc, 0); #endif - pl310_wait_background_op(PL310_CLEAN_INV_LINE_PA, 1); + pl310_cache_sync(); - + PL310_UNLOCK(pl310_softc); } static void pl310_wb_range(vm_paddr_t start, vm_size_t size) { - + + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + + PL310_LOCK(pl310_softc); if (start & g_l2cache_align_mask) { size += start & g_l2cache_align_mask; start &= ~g_l2cache_align_mask; } + if (size & g_l2cache_align_mask) { size &= ~g_l2cache_align_mask; size += g_l2cache_line_size; } + while (size > 0) { - pl310_write4(PL310_CLEAN_LINE_PA, start); + pl310_write4(pl310_softc, PL310_CLEAN_LINE_PA, start); start += g_l2cache_line_size; size -= g_l2cache_line_size; } - pl310_cache_sync(); - pl310_wait_background_op(PL310_CLEAN_LINE_PA, 1); + pl310_cache_sync(); + PL310_UNLOCK(pl310_softc); } static void pl310_inv_range(vm_paddr_t start, vm_size_t size) { + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) + return; + + PL310_LOCK(pl310_softc); if (start & g_l2cache_align_mask) { size += start & g_l2cache_align_mask; start &= ~g_l2cache_align_mask; @@ -252,13 +254,13 @@ pl310_inv_range(vm_paddr_t start, vm_siz size += g_l2cache_line_size; } while (size > 0) { - pl310_write4(PL310_INV_LINE_PA, start); + pl310_write4(pl310_softc, PL310_INV_LINE_PA, start); start += g_l2cache_line_size; size -= g_l2cache_line_size; } - pl310_cache_sync(); - pl310_wait_background_op(PL310_INV_LINE_PA, 1); + pl310_cache_sync(); + PL310_UNLOCK(pl310_softc); } static int @@ -280,39 +282,98 @@ pl310_attach(device_t dev) uint32_t way_size; uint32_t ways_assoc; uint32_t ctrl_value; + uint32_t cache_id; + sc->sc_dev = dev; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) panic("%s: Cannot map registers", device_get_name(dev)); + + /* Allocate an IRQ resource */ + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | RF_SHAREABLE); + if (sc->sc_irq_res == NULL) { + panic("Cannot allocate IRQ\n"); + } + pl310_softc = sc; + mtx_init(&sc->sc_mtx, "pl310lock", NULL, MTX_SPIN); + sc->sc_enabled = pl310_enabled; - platform_init_pl310(sc); - aux_value = pl310_read4(PL310_AUX_CTRL); - way_size = (aux_value & PL310_AUX_CTRL_WAY_SIZE_MASK) >> - PL310_AUX_CTRL_WAY_SIZE_SHIFT; + /* activate the interrupt */ + bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + pl310_filter, NULL, sc, &sc->sc_irq_h); + + cache_id = pl310_read4(sc, PL310_CACHE_ID); + device_printf(dev, "Part number: 0x%x, release: 0x%x\n", + (cache_id >> CACHE_ID_PARTNUM_SHIFT) & CACHE_ID_PARTNUM_MASK, + (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK); + aux_value = pl310_read4(sc, PL310_AUX_CTRL); + way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >> + AUX_CTRL_WAY_SIZE_SHIFT; way_size = 1 << (way_size + 13); - if (aux_value & (1 << PL310_AUX_CTRL_ASSOCIATIVITY_SHIFT)) + if (aux_value & (1 << AUX_CTRL_ASSOCIATIVITY_SHIFT)) ways_assoc = 16; else ways_assoc = 8; g_l2cache_way_mask = (1 << ways_assoc) - 1; g_l2cache_size = way_size * ways_assoc; /* Print the information */ - printf(" L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024), + device_printf(dev, "L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024), g_l2cache_line_size, ways_assoc); - ctrl_value = pl310_read4(PL310_CTRL); - if (!(ctrl_value & 0x1)) { + + ctrl_value = pl310_read4(sc, PL310_CTRL); + + if (sc->sc_enabled && !(ctrl_value & CTRL_ENABLED)) { /* Enable the L2 cache if disabled */ - pl310_write4(PL310_CTRL, ctrl_value & 0x1); + platform_pl310_write_ctrl(sc, CTRL_ENABLED); + } + + if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) { + /* + * Set counters so when cache event happens + * we'll get interrupt and be warned that something + * is off + */ + + /* Cache Line Eviction for Counter 0 */ + pl310_write4(sc, PL310_EVENT_COUNTER0_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_CO); + /* Data Read Request for Counter 1 */ + pl310_write4(sc, PL310_EVENT_COUNTER1_CONF, + EVENT_COUNTER_CONF_INCR | EVENT_COUNTER_CONF_DRREQ); + + /* Temporary switch on for final flush*/ + sc->sc_enabled = 1; + pl310_wbinv_all(); + sc->sc_enabled = 0; + platform_pl310_write_ctrl(sc, CTRL_DISABLED); + + /* Enable and clear pending interrupts */ + pl310_write4(sc, PL310_INTR_CLEAR, INTR_MASK_ECNTR); + pl310_write4(sc, PL310_INTR_MASK, INTR_MASK_ALL); + + /* Enable counters and reset C0 and C1 */ + pl310_write4(sc, PL310_EVENT_COUNTER_CTRL, + EVENT_COUNTER_CTRL_ENABLED | + EVENT_COUNTER_CTRL_C0_RESET | + EVENT_COUNTER_CTRL_C1_RESET); + } + + if (sc->sc_enabled) + platform_pl310_init(sc); + pl310_wbinv_all(); - + /* Set the l2 functions in the set of cpufuncs */ cpufuncs.cf_l2cache_wbinv_all = pl310_wbinv_all; cpufuncs.cf_l2cache_wbinv_range = pl310_wbinv_range; cpufuncs.cf_l2cache_inv_range = pl310_inv_range; cpufuncs.cf_l2cache_wb_range = pl310_wb_range; + return (0); } @@ -330,4 +391,3 @@ static driver_t pl310_driver = { static devclass_t pl310_devclass; DRIVER_MODULE(pl310, simplebus, pl310_driver, pl310_devclass, 0, 0); - Modified: head/sys/arm/include/pl310.h ============================================================================== --- head/sys/arm/include/pl310.h Mon Dec 31 21:09:39 2012 (r244913) +++ head/sys/arm/include/pl310.h Mon Dec 31 21:19:44 2012 (r244914) @@ -29,10 +29,131 @@ #ifndef PL310_H_ #define PL310_H_ + +/** + * PL310 - L2 Cache Controller register offsets. + * + */ +#define PL310_CACHE_ID 0x000 +#define CACHE_ID_RELEASE_SHIFT 0 +#define CACHE_ID_RELEASE_MASK 0x3f +#define CACHE_ID_PARTNUM_SHIFT 6 +#define CACHE_ID_PARTNUM_MASK 0xf +#define PL310_CACHE_TYPE 0x004 +#define PL310_CTRL 0x100 +#define CTRL_ENABLED 0x01 +#define CTRL_DISABLED 0x00 +#define PL310_AUX_CTRL 0x104 +#define AUX_CTRL_MASK 0xc0000fff +#define AUX_CTRL_ASSOCIATIVITY_SHIFT 16 +#define AUX_CTRL_WAY_SIZE_SHIFT 17 +#define AUX_CTRL_WAY_SIZE_MASK (0x7 << 17) +#define AUX_CTRL_SHARE_OVERRIDE (1 << 22) +#define AUX_CTRL_NS_LOCKDOWN (1 << 26) +#define AUX_CTRL_NS_INT_CTRL (1 << 27) +#define AUX_CTRL_DATA_PREFETCH (1 << 28) +#define AUX_CTRL_INSTR_PREFETCH (1 << 29) +#define AUX_CTRL_EARLY_BRESP (1 << 30) +#define PL310_EVENT_COUNTER_CTRL 0x200 +#define EVENT_COUNTER_CTRL_ENABLED (1 << 0) +#define EVENT_COUNTER_CTRL_C0_RESET (1 << 1) +#define EVENT_COUNTER_CTRL_C1_RESET (1 << 2) +#define PL310_EVENT_COUNTER1_CONF 0x204 +#define PL310_EVENT_COUNTER0_CONF 0x208 +#define EVENT_COUNTER_CONF_NOINTR 0 +#define EVENT_COUNTER_CONF_INCR 1 +#define EVENT_COUNTER_CONF_OVFW 2 +#define EVENT_COUNTER_CONF_NOEV (0 << 2) +#define EVENT_COUNTER_CONF_CO (1 << 2) +#define EVENT_COUNTER_CONF_DRHIT (2 << 2) +#define EVENT_COUNTER_CONF_DRREQ (3 << 2) +#define EVENT_COUNTER_CONF_DWHIT (4 << 2) +#define EVENT_COUNTER_CONF_DWREQ (5 << 2) +#define EVENT_COUNTER_CONF_DWTREQ (6 << 2) +#define EVENT_COUNTER_CONF_DIRHIT (7 << 2) +#define EVENT_COUNTER_CONF_DIRREQ (8 << 2) +#define EVENT_COUNTER_CONF_WA (9 << 2) +#define PL310_EVENT_COUNTER1_VAL 0x20C +#define PL310_EVENT_COUNTER0_VAL 0x210 +#define PL310_INTR_MASK 0x214 +#define PL310_MASKED_INTR_STAT 0x218 +#define PL310_RAW_INTR_STAT 0x21C +#define PL310_INTR_CLEAR 0x220 +#define INTR_MASK_ALL ((1 << 9) - 1) +#define INTR_MASK_ECNTR (1 << 0) +#define INTR_MASK_PARRT (1 << 1) +#define INTR_MASK_PARRD (1 << 2) +#define INTR_MASK_ERRWT (1 << 3) +#define INTR_MASK_ERRWD (1 << 4) +#define INTR_MASK_ERRRT (1 << 5) +#define INTR_MASK_ERRRD (1 << 6) +#define INTR_MASK_SLVERR (1 << 7) +#define INTR_MASK_DECERR (1 << 8) +#define PL310_CACHE_SYNC 0x730 +#define PL310_INV_LINE_PA 0x770 +#define PL310_INV_WAY 0x77C +#define PL310_CLEAN_LINE_PA 0x7B0 +#define PL310_CLEAN_LINE_IDX 0x7B8 +#define PL310_CLEAN_WAY 0x7BC +#define PL310_CLEAN_INV_LINE_PA 0x7F0 +#define PL310_CLEAN_INV_LINE_IDX 0x7F8 +#define PL310_CLEAN_INV_WAY 0x7FC +#define PL310_LOCKDOWN_D_WAY(x) (0x900 + ((x) * 8)) +#define PL310_LOCKDOWN_I_WAY(x) (0x904 + ((x) * 8)) +#define PL310_LOCKDOWN_LINE_ENABLE 0x950 +#define PL310_UNLOCK_ALL_LINES_WAY 0x954 +#define PL310_ADDR_FILTER_STAR 0xC00 +#define PL310_ADDR_FILTER_END 0xC04 +#define PL310_DEBUG_CTRL 0xF40 +#define PL310_PREFETCH_CTRL 0xF60 +#define PREFETCH_CTRL_OFFSET_MASK (0x1f) +#define PREFETCH_CTRL_NOTSAMEID (1 << 21) +#define PREFETCH_CTRL_INCR_DL (1 << 23) +#define PREFETCH_CTRL_PREFETCH_DROP (1 << 24) +#define PREFETCH_CTRL_DL_ON_WRAP (1 << 27) +#define PREFETCH_CTRL_DATA_PREFETCH (1 << 28) +#define PREFETCH_CTRL_INSTR_PREFETCH (1 << 29) +#define PREFETCH_CTRL_DL (1 << 30) +#define PL310_POWER_CTRL 0xF60 + struct pl310_softc { + device_t sc_dev; struct resource *sc_mem_res; + struct resource *sc_irq_res; + void* sc_irq_h; + int sc_enabled; + struct mtx sc_mtx; }; -void platform_init_pl310(struct pl310_softc *sc); +/** + * pl310_read4 - read a 32-bit value from the PL310 registers + * pl310_write4 - write a 32-bit value from the PL310 registers + * @off: byte offset within the register set to read from + * @val: the value to write into the register + * + * + * LOCKING: + * None + * + * RETURNS: + * nothing in case of write function, if read function returns the value read. + */ +static __inline uint32_t +pl310_read4(struct pl310_softc *sc, bus_size_t off) +{ + + return bus_read_4(sc->sc_mem_res, off); +} + +static __inline void +pl310_write4(struct pl310_softc *sc, bus_size_t off, uint32_t val) +{ + + bus_write_4(sc->sc_mem_res, off, val); +} + +void platform_pl310_init(struct pl310_softc *); +void platform_pl310_write_ctrl(struct pl310_softc *, uint32_t); +void platform_pl310_write_debug(struct pl310_softc *, uint32_t); #endif /* PL310_H_ */ Modified: head/sys/arm/ti/omap4/omap4_l2cache.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_l2cache.c Mon Dec 31 21:09:39 2012 (r244913) +++ head/sys/arm/ti/omap4/omap4_l2cache.c Mon Dec 31 21:19:44 2012 (r244914) @@ -27,13 +27,88 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include +#include + #include #include +#include #include void -platform_init_pl310(struct pl310_softc *softc) +platform_pl310_init(struct pl310_softc *sc) +{ + uint32_t aux, prefetch; + + aux = pl310_read4(sc, PL310_AUX_CTRL); + prefetch = pl310_read4(sc, PL310_PREFETCH_CTRL); + + if (bootverbose) { + device_printf(sc->sc_dev, "Early BRESP response: %s\n", + (aux & AUX_CTRL_EARLY_BRESP) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (aux & AUX_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (aux & AUX_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Non-secure interrupt control: %s\n", + (aux & AUX_CTRL_NS_INT_CTRL) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Non-secure lockdown: %s\n", + (aux & AUX_CTRL_NS_LOCKDOWN) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Share override: %s\n", + (aux & AUX_CTRL_SHARE_OVERRIDE) ? "enabled" : "disabled"); + + device_printf(sc->sc_dev, "Double linefil: %s\n", + (prefetch & PREFETCH_CTRL_DL) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Instruction prefetch: %s\n", + (prefetch & PREFETCH_CTRL_INSTR_PREFETCH) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Data prefetch: %s\n", + (prefetch & PREFETCH_CTRL_DATA_PREFETCH) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Double linefill on WRAP request: %s\n", + (prefetch & PREFETCH_CTRL_DL_ON_WRAP) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Prefetch drop: %s\n", + (prefetch & PREFETCH_CTRL_PREFETCH_DROP) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Incr double Linefill: %s\n", + (prefetch & PREFETCH_CTRL_INCR_DL) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Not same ID on exclusive sequence: %s\n", + (prefetch & PREFETCH_CTRL_NOTSAMEID) ? "enabled" : "disabled"); + device_printf(sc->sc_dev, "Prefetch offset: %d\n", + (prefetch & PREFETCH_CTRL_OFFSET_MASK)); + } + + /* + * Disable instruction prefetch + */ + prefetch &= ~PREFETCH_CTRL_INSTR_PREFETCH; + aux &= ~AUX_CTRL_INSTR_PREFETCH; + + // prefetch &= ~PREFETCH_CTRL_DATA_PREFETCH; + // aux &= ~AUX_CTRL_DATA_PREFETCH; + + /* + * Make sure data prefetch is on + */ + prefetch |= PREFETCH_CTRL_DATA_PREFETCH; + aux |= AUX_CTRL_DATA_PREFETCH; + + /* + * TODO: add tunable for prefetch offset + * and experiment with performance + */ + + ti_smc0(aux, 0, WRITE_AUXCTRL_REG); + ti_smc0(prefetch, 0, WRITE_PREFETCH_CTRL_REG); +} + +void +platform_pl310_write_ctrl(struct pl310_softc *sc, uint32_t val) { - ti_smc0(1, 0, L2CACHE_ENABLE_L2); + ti_smc0(val, 0, L2CACHE_WRITE_CTRL_REG); } +void +platform_pl310_write_debug(struct pl310_softc *sc, uint32_t val) +{ + ti_smc0(val, 0, L2CACHE_WRITE_DEBUG_REG); +} Modified: head/sys/arm/ti/omap4/omap4_smc.h ============================================================================== --- head/sys/arm/ti/omap4/omap4_smc.h Mon Dec 31 21:09:39 2012 (r244913) +++ head/sys/arm/ti/omap4/omap4_smc.h Mon Dec 31 21:19:44 2012 (r244914) @@ -31,7 +31,7 @@ /* Define the various function IDs used by the OMAP4 */ #define L2CACHE_WRITE_DEBUG_REG 0x100 #define L2CACHE_CLEAN_INV_RANG 0x101 -#define L2CACHE_ENABLE_L2 0x102 +#define L2CACHE_WRITE_CTRL_REG 0x102 #define READ_AUX_CORE_REGS 0x103 #define MODIFY_AUX_CORE_0 0x104 #define WRITE_AUX_CORE_1 0x105 From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 21:54:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9691F851; Mon, 31 Dec 2012 21:54:13 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp-out3.electric.net (smtp-out3.electric.net [72.35.12.188]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5478FC0A; Mon, 31 Dec 2012 21:54:12 +0000 (UTC) Received: from [204.11.168.155] (helo=securemail.onebox.com) by yugo.electric.net with esmtp (Exim 4.77) (envelope-from ) id 1TpnJ8-00067o-Ti; Mon, 31 Dec 2012 13:54:06 -0800 Received: from localhost (unverified [49.226.8.148]) by securemail.onebox.com (Rockliffe SMTPRA 9.3.1) with ESMTP id ; Mon, 31 Dec 2012 16:54:06 -0500 Date: Tue, 1 Jan 2013 10:53:53 +1300 From: Andrew Turner To: Oleksandr Tymoshenko Subject: Re: svn commit: r244914 - in head/sys/arm: arm include ti/omap4 Message-ID: <20130101105353.14492943@fubar.geek.nz> In-Reply-To: <201212312119.qBVLJi3V009555@svn.freebsd.org> References: <201212312119.qBVLJi3V009555@svn.freebsd.org> Organization: SMTP: smtp.paradise.net.nz X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 21:54:13 -0000 On Mon, 31 Dec 2012 21:19:44 +0000 (UTC) Oleksandr Tymoshenko wrote: > Modified: head/sys/arm/arm/pl310.c > ============================================================================== > --- head/sys/arm/arm/pl310.c Mon Dec 31 21:09:39 2012 > (r244913) +++ head/sys/arm/arm/pl310.c Mon Dec 31 21:19:44 ... > @@ -157,29 +131,46 @@ pl310_wait_background_op(uint32_t off, u > static __inline void > pl310_cache_sync(void) > { > - pl310_write4(PL310_CACHE_SYNC, 0); > + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) > + return; > + > +#ifdef PL310_ERRATA_753970 > + /* Write uncached PL310 register */ > + pl310_write4(pl310_softc, 0x740, 0xffffffff); > +#else > + pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); > +#endif > } How hard would it be to detect if we need this errata at boot? From the errata document it appears to only be present in the r3p0 revision of the controller. We can then do something like: #ifdef PL310_ERRATA_753970 if (errata_753970) pl310_write4(pl310_softc, 0x740, 0xffffffff); else #endif pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); Andrew From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 21:54:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AB9D9BA; Mon, 31 Dec 2012 21:54:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34A1D8FC12; Mon, 31 Dec 2012 21:54:44 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVLsi8G014796; Mon, 31 Dec 2012 21:54:44 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVLsh4v014794; Mon, 31 Dec 2012 21:54:43 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201212312154.qBVLsh4v014794@svn.freebsd.org> From: Mark Johnston Date: Mon, 31 Dec 2012 21:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244915 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 21:54:44 -0000 Author: markj Date: Mon Dec 31 21:54:43 2012 New Revision: 244915 URL: http://svnweb.freebsd.org/changeset/base/244915 Log: Explicitly specify that the beforelinking target depends on the generated object files, ensuring that the beforelinking recipe won't be executed until compilation has finished. Also define SHLIB_NAME_FULL to denote ${SHLIB_NAME}.debug if DEBUG_FILES is set and ${SHLIB_NAME} otherwise, which helps avoid obfuscating the compilation and linking rules. Reviewed by: emaste Approved by: emaste (co-mentor) Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Mon Dec 31 21:19:44 2012 (r244914) +++ head/share/mk/bsd.lib.mk Mon Dec 31 21:54:43 2012 (r244915) @@ -165,19 +165,22 @@ SOBJS+= ${OBJS:.o=.So} .if defined(SHLIB_NAME) _LIBS+= ${SHLIB_NAME} +.if defined(DEBUG_FLAGS) +SHLIB_NAME_FULL=${SHLIB_NAME}.debug +.else +SHLIB_NAME_FULL=${SHLIB_NAME} +.endif + SOLINKOPTS= -shared -Wl,-x .if !defined(ALLOW_SHARED_TEXTREL) SOLINKOPTS+= -Wl,--fatal-warnings -Wl,--warn-shared-textrel .endif .if target(beforelinking) -${SHLIB_NAME}: beforelinking -.endif -.if defined(DEBUG_FLAGS) -${SHLIB_NAME}.debug: ${SOBJS} -.else -${SHLIB_NAME}: ${SOBJS} +beforelinking: ${SOBJS} +${SHLIB_NAME_FULL}: beforelinking .endif +${SHLIB_NAME_FULL}: ${SOBJS} @${ECHO} building shared library ${SHLIB_NAME} @rm -f ${SHLIB_NAME} ${SHLIB_LINK} .if defined(SHLIB_LINK) @@ -197,12 +200,12 @@ ${SHLIB_NAME}: ${SOBJS} .endif .if defined(DEBUG_FLAGS) -${SHLIB_NAME}: ${SHLIB_NAME}.debug ${SHLIB_NAME}.symbols +${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.symbols ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.symbols \ - ${SHLIB_NAME}.debug ${.TARGET} + ${SHLIB_NAME_FULL} ${.TARGET} -${SHLIB_NAME}.symbols: ${SHLIB_NAME}.debug - ${OBJCOPY} --only-keep-debug ${SHLIB_NAME}.debug ${.TARGET} +${SHLIB_NAME}.symbols: ${SHLIB_NAME_FULL} + ${OBJCOPY} --only-keep-debug ${SHLIB_NAME_FULL} ${.TARGET} .endif .endif Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Mon Dec 31 21:19:44 2012 (r244914) +++ head/share/mk/bsd.prog.mk Mon Dec 31 21:54:43 2012 (r244915) @@ -46,6 +46,7 @@ PROG= ${PROG_CXX} OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if target(beforelinking) +beforelinking: ${OBJS} ${PROG}: beforelinking .endif ${PROG}: ${OBJS} @@ -75,6 +76,7 @@ SRCS= ${PROG}.c OBJS= ${PROG}.o .if target(beforelinking) +beforelinking: ${OBJS} ${PROG}: beforelinking .endif ${PROG}: ${OBJS} From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 22:18:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68ECDCE8; Mon, 31 Dec 2012 22:18:26 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id F0F9C8FC08; Mon, 31 Dec 2012 22:18:25 +0000 (UTC) Received: from [88.198.91.248] (helo=[IPv6:::1]) by id.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Tpngc-000Icr-Rv; Mon, 31 Dec 2012 14:18:24 -0800 Message-ID: <50E20F2B.7080704@freebsd.org> Date: Mon, 31 Dec 2012 14:18:19 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andrew Turner Subject: Re: svn commit: r244914 - in head/sys/arm: arm include ti/omap4 References: <201212312119.qBVLJi3V009555@svn.freebsd.org> <20130101105353.14492943@fubar.geek.nz> In-Reply-To: <20130101105353.14492943@fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 12/31/2012 1:53 PM, Andrew Turner wrote: > On Mon, 31 Dec 2012 21:19:44 +0000 (UTC) > Oleksandr Tymoshenko wrote: >> Modified: head/sys/arm/arm/pl310.c >> ============================================================================== >> --- head/sys/arm/arm/pl310.c Mon Dec 31 21:09:39 2012 >> (r244913) +++ head/sys/arm/arm/pl310.c Mon Dec 31 21:19:44 > ... >> @@ -157,29 +131,46 @@ pl310_wait_background_op(uint32_t off, u >> static __inline void >> pl310_cache_sync(void) >> { >> - pl310_write4(PL310_CACHE_SYNC, 0); >> + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) >> + return; >> + >> +#ifdef PL310_ERRATA_753970 >> + /* Write uncached PL310 register */ >> + pl310_write4(pl310_softc, 0x740, 0xffffffff); >> +#else >> + pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); >> +#endif >> } > How hard would it be to detect if we need this errata at boot? From the > errata document it appears to only be present in the r3p0 revision of > the controller. We can then do something like: > > #ifdef PL310_ERRATA_753970 > if (errata_753970) > pl310_write4(pl310_softc, 0x740, 0xffffffff); > else > #endif > pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); > > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 22:18:26 -0000 On 12/31/2012 1:53 PM, Andrew Turner wrote: > On Mon, 31 Dec 2012 21:19:44 +0000 (UTC) > Oleksandr Tymoshenko wrote: >> Modified: head/sys/arm/arm/pl310.c >> ============================================================================== >> --- head/sys/arm/arm/pl310.c Mon Dec 31 21:09:39 2012 >> (r244913) +++ head/sys/arm/arm/pl310.c Mon Dec 31 21:19:44 > ... >> @@ -157,29 +131,46 @@ pl310_wait_background_op(uint32_t off, u >> static __inline void >> pl310_cache_sync(void) >> { >> - pl310_write4(PL310_CACHE_SYNC, 0); >> + if ((pl310_softc == NULL) || !pl310_softc->sc_enabled) >> + return; >> + >> +#ifdef PL310_ERRATA_753970 >> + /* Write uncached PL310 register */ >> + pl310_write4(pl310_softc, 0x740, 0xffffffff); >> +#else >> + pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); >> +#endif >> } > How hard would it be to detect if we need this errata at boot? From the > errata document it appears to only be present in the r3p0 revision of > the controller. We can then do something like: > > #ifdef PL310_ERRATA_753970 > if (errata_753970) > pl310_write4(pl310_softc, 0x740, 0xffffffff); > else > #endif > pl310_write4(pl310_softc, PL310_CACHE_SYNC, 0xffffffff); > > I think we can use RTL release field of Cache ID register to determine actual hardware release and act accordingly. From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 22:48:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8395272; Mon, 31 Dec 2012 22:48:54 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCD958FC08; Mon, 31 Dec 2012 22:48:54 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVMmscG023402; Mon, 31 Dec 2012 22:48:54 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVMmslr023401; Mon, 31 Dec 2012 22:48:54 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201212312248.qBVMmslr023401@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Mon, 31 Dec 2012 22:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244916 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 22:48:55 -0000 Author: gonzo Date: Mon Dec 31 22:48:54 2012 New Revision: 244916 URL: http://svnweb.freebsd.org/changeset/base/244916 Log: Add interrupt for PL310 controller Modified: head/sys/boot/fdt/dts/pandaboard.dts Modified: head/sys/boot/fdt/dts/pandaboard.dts ============================================================================== --- head/sys/boot/fdt/dts/pandaboard.dts Mon Dec 31 21:54:43 2012 (r244915) +++ head/sys/boot/fdt/dts/pandaboard.dts Mon Dec 31 22:48:54 2012 (r244916) @@ -67,6 +67,8 @@ pl310@48242000 { compatible = "arm,pl310"; reg = < 0x48242000 0x1000 >; + interrupts = < 32 >; + interrupt-parent = < &GIC >; }; mp_tmr@48240200 { compatible = "arm,mpcore-timers";