Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 20 Jun 2018 20:25:43 -0000 Received: from mga03.intel.com ([134.134.136.65]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fVjfh-0003XY-P7 for speck@linutronix.de; Wed, 20 Jun 2018 22:25:42 +0200 Subject: [MODERATED] Re: [patch V2 05/12] cpu/hotplug: Provide knob to control SMT References: <20180606192714.754943543@linutronix.de> <20180606192807.337089954@linutronix.de> From: Dave Hansen Message-ID: <90e5a28d-4a6e-b96d-629b-a72647466b2d@linux.intel.com> Date: Wed, 20 Jun 2018 13:25:37 -0700 MIME-Version: 1.0 In-Reply-To: <20180606192807.337089954@linutronix.de> Content-Type: multipart/mixed; boundary="6ZPZjf5U53mA8UnmXNlZTrTtC2va4VGt4"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --6ZPZjf5U53mA8UnmXNlZTrTtC2va4VGt4 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/06/2018 12:27 PM, speck for Thomas Gleixner wrote: > +enum { > + CPU_SMT_ENABLED, > + CPU_SMT_DISABLED, > + CPU_SMT_FORCE_DISABLED, > +}; > + > +#if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_SMT) > +extern int cpu_smt_control; > +#else > +# define cpu_smt_control (CPU_SMT_ENABLED) > +#endif Shouldn't this be: # define cpu_smt_control (CPU_SMT_FORCE_DISABLED) Otherwise, /sysfs looks like SMT is enabled even though it's off at compile-time. Also, do we have a spot that does cpu_smt_control =3D CPU_SMT_FORCE_DISABLED; at runtime for the cases where we *know* there is no SMT support in the processor? I only see that via the sysfs controls but not the normal boot process. --6ZPZjf5U53mA8UnmXNlZTrTtC2va4VGt4--