From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA64AC07E96 for ; Thu, 8 Jul 2021 09:39:35 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC91E619B5 for ; Thu, 8 Jul 2021 09:39:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC91E619B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GLB8P3Jkbz3bk2 for ; Thu, 8 Jul 2021 19:39:33 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=VXYuFR2H; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com; envelope-from=bharata@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=VXYuFR2H; dkim-atps=neutral Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GLB7s3cnZz3095 for ; Thu, 8 Jul 2021 19:39:04 +1000 (AEST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1689WrNv188072; Thu, 8 Jul 2021 05:38:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : reply-to : references : mime-version : content-type : in-reply-to; s=pp1; bh=B+hqNbCEg+qcV5NGNFXNr74GNqbLu4ZImEFvXIIYLe4=; b=VXYuFR2HohZKTkbtfIz9vFCLSoUu7ulqot5aM2vyIaJmuo+hOd7DrKkE3JbmOoZ6+3Nd re+1eqP8VELwwVTqigZOqMFCiMIdtwMcDlx0e+6cOrEFzuEIqx8UFhJdBnq/8Hjkn90a 34TVummAAHhg1mxDpLLuEC3t9tyn9YzuGeLLGTagz39j0rmlURJVgpDCPQDtaJdhXWt5 soPBQf7gxXrypH/yBqDtBUBqc6XsyWbDrBeUANT2elWbDFU92QZmBHaWkZ3VdkzESphP cELT20vzSp/2kgOr5GYW4pMSgBiDs2An15whXLDnBYQdwea55oPtEW1G1z5OJn8194NT +Q== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 39mm67au23-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jul 2021 05:38:44 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1689cgD0027933; Thu, 8 Jul 2021 09:38:42 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06fra.de.ibm.com with ESMTP id 39jf5hh55w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jul 2021 09:38:42 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1689ceuQ34931086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Jul 2021 09:38:40 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1B6CD42049; Thu, 8 Jul 2021 09:38:40 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2A0AC42047; Thu, 8 Jul 2021 09:38:38 +0000 (GMT) Received: from in.ibm.com (unknown [9.85.82.66]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 8 Jul 2021 09:38:37 +0000 (GMT) Date: Thu, 8 Jul 2021 15:08:32 +0530 From: Bharata B Rao To: Valentin Schneider Subject: Re: [PATCH] powerpc: preempt: Don't touch the idle task's preempt_count during hotplug Message-ID: References: <20210707183831.2106509-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210707183831.2106509-1-valentin.schneider@arm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: l2p7f7ohThQcgL4L_j4bGfUEvKWHiNCQ X-Proofpoint-ORIG-GUID: l2p7f7ohThQcgL4L_j4bGfUEvKWHiNCQ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-08_04:2021-07-06, 2021-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 priorityscore=1501 phishscore=0 clxscore=1011 mlxlogscore=999 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107080052 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: bharata@linux.ibm.com Cc: Srikar Dronamraju , Arnd Bergmann , Peter Zijlstra , linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Ingo Molnar , Guenter Roeck Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Jul 07, 2021 at 07:38:31PM +0100, Valentin Schneider wrote: > Powerpc currently resets a CPU's idle task preempt_count to 0 before said > task starts executing the secondary startup routine (and becomes an idle > task proper). > > This conflicts with commit > > f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled") > > which initializes all of the idle tasks' preempt_count to PREEMPT_DISABLED > during smp_init(). Note that this was superfluous before said commit, as > back then the hotplug machinery would invoke init_idle() via > idle_thread_get(), which would have already reset the CPU's idle task's > preempt_count to PREEMPT_ENABLED. > > Get rid of this preempt_count write. > > Cc: Guenter Roeck > Fixes: f1a0a376ca0c ("sched/core: Initialize the idle task with preemption disabled") > Reported-by: Bharata B Rao > Signed-off-by: Valentin Schneider > --- > arch/powerpc/platforms/cell/smp.c | 3 --- > arch/powerpc/platforms/pseries/smp.c | 5 +---- > 2 files changed, 1 insertion(+), 7 deletions(-) The messages like "BUG: scheduling while atomic: swapper/1/0/0x00000000" for each secondary CPU are no longer seen after this patch on powerpc. Tested-by: Bharata B Rao