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

Re: [Xen-devel] [PATCH v2 1/7] x86: clean up psr boot parameter parsing



>>> On 23.03.15 at 09:32, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> On Fri, Mar 20, 2015 at 04:47:27PM +0000, Jan Beulich wrote:
>> >>> On 19.03.15 at 11:41, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
>> > +static void __init parse_psr_bool(char* s, char* value, char* feature, 
>> > int 
> bit)
>> > +{
>> > +    if ( !strcmp(s, feature) )
>> > +    {
>> > +        if ( !value )
>> > +            opt_psr |= bit;
>> > +        else
>> > +        {
>> > +            int val_int = parse_bool(value);
>> > +
>> > +            if ( val_int == 1 )
>> > +                opt_psr |= bit;
>> > +            else if ( val_int != 0 )
>> > +                printk("PSR: unknown %s value: %s\n", feature, value);
>> > +        }
>> 
>> Even more so that now you try to consolidate and re-use this, you
>> should honor the "off" case as much as the "on" one, i.e. explicitly
>> disable a feature if it was requested to be off.
>> 
> This will change the default behavior(both cmt/cat will default to on),
> is this your expectation?

Certainly not. And why would that be? Note that I didn't ask you to
flip things, but I said "as much as", i.e. _both_ directions should be
supported (and hence the current and future default doesn't matter
at all here).

Jan


_______________________________________________
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®.