Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9046593pxu; Mon, 28 Dec 2020 05:20:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/KyceJApvDd25gZ8ZDZX9g8UqLTRRYY9JdwrYqUhqhm/HibktwVOTtXUOJgJoHsxxC6JL X-Received: by 2002:a17:906:34ca:: with SMTP id h10mr42184536ejb.417.1609161602542; Mon, 28 Dec 2020 05:20:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161602; cv=none; d=google.com; s=arc-20160816; b=Y4k1qeyk2Sw1sW8eF+uXoz/lfcaW8dHMMcJPMc38fHyvFCglVnGsGEbJV3rxeCamT3 aM5V+Mv5DPQORqcojHjK8Ik/TkGnJoPzs+FXdFocJYyRK3ut+eZEbCeLedjt/7PkMGaX NOOGh29uR8JRzHdjDge4a4JvMxcs86/WilmBmlT2vsx9v1Iw4uRpzVpixfEM44cVy/Go kxtx+xL/R2z7JdkelAXVcC9RrNhfLr7+nMjbpkjEsnMbFaBe5PYYocO2kHi6lUdPj2ju EWvexXEzdy02IaOIswfNiVRWmSFSUAAXdynJlAJTXgYYTe+V8TnuiglPz0imsKnrWTkV +g/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SUcbT6DKaIdNj1BnGv4DEp3wz+T1sNpkELh/YJ3jjk8=; b=oLvzaxxhSf1AO4ZnlCFz+ACrHe1P+MoMRy2PD+I2ivwUwVLtJj0u1rUAq2zFvJLsNb QEjBhWipnINsB9Bg1mAhM6gMq0nfK6b0TRWLLJWkDR/shEFddItJYvzfqDOhgocFlOW8 Hx9025PozmfpvGnhpzLUUWaHMTYGefQOc5NZZrG33pMeqvudqi7hXsVKCBV7CHHMmmit ru+VGzl9lwMnRIwGxEIUVWKgyGxRobpXx4o3Sw98ZuUguRR7ZRQsjWQGbcN3zAvPPe23 yONfot9UjnP4G7a2ad3XBGInOU460f6+X7/5WxccmArIgQmGxV/TCCLxYexe13hmDs97 G5Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VlnQP8vq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb9si19693161edb.436.2020.12.28.05.19.38; Mon, 28 Dec 2020 05:20:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VlnQP8vq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733253AbgL1NQa (ORCPT + 99 others); Mon, 28 Dec 2020 08:16:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:44242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733219AbgL1NQ0 (ORCPT ); Mon, 28 Dec 2020 08:16:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AAB7E20728; Mon, 28 Dec 2020 13:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161371; bh=2fgNImDlR7LwgjzeVgmhsE0U7Ncb5tXlkhtXW2kUHyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VlnQP8vqowN6laNJa86PznkdXE9CPOMDdCPyxtYuarQr2dvJkUDOxrkATePegze+g Zz6R4V4ZsoEftrxfvy4mC/5EtI5ktweUOsdTxTxdz/cmi2/7Sl4mQ4kwk4mOaQN/pc obytACRoKPgdx/NqejHVU/EcjvGagUs6MrCOdGxw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Carstens , Sven Schnelle , stable@kernel.org Subject: [PATCH 4.14 191/242] s390/smp: perform initial CPU reset also for SMT siblings Date: Mon, 28 Dec 2020 13:49:56 +0100 Message-Id: <20201228124914.092122969@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sven Schnelle commit b5e438ebd7e808d1d2435159ac4742e01a94b8da upstream. Not resetting the SMT siblings might leave them in unpredictable state. One of the observed problems was that the CPU timer wasn't reset and therefore large system time values where accounted during CPU bringup. Cc: # 4.0 Fixes: 10ad34bc76dfb ("s390: add SMT support") Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Greg Kroah-Hartman --- arch/s390/kernel/smp.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -864,24 +864,12 @@ static void smp_start_secondary(void *cp /* Upping and downing of CPUs */ int __cpu_up(unsigned int cpu, struct task_struct *tidle) { - struct pcpu *pcpu; - int base, i, rc; + struct pcpu *pcpu = pcpu_devices + cpu; + int rc; - pcpu = pcpu_devices + cpu; if (pcpu->state != CPU_STATE_CONFIGURED) return -EIO; - base = smp_get_base_cpu(cpu); - for (i = 0; i <= smp_cpu_mtid; i++) { - if (base + i < nr_cpu_ids) - if (cpu_online(base + i)) - break; - } - /* - * If this is the first CPU of the core to get online - * do an initial CPU reset. - */ - if (i > smp_cpu_mtid && - pcpu_sigp_retry(pcpu_devices + base, SIGP_INITIAL_CPU_RESET, 0) != + if (pcpu_sigp_retry(pcpu, SIGP_INITIAL_CPU_RESET, 0) != SIGP_CC_ORDER_CODE_ACCEPTED) return -EIO;