From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH RFC 4/9] x86/misc: Early cleanup Date: Thu, 15 May 2014 11:38:12 +0100 Message-ID: <53749914.4090708@citrix.com> References: <1400147299-31772-1-git-send-email-andrew.cooper3@citrix.com> <1400147299-31772-5-git-send-email-andrew.cooper3@citrix.com> <5374B3C702000078000128C7@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5374B3C702000078000128C7@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Tim Deegan , Keir Fraser , Xen-devel List-Id: xen-devel@lists.xenproject.org On 15/05/14 11:32, Jan Beulich wrote: >>>> On 15.05.14 at 11:48, wrote: >> * machine_restart() disables the watchdog itself, covering itself from other >> callers. Drop superfluous braces and watchdog_disable() from panic(). > Hmm, panic() is common code, and machine_restart()'s property of > calling watchdog_disable() is x86-specific. I realize that ARM just > doesn't have a watchdog right now, but do we really want to make > it a requirement that each watchdog-capable arch does that in > machine_restart()? Otoh an arch that can tolerate its watchdog > being disabled over the restart attempt would then not get this > enforced onto it (in which case only the description above would need > a little tweaking). machine_halt() needs just as much watchdog intervention as machine_restart(), yet that was asymmetric. I would argue that it is up to the arch to know whether playing with the watchdog is needed for these things. > >> --- a/xen/arch/x86/traps.c >> +++ b/xen/arch/x86/traps.c >> @@ -375,21 +375,18 @@ void vcpu_show_execution_state(struct vcpu *v) >> vcpu_unpause(v); >> } >> >> -static char *trapstr(int trapnr) >> -{ >> - static char *strings[] = { >> - "divide error", "debug", "nmi", "bkpt", "overflow", "bounds", >> - "invalid opcode", "device not available", "double fault", >> - "coprocessor segment", "invalid tss", "segment not found", >> - "stack error", "general protection fault", "page fault", >> - "spurious interrupt", "coprocessor error", "alignment check", >> +static const char *trapstr(unsigned int trapnr) >> +{ >> + static char *strings[] = { > If you already touch this, and if you already make the function > return const char *, then this also wants to become const char *const. > > Jan > Will do. ~Andrew