Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 29 Jun 2018 19:14: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 1fYyqL-0005V5-JW for speck@linutronix.de; Fri, 29 Jun 2018 21:14: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 F08A6BB424 for ; Fri, 29 Jun 2018 19:13:58 +0000 (UTC) Received: from treble (ovpn-120-185.rdu2.redhat.com [10.10.120.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C58BC111C4BC for ; Fri, 29 Jun 2018 19:13:58 +0000 (UTC) Date: Fri, 29 Jun 2018 14:13:57 -0500 From: Josh Poimboeuf Subject: [MODERATED] Re: [patch 2/2] cpu/hotplug: Boot HT siblings at least once Message-ID: <20180629191357.nfgiqd3dpf6imrb6@treble> References: <20180629140546.075961202@linutronix.de> <20180629140611.033996006@linutronix.de> MIME-Version: 1.0 In-Reply-To: <20180629140611.033996006@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Fri, Jun 29, 2018 at 04:05:48PM +0200, speck for Thomas Gleixner wrote: > @@ -422,6 +454,16 @@ static int bringup_wait_for_ap(unsigned > stop_machine_unpark(cpu); > kthread_unpark(st->thread); > > + /* > + * SMT soft disabling on X86 requires to bring the CPU out of the > + * BIOS 'wait for SIPI' state in order to set the CR4.MCE bit. The > + * CPU marked itself as booted_once in cpu_notify_starting() so the > + * cpu_smt_allowed() check will now return false if this is not the > + * primary sibling. > + */ > + if (!cpu_smt_allowed(cpu)) > + return -ECANCELED; > + Shouldn't this be checked *before* unparking the kthreads? Or does ECANCELED magically re-park them somehow? -- Josh