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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3D3CDC27C6E for ; Thu, 13 Jun 2024 18:21:56 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=mkgk9vG5; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4W0W2p0bpxz3cYC for ; Fri, 14 Jun 2024 04:21:54 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=mkgk9vG5; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=amd.com (client-ip=2a01:111:f403:240a::622; helo=nam04-mw2-obe.outbound.protection.outlook.com; envelope-from=kprateek.nayak@amd.com; receiver=lists.ozlabs.org) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on20622.outbound.protection.outlook.com [IPv6:2a01:111:f403:240a::622]) (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 4W0W2028RJz3cTf for ; Fri, 14 Jun 2024 04:21:10 +1000 (AEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fRXm/bjXqtT0foH0NjdLr/fqwagcIwE6WH5yeUXUXsyoMwEdRfYBvpEuPK0WDZl+FKwQdY/oSczSXh3EQ0DxTSXSJV1jKmATDH9ncxZpDcB0Uh8sVjc66qqmfDef9NDQcd0VbD2Gbbs8PjnxRDIeMnIPUM9Ksp9RQR9yD+r6xeYYema6gWohlGmxDHU/jAgR1rM8zThcuA0qxNRG1vEGzBye+OHJXI1vCT4p+rMjz3RPnJgOQMrUc5HkFx8R3NOLbPQIep/NysSYOAtWOOvHOFiu13/yMXqdibULhkB5RnL5ih0NxP8h588Sfs7UnBK9Ouk8IW2FnPOgYT0baIuFjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/hs7C6zIKGEaHPiVxfq0Cw2LOk7ro6TzKuQqWBKK9DA=; b=Gmzwkktn7wGL63ofnyog4U38MgaLJKuFNe+73MRm2CNf7PExdJhTNs6RQVRbKRmxEgRHMgOzlck9RGliGmuvn+aDC+r0yWRjyPbqY4abbodBhfMZIQJN08hXctz8bJE2opytcYOCf6h+OpSB3dSBoh3NlsemVVCu77/pTlVsRsV1EkPjJrDPUjSa/Jr3/X3/yT53yw1XbDlKW2SjHkTbiGCqT4NUMhS9DNP/zL4LQcV4MJEsY13TN/QYx1ryK7fQO0k4RPj4imG7+wWK4uWqDYatvwXcK8EOSZkzfTds2cl6gZcgw2e6N5WKY0hh+4FOQl0LEdbumtQHZu/MZ8jVDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/hs7C6zIKGEaHPiVxfq0Cw2LOk7ro6TzKuQqWBKK9DA=; b=mkgk9vG5AUFrfzSUPBKrYX8ckVOMvRxYdHNZMYfcn4OVDQGybfOiQywUhM4qj3AjexYNsWCbi1tldh8eqoNNpTYiCFP6mWUQntCt0nOo0CHiIeTAU5Vo7OQ2wCwOWsn+Ta4EpygD22TOsUj/b0Ex/Vp74f1HXkBe61Fwz2luaY8= Received: from BL0PR03CA0010.namprd03.prod.outlook.com (2603:10b6:208:2d::23) by CH0PR12MB8486.namprd12.prod.outlook.com (2603:10b6:610:18a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 18:20:50 +0000 Received: from BL6PEPF00022575.namprd02.prod.outlook.com (2603:10b6:208:2d:cafe::35) by BL0PR03CA0010.outlook.office365.com (2603:10b6:208:2d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.24 via Frontend Transport; Thu, 13 Jun 2024 18:20:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF00022575.mail.protection.outlook.com (10.167.249.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 18:20:49 +0000 Received: from BLRKPRNAYAK.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 13 Jun 2024 13:20:30 -0500 From: K Prateek Nayak To: Subject: [PATCH v2 08/14] powerpc/thread_info: Introduce TIF_NOTIFY_IPI flag Date: Thu, 13 Jun 2024 18:16:07 +0000 Message-ID: <20240613181613.4329-9-kprateek.nayak@amd.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240613181613.4329-1-kprateek.nayak@amd.com> References: <20240613181613.4329-1-kprateek.nayak@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00022575:EE_|CH0PR12MB8486:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ff126d4-e81c-4574-f65c-08dc8bd58d9b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230035|376009|7416009|1800799019|36860700008|82310400021; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sPbGW6F6ZoKIgzR2KqWIPjeRkSjKDDXRUL0DObH8QPYw5L2JcDPcK4Fju5qN?= =?us-ascii?Q?TtuxY4gPP/bXLv63ycKdCoqehGe2K5mMROEyYJ9GpU8do+9Sjs1n0f726H3R?= =?us-ascii?Q?zW/yjT5cbLTuOkkZnkNVLgu2zAeoldwrwzc13QmpTgdqAiQc2Tb/3HmmoZB5?= =?us-ascii?Q?GbBqhzR7To6TWF11TLik8uDsrf+adO+UfBYZnAjGdDStpv+Jk5yuZsqfeZBr?= =?us-ascii?Q?wygOF68oVPPZhCa0Uq28tllIvIXaqdfO8TbtdqeiQvlKvbaQJStlMESRxdJf?= =?us-ascii?Q?i1t+x+sOJyJsgPz+zDeYdaJAxfjEnK8I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+8Ypa7pe0jihcEPUFJfSl/34oClnoYo9DWocs21Ig5BaA/kwiCnrAgEc?= =?us-ascii?Q?X/MlOiCJZlTtlP8XorriNz28Q3Kf4eVQYnmQgVx1oy0BuyYbx4vbTdS7Vr7h?= =?us-ascii?Q?4X8txYM0ufL77NNVVGnIBlH7LQnFT86eq2LRFjTr+JI06kEvoRDfz+JSk3Xn?= =?us-ascii?Q?0PUIvhvIBeF+qLEEWc94jhGA2qsdP1g7h+7R9xe+N0IXuW7v5A=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230035)(376009)(7416009)(1800799019)(36860700008)(82310400021);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 18:20:49.7527 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ff126d4-e81c-4574-f65c-08dc8bd58d9b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00022575.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8486 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: , Cc: Juri Lelli , "Rafael J. Wysocki" , Peter Zijlstra , Ben Segall , Benjamin Gray , Valentin Schneider , Vincent Guittot , Daniel Lezcano , Christophe Leroy , Ingo Molnar , Mel Gorman , "Naveen N. Rao" , Andrew Donnellan , linux-pm@vger.kernel.org, Nicholas Piggin , K Prateek Nayak , Steven Rostedt , Dietmar Eggemann , Daniel Bristot de Oliveira , "Gautham R. Shenoy" , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Add support for TIF_NOTIFY_IPI on PowerPC. With TIF_NOTIFY_IPI, a sender sending an IPI to an idle CPU in TIF_POLLING mode will set the TIF_NOTIFY_IPI flag in the target's idle tasks's thread_info to pull the CPU out of idle, as opposed to setting TIF_NEED_RESCHED previously. This avoids spurious calls to schedule_idle() in cases where an IPI does not necessarily wake up a task on the idle CPU. Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: "Naveen N. Rao" Cc: Benjamin Gray Cc: Andrew Donnellan Cc: "Rafael J. Wysocki" Cc: Daniel Lezcano Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Cc: Valentin Schneider Cc: K Prateek Nayak Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Signed-off-by: K Prateek Nayak --- v1..v2: o No changes. --- arch/powerpc/include/asm/thread_info.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 15c5691dd218..9545e164463b 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -103,6 +103,7 @@ void arch_setup_new_exec(void); #define TIF_PATCH_PENDING 6 /* pending live patching update */ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SINGLESTEP 8 /* singlestepping active */ +#define TIF_NOTIFY_IPI 9 /* Pending IPI on TIF_POLLLING idle CPU */ #define TIF_SECCOMP 10 /* secure computing */ #define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ #define TIF_NOERROR 12 /* Force successful syscall return */ @@ -129,6 +130,7 @@ void arch_setup_new_exec(void); #define _TIF_PATCH_PENDING (1<