From: "Jan Beulich" Subject: Re: [PATCH v2 1/7] x86: clean up psr boot parameter parsing Date: Mon, 23 Mar 2015 08:47:36 +0000 Message-ID: <550FE138020000780006C7A2@mail.emea.novell.com> References: <1426761695-12545-1-git-send-email-chao.p.peng@linux.intel.com> <1426761695-12545-2-git-send-email-chao.p.peng@linux.intel.com> <550C5D2F020000780006C306@mail.emea.novell.com> <20150323083226.GI5371@pengc-linux.bj.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150323083226.GI5371@pengc-linux.bj.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chao Peng Cc: wei.liu2@citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, will.auld@intel.com, keir@xen.org, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 23.03.15 at 09:32, wrote: > On Fri, Mar 20, 2015 at 04:47:27PM +0000, Jan Beulich wrote: >> >>> On 19.03.15 at 11:41, 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