From owner-cvs-all@FreeBSD.ORG Wed Mar 14 20:52:26 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF4C116A403; Wed, 14 Mar 2007 20:52:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 50FFB13C469; Wed, 14 Mar 2007 20:52:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l2EKqKkY083383; Wed, 14 Mar 2007 15:52:21 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Nick Hibma Date: Wed, 14 Mar 2007 15:52:40 -0400 User-Agent: KMail/1.9.1 References: <200702202256.l1KMuTPN046797@repoman.freebsd.org> In-Reply-To: <200702202256.l1KMuTPN046797@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703141552.40936.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 14 Mar 2007 15:52:21 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2839/Wed Mar 14 04:24:32 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/share/man/man4 Makefile watchdog.4 src/share/man/man9 watchdog.9 src/sys/arm/xscale/i80321 i80321_wdog.c src/sys/dev/ichwd ichwd.c src/sys/dev/ipmi ipmi.c src/sys/dev/mk48txx mk48txx.c src/sys/dev/watchdog watchdog.c ... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 20:52:26 -0000 On Tuesday 20 February 2007 17:56, Nick Hibma wrote: > n_hibma 2007-02-20 22:56:29 UTC > > FreeBSD src repository > > Modified files: (Branch: RELENG_6) > share/man/man4 Makefile watchdog.4 > share/man/man9 watchdog.9 > sys/arm/xscale/i80321 i80321_wdog.c > sys/dev/ichwd ichwd.c > sys/dev/ipmi ipmi.c > sys/dev/mk48txx mk48txx.c > sys/dev/watchdog watchdog.c > sys/i386/i386 elan-mmcr.c > sys/kern kern_clock.c > sys/sys watchdog.h > usr.sbin/watchdogd watchdog.8 watchdogd.c > Log: > MFC the following commits: > > Align the interfaces for the various watchdogs and make the interface > behave as expected. > > Also: > - Return an error if WD_PASSIVE is passed in to the ioctl as only > WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an > explanation of the difference between WD_ACTIVE and WD_PASSIVE. > - Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've > lost your sense of humor, than don't add a define. > > Specific changes: > > i80321_wdog.c > Don't roll your own passive watchdog tickle as this would defeat the > purpose of an active (userland) watchdog tickle. > > ichwd.c / ipmi.c: > WD_ACTIVE means active patting of the watchdog by a userland process, > not whether the watchdog is active. See sys/watchdog.h. > > kern_clock.c: > (software watchdog) Remove a check for WD_ACTIVE as this does not make > sense here. This reverts r1.181. > > Revision Changes Path > 1.371 +1 -0 src/share/man/man4/Makefile > 1.8 +69 -25 src/share/man/man4/watchdog.4 > 1.4 +7 -1 src/share/man/man9/watchdog.9 > 1.3 +15 -11 src/sys/arm/xscale/i80321/i80321_wdog.c > 1.7 +12 -30 src/sys/dev/ichwd/ichwd.c > 1.8 +8 -17 src/sys/dev/ipmi/ipmi.c > 1.8 +3 -1 src/sys/dev/mk48txx/mk48txx.c > 1.4 +4 -1 src/sys/dev/watchdog/watchdog.c > 1.33 +9 -9 src/sys/i386/i386/elan-mmcr.c > 1.193 +3 -3 src/sys/kern/kern_clock.c > 1.4 +0 -4 src/sys/sys/watchdog.h > > and > > Don't exit from watchdogd on receiving a signal if we cannot stop the watchdog. > That'll require -KILL. This avoids resetting your system on one of the > watchdogs that you cannot disable. > > Revision Changes Path > 1.15 +18 -11 src/usr.sbin/watchdogd/watchdogd.c > > Reviewed by: phk > > Revision Changes Path > 1.320.2.25 +1 -0 src/share/man/man4/Makefile > 1.6.8.2 +69 -25 src/share/man/man4/watchdog.4 > 1.3.8.1 +7 -1 src/share/man/man9/watchdog.9 > 1.2.2.1 +15 -11 src/sys/arm/xscale/i80321/i80321_wdog.c > 1.5.2.2 +12 -30 src/sys/dev/ichwd/ichwd.c > 1.3.2.5 +6 -17 src/sys/dev/ipmi/ipmi.c > 1.6.2.2 +3 -1 src/sys/dev/mk48txx/mk48txx.c > 1.2.8.1 +9 -2 src/sys/dev/watchdog/watchdog.c > 1.31.2.2 +9 -9 src/sys/i386/i386/elan-mmcr.c > 1.178.2.4 +3 -3 src/sys/kern/kern_clock.c > 1.3.8.1 +0 -4 src/sys/sys/watchdog.h > 1.6.2.1 +5 -4 src/usr.sbin/watchdogd/watchdog.8 > 1.10.2.2 +19 -13 src/usr.sbin/watchdogd/watchdogd.c Why is the ipmi watchdog function different in current and 6.x after this change? HEAD: static void ipmi_wd_event(void *arg, unsigned int cmd, int *error) { struct ipmi_softc *sc = arg; unsigned int timeout; cmd &= WD_INTERVAL; if (cmd > 0 && cmd <= 63) { timeout = ((uint64_t)1 << cmd) / 1800000000; ipmi_set_watchdog(sc, timeout); *error = 0; } else { ipmi_set_watchdog(sc, 0); if (cmd > 0) *error = 0; } } RELENG_6: static void ipmi_wd_event(void *arg, unsigned int cmd, int *error) { struct ipmi_softc *sc = arg; unsigned int timeout; cmd &= WD_INTERVAL; if (cmd > 0 && cmd <= 63) { timeout = ((uint64_t)1 << cmd) / 1800000000; ipmi_set_watchdog(sc, timeout); *error = 0; } else { ipmi_set_watchdog(sc, 0); } } Also, the watchdog(9) manpage still says: If the watchdog cannot be configured to the proposed timeout, it must be disabled and the error argument set to EINVAL. If the watchdog cannot be disabled, the error argument must be set to EOPNOTSUPP. Which would lead me to believe that the HEAD version should be setting *error to EINVAL in that last case? -- John Baldwin