Message ID | 20230615154635.13660-11-ldufour@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp743445vqr; Thu, 15 Jun 2023 09:03:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5dVgIzlZa32SxbLZwFc0Rv/inSEPMtPGc5SO8ZZGNPI7qrjIMkFWvFid3/V4MYW0LHxUSB X-Received: by 2002:a19:6d08:0:b0:4f4:d2ed:410 with SMTP id i8-20020a196d08000000b004f4d2ed0410mr8855326lfc.41.1686845039490; Thu, 15 Jun 2023 09:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686845039; cv=none; d=google.com; s=arc-20160816; b=hLa78IHned7H8aH5Ysn3f8dSRR/8MdSivHej/jJdc+3WlNvLGAo75Sxf1g3mLMEnlg 81QORMbLxn9G+F2YtjLFlLvTVojBbVQ0lroPzU4Ejw5wcEbDC+BZq6sIHTll/rWs2GEG jRYiceb0QZz94w+yZHJjLhGnohOdMBSJ2hqtREjtrysFB5LMjzHhF2sch8A/6UWGDF6X fSFTn1qk6L66PeU5P2/C85k8V+HTYAq8mx81uGy86KcfyrEagBWbAJ3ealslEXQ/XYqo Q2NrkbMFOnbTIwzzmO731t3G1p35oDG2enMnn0r8LkNqJq0NRqB4YPs5vZAKozGcURwy funw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jVW7yohLK9Vw3P0klRV5j1vQuRogcPT4LlvarI8f2XM=; b=Qk0Q33IfW9vHwY3u/dlDqVQDgv+BA1D7jRAPtRKRJrDU2jto0UI4fzlkrxdwdWIBSt A/8pbFmUstY6eZ3C1ErUOXVzAXNE5Vsc8CgZBIODYsLKOf6a64+QN47LCYEtml64wpjy a1zwHampcfQVnpEgVqNd/UahAZMLKTsOywS9cGBcn8wXxzPSFxjMWvxfEhIFibZdDR5s lASh9lwMokVCcABCvHXBFfXG1ooF77qzNStJ3ntaiFof+GMIATVfKMRcg27QogAN2wdB tdufWIm53C3vUfBOg1FBZXOU0hXWuOoCKac9ZXiJzCu+bGm4re9v/ethba/ZurOTJdGQ i7vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZtllXgKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ha9-20020a170906a88900b009766831c118si10030671ejb.1037.2023.06.15.09.03.23; Thu, 15 Jun 2023 09:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZtllXgKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233256AbjFOPrX (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Thu, 15 Jun 2023 11:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344134AbjFOPrT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 15 Jun 2023 11:47:19 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29E6618D; Thu, 15 Jun 2023 08:47:18 -0700 (PDT) Received: from pps.filterd (m0356517.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35FFfmbA031929; Thu, 15 Jun 2023 15:46:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=jVW7yohLK9Vw3P0klRV5j1vQuRogcPT4LlvarI8f2XM=; b=ZtllXgKZw/g4uFoHc8DU3jpSMWboQk0VcUXkOmRd5qXblaICbrqJY3aY/fq0SkX1ISrZ /R7Z+ZWDG5q/LPeUBJtb+hA9ObKTd7gRNjTHG0CBPbYvR5eaeTvqOkWLtEBWkVAttYdi uBYYMhnjPY1eyuoC6RI32Y0sApmBCm6vuxXxmTezGvh8xeIndybC1w0oZzl2efq9hKf/ ta1uhPYYR9mqhbcQwv6bi4mcWTgC7Y+ASGmpqOix2ryoMkmpsR2boiIfDBBpNjBuwhCv EeYmBqPRREyxVkfhwyd3vDqwi7J4574kC+ygjIeOfyNHBBgKpkRlAAIjnQJa9HPZS2Ys JQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r84qb1yms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jun 2023 15:46:48 +0000 Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35FFIJmU020546; Thu, 15 Jun 2023 15:46:48 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r84qb1yj6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jun 2023 15:46:48 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35F10bch012068; Thu, 15 Jun 2023 15:46:45 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma04fra.de.ibm.com (PPS) with ESMTPS id 3r4gt52r47-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jun 2023 15:46:44 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35FFkgVg20710028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 Jun 2023 15:46:42 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DE8A20040; Thu, 15 Jun 2023 15:46:42 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E3C8A20043; Thu, 15 Jun 2023 15:46:41 +0000 (GMT) Received: from localhost.localdomain (unknown [9.144.159.119]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 15 Jun 2023 15:46:41 +0000 (GMT) From: Laurent Dufour <ldufour@linux.ibm.com> To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, npiggin@gmail.com, christophe.leroy@csgroup.eu, tglx@linutronix.de, dave.hansen@linux.intel.com, mingo@redhat.com, bp@alien8.de Subject: [PATCH 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs Date: Thu, 15 Jun 2023 17:46:35 +0200 Message-ID: <20230615154635.13660-11-ldufour@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230615154635.13660-1-ldufour@linux.ibm.com> References: <20230615154635.13660-1-ldufour@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: nXfwAgs5Y7mDP_h_f298NttcCwBTagAh X-Proofpoint-ORIG-GUID: ILE6_SZWj42_A3EWK-8GoGAfYD46l_34 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-15_12,2023-06-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=879 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306150136 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768785223781723140?= X-GMAIL-MSGID: =?utf-8?q?1768785223781723140?= |
Series |
Introduce SMT level and add PowerPC support
|
|
Commit Message
Laurent Dufour
June 15, 2023, 3:46 p.m. UTC
From: Michael Ellerman <mpe@ellerman.id.au> Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 61fb7cb00880..e62835a12d73 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -398,6 +398,14 @@ static int dlpar_online_cpu(struct device_node *dn) for_each_present_cpu(cpu) { if (get_hard_smp_processor_id(cpu) != thread) continue; + + if (!topology_is_primary_thread(cpu)) { + if (cpu_smt_control != CPU_SMT_ENABLED) + break; + if (!topology_smt_thread_allowed(cpu)) + break; + } + cpu_maps_update_done(); find_and_update_cpu_nid(cpu); rc = device_online(get_cpu_device(cpu));