From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH v2 1/7] x86: clean up psr boot parameter parsing Date: Mon, 23 Mar 2015 16:32:26 +0800 Message-ID: <20150323083226.GI5371@pengc-linux.bj.intel.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> Reply-To: Chao Peng Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <550C5D2F020000780006C306@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: 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 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? Chao