[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 4/9] x86/misc: Early cleanup



On 15/05/14 11:32, Jan Beulich wrote:
>>>> On 15.05.14 at 11:48, <andrew.cooper3@xxxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.