From owner-svn-src-head@freebsd.org Wed Oct 25 15:43:51 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A69D5E4DEF1 for ; Wed, 25 Oct 2017 15:43:51 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3597173123 for ; Wed, 25 Oct 2017 15:43:51 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by mail-wm0-x234.google.com with SMTP id r196so2741751wmf.2 for ; Wed, 25 Oct 2017 08:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=PmxEjRLoZ05f2wstVKRo6H2oasGaWegleF84kH+Hgho=; b=V9ySLkzdUrVnxwbONFEjtlSUVIJN+diEJ3XyUtExJ/lUC/D9fTbqKcHKWqH9JjXI7o H5ftIpkM8EzlH4jlNP5w7e1zapoLbMqQ1VFAHzqhJaQiTrdQ9sVSclAL0dukZKEV3xfR 2nVNrQAVeDn4U1u+RIP4OumOY5Sxst3+QEywTn48cBJ5GEomdtHqPgNBbvosrWohoogC 9hZDE3lPYfbXzorIlt0BswCTr4K/rsgG2SibEiYbhmFyRPf7j9v+cnYDJDL3GrF2ELm+ J3lnHqROyWNinqcP6Ic1+pc0Xg+T1I51hWBFFqwAGCPqHFeEgP1+EGWRtELyYXpfgfIV LRCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=PmxEjRLoZ05f2wstVKRo6H2oasGaWegleF84kH+Hgho=; b=ZgSGwFqVa3Pt4Nae61zlJAe1e/zgx7G+LBAst4TUn8saiGyPfaPAXt/ISp6tbXsJM5 H1cFE0xkYOTczXwa1HIndPC2nLS5FvIhBWQVMmdwT51Id9pCxhZotg2r8EcDPwHwaQ25 RgEaVjBFP7/0MYO517vnxE4b68qEbQ1yzyZl6Dkc2R/MElcPBVkS6+DAPipLdSA6444i L0ZbR0EHizSxUSQJ6PXGRCmZTIiJ/Ew0EgSblab1FQ7X5K7t7ifVcFJIsE/EXLbDgVWv xSMXBByw0mB9gn/BUXLbN1L05hKcOu68WV8HZj+Na5BCn3SNNFVLqNQgQdOISKIFvgCd wSgg== X-Gm-Message-State: AMCzsaUMmvA0kU8ot74dNCpeBjTVO62P+oRRabTV07/qsrQ/vKBJSKps hKNKieQp9AJtB/DULnJ3csC+mcPsp4M= X-Google-Smtp-Source: ABhQp+RtiPawBw9/TRQbLVHd/lUNFVr0EcAMjbWLE5Ys0viNq4EyldidP8GqlXSxv7qiIDaELKDQhQ== X-Received: by 10.28.153.85 with SMTP id b82mr2044219wme.121.1508946228921; Wed, 25 Oct 2017 08:43:48 -0700 (PDT) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id j5sm3095249wmg.8.2017.10.25.08.43.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 08:43:47 -0700 (PDT) Subject: Re: svn commit: r324983 - in head: lib/libc/sys sys/sys To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201710251530.v9PFUKoA018217@repo.freebsd.org> From: Steven Hartland Message-ID: Date: Wed, 25 Oct 2017 16:43:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201710251530.v9PFUKoA018217@repo.freebsd.org> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Wed, 25 Oct 2017 15:43:51 -0000 Personally I would expect the fallback to be reboot as without the ability to power back on remotely e.g. IPMI this could render the machine inaccessible, which is not ideal, thoughts? On 25/10/2017 16:30, Warner Losh wrote: > Author: imp > Date: Wed Oct 25 15:30:20 2017 > New Revision: 324983 > URL: https://svnweb.freebsd.org/changeset/base/324983 > > Log: > Define RB_POWERCYCLE > > RB_POWERCYCLE instructs the platform to power off and then power back > on a short time later, if that's possible. Otherwise, degrade to the > RB_POWEROFF behavior. > > Sponsored by: Netflix > > Modified: > head/lib/libc/sys/reboot.2 > head/sys/sys/reboot.h > > Modified: head/lib/libc/sys/reboot.2 > ============================================================================== > --- head/lib/libc/sys/reboot.2 Wed Oct 25 15:28:05 2017 (r324982) > +++ head/lib/libc/sys/reboot.2 Wed Oct 25 15:30:20 2017 (r324983) > @@ -28,7 +28,7 @@ > .\" @(#)reboot.2 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd September 18, 2015 > +.Dd October 24, 2017 > .Dt REBOOT 2 > .Os > .Sh NAME > @@ -84,6 +84,14 @@ for more information. > .It Dv RB_HALT > The processor is simply halted; no reboot takes place. > This option should be used with caution. > +.It Dv RB_POWERCYCLE > +After halting, the shutdown code will do what it can to turn > +off the power and then turn the power back on. > +This requires hardware support, usually an auxiliary microprocessor > +that can sequence the power supply. > +At present only the > +.Xr ipmi 4 > +driver implements this feature. > .It Dv RB_POWEROFF > After halting, the shutdown code will do what it can to turn > off the power. > > Modified: head/sys/sys/reboot.h > ============================================================================== > --- head/sys/sys/reboot.h Wed Oct 25 15:28:05 2017 (r324982) > +++ head/sys/sys/reboot.h Wed Oct 25 15:30:20 2017 (r324983) > @@ -60,6 +60,7 @@ > #define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ > #define RB_PAUSE 0x100000 /* pause after each output line during probe */ > #define RB_REROOT 0x200000 /* unmount the rootfs and mount it again */ > +#define RB_POWERCYCLE 0x400000 /* Power cycle if possible */ > #define RB_MULTIPLE 0x20000000 /* use multiple consoles */ > > #define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ >