Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9253461pxu; Mon, 28 Dec 2020 10:31:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzM5hIFlBkuAlg+c1cHdgsVotGvFmkL+0DYGfJTUC9RYqo0ZQAHtLYuWumYxwxo4GhwS74b X-Received: by 2002:aa7:cf04:: with SMTP id a4mr43412525edy.99.1609180273600; Mon, 28 Dec 2020 10:31:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609180273; cv=none; d=google.com; s=arc-20160816; b=ZgjbCNoIXBCv/lnOL1pdmrhTUlClHoEFajzSR4f14TRcrmQA0iCOMTC8KV6q+uy5WC WOjUHAVyyArqL+ohE9gOFv2W8vT9CxGfoafLCJMkT8UYujgGAsNUS2dvTHjp2e7thQxX sfZCY1oD33hVzaN07jxdH93/q9Icd+YMjGdjAjruYpQB/Onq2+kQZQw4cjzcJsVEzaoY R9z4neHNzspSUsEwvTztKbiVJ0AZdOcQVUi7tsNUkI9ccHQbQGSt+PaZKYjJsu6lkaAC CbMvemN07qlrfzM8WjBtNPe4hEW1xbnU+0rGP0wb4763hZ3JHtsAGyD91qgu2bAHZMTB yEig== 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=lGHqMALfbuKdV1Hs8gnbT/ke5Kgb+A+cnIJz2GbwLkk=; b=LUmMJrTidJOrxkl9bDGrJEvrN1dbdG8Tn7u6g4sFUuTVQRCCjxsreABTtT4Z4zsnyh RLUDx5tr7VXBW56DZZA0EiLUDUpW4pil5ANGIyqh+iGz2Nr7tkAqyK0UgieAqvw7bldT HZbGWBpkN9NqFNM8PTkoTCs9BvwHFwMwBRXlxEJFMh99v2rfR+EcajreLqmTA6UZvyJi umTW48DsXGQfFe/dzkBrfvLmE9iYAj+nveQ2988EikmzTDcHnBNmcjU8yjQJXz8vep98 JKWAQ2vATiWo8/3zehV8ABYP6DQqaazjaeuPezG6KMUORp4lYuw3HLPy4AQK/uggjVRr Jotg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Cg5M/3qg"; 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 i19si20202043edr.468.2020.12.28.10.30.51; Mon, 28 Dec 2020 10:31:13 -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="Cg5M/3qg"; 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 S2388001AbgL1Ndu (ORCPT + 99 others); Mon, 28 Dec 2020 08:33:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:33044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387827AbgL1NdA (ORCPT ); Mon, 28 Dec 2020 08:33:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 78D712072C; Mon, 28 Dec 2020 13:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609162365; bh=DqaDuenVWDuPim+nlw0OQY6Pd9PF9YPO0SjC34NwOXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cg5M/3qgGwQk3VSCX1dDwtD8wJ7hdQiSo+Ae/W/U87PBeI59XHg6H/5hwSwQdtIEK yvx3MLzycv2ugSDf/3102MMNde1YeJ/6sV09wtgGdWhd1FkKTqg1TJUIlgC2ChNZSW /CCnNbG7HxrkZU3LSXFVOyWAZNcfaDSVFDMf5OJE= 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.19 279/346] s390/smp: perform initial CPU reset also for SMT siblings Date: Mon, 28 Dec 2020 13:49:58 +0100 Message-Id: <20201228124933.267704720@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@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 @@ -863,24 +863,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;