From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 12 Jul 2018 17:12:26 -0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fdf8i-0002SB-By for speck@linutronix.de; Thu, 12 Jul 2018 19:12:24 +0200 Date: Thu, 12 Jul 2018 19:12:15 +0200 From: Greg KH Subject: [MODERATED] Re: [patch V10 08/10] Control knobs and Documentation 8 Message-ID: <20180712171215.GI23030@kroah.com> References: <20180712141902.576562442@linutronix.de> <20180712142957.626429955@linutronix.de> <20180712162257.ntv44ueudncbabrj@treble> MIME-Version: 1.0 In-Reply-To: <20180712162257.ntv44ueudncbabrj@treble> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Thu, Jul 12, 2018 at 11:22:57AM -0500, speck for Josh Poimboeuf wrote: > On Thu, Jul 12, 2018 at 04:19:10PM +0200, speck for Thomas Gleixner wrote: > > -static int __init smt_cmdline_disable(char *str) > > +void __init cpu_smt_disable(bool force) > > { > > + if (cpu_smt_control == CPU_SMT_FORCE_DISABLED) > > Also needs to check for CPU_SMT_NOT_SUPPORTED. > > > + return; > > + > > cpu_smt_control = CPU_SMT_DISABLED; > > - if (str && !strcmp(str, "force")) { > > + if (force) { > > pr_info("SMT: Force disabled\n"); > > cpu_smt_control = CPU_SMT_FORCE_DISABLED; > > } > > +} > > A bit weird that cpu_smt_control is written to twice in the force case. > An if-else would be clearer. It's trying really really hard to force it :)