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 16:23:08 -0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fdeN0-00018y-Ke for speck@linutronix.de; Thu, 12 Jul 2018 18:23:07 +0200 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F546701EA for ; Thu, 12 Jul 2018 16:22:59 +0000 (UTC) Received: from treble (ovpn-120-114.rdu2.redhat.com [10.10.120.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 389871102E23 for ; Thu, 12 Jul 2018 16:22:59 +0000 (UTC) Date: Thu, 12 Jul 2018 11:22:57 -0500 From: Josh Poimboeuf Subject: [MODERATED] Re: [patch V10 08/10] Control knobs and Documentation 8 Message-ID: <20180712162257.ntv44ueudncbabrj@treble> References: <20180712141902.576562442@linutronix.de> <20180712142957.626429955@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180712142957.626429955@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: 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. -- Josh