Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9406803pxu; Mon, 28 Dec 2020 15:28:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy64nNgquKnlwsDgDK/R6yBKT8KzeSA7oE0pW8FCnFRfNcRL0zdTjSDYthbv4wPaxtviaHq X-Received: by 2002:a50:ee1a:: with SMTP id g26mr44250952eds.68.1609198083181; Mon, 28 Dec 2020 15:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609198083; cv=none; d=google.com; s=arc-20160816; b=d4WaqznKbTqfi+qKIoD4PvcXc25JMFN8YFBCpE2dnYGxncIr5FrYC58jTkexPObwSR ieLKAPmG+Jim/NPyWbfq+x56vHVORws1jmUoxLaTkKOkFMLFtrXZUmT/Z4NWPYHjhGbN 8SuxPMLdJrDANm4S8vun489aYSY3Yugr0zDRR3GAcY+nB6jlOMBuf5ee3elwIau0Kkew b9pM/PrJxfHbxsyZoC8uFa8fz9vRAuNKj1AG2lrB29mNprKpFHTGWphlaeqX51Z1l1pk i1mc1UyTlxmmKP+FTmhk74jqlJtZ8KNL7JG6pAavAcZnbqVTJcXy9hI3Zu8ZpYjM0fRQ N9QQ== 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=7gtQu67IWps61DSY4yd2Q3d76L3B02W1v/V2EhyYeZ0=; b=OvC1oV5k2Uemig0oA14GKLVM4zLrE9Eesk6umAXe6/6jxpvdCDv0L2gAJ9rZwEYaol +a4fbnxWu/YjB/43TuSXQrVO9YN4LzpEY+c0j1S+TRDHe7bOtVgQVrSlgAsLVMp9ubhb VqOuaiI0C6Xjk0yNbLvaf4l7DlkRoADpQdPMcX6sjLfzaQnS7caXM0yYbJb987kv/mzM fi2uAaRm7y4OwrdcbhZ0OvAL5TFk65dy0qUvsh7LCqBF8/Ch0+kgiOXen0zlNi5nrh/h FIxFKYs/IFOVDRhFuk2WUiYLiiYPYKx7sYxX88BdPdmfujudz2wNOdemFh2CKntxnD4P ocAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qnlg3Wb0; 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 g10si19127177ejw.16.2020.12.28.15.27.41; Mon, 28 Dec 2020 15:28:03 -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=Qnlg3Wb0; 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 S2503232AbgL1OZe (ORCPT + 99 others); Mon, 28 Dec 2020 09:25:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:33394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503227AbgL1OZc (ORCPT ); Mon, 28 Dec 2020 09:25:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 75533207B2; Mon, 28 Dec 2020 14:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165492; bh=Xjz8+OH5Ona2jTTT8r968UgwEppVQN3XhLZuh1uymeo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qnlg3Wb0XznBR5sXNTzlcGc3ZYjPiNsJJzrE49vRvCYquWwdnhnApTnUalxYXurHK 2qMcekB6KZl8j9/b/c/jXVRsSgsjBTjC4Nvp3QkTh5o2HTZV55zJodz/ZyJSlWwXhN Nbc00kU8qw7dnPcYtNSJXkMTjKAQ8SXUOMlSv66Y= 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 5.10 551/717] s390/smp: perform initial CPU reset also for SMT siblings Date: Mon, 28 Dec 2020 13:49:09 +0100 Message-Id: <20201228125047.332418323@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -896,24 +896,12 @@ static void __no_sanitize_address smp_st /* 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;