From patchwork Tue Jan 14 01:18:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaolei Wang X-Patchwork-Id: 13938278 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 ED681C02180 for ; Tue, 14 Jan 2025 01:20:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=H/G8WPhGLyqNj/Ez+71muygePsUGi9nPMLlEE5kFDHw=; b=zdMfKBQLI8j3D6E99GpkCE7h+4 5rq+9R8e+2Y0+J+6WfWFuQn9PGGr37flV7BtK7ztgzKNiUxqRiKUyb7vw9Ad9j4VYzsrf6guTNh6f GAQ83jTEaWvlaQbneYy4Nj9lkQ5oi+evRlZ/Wdq9sq1GEJkX56710L3SqUbuArOn09l/ESPX6gT/E diZOsVFKuo+wFWQltWLs4F/EDxq1EjjBrB8D+3V5QBRKeLYHzVdqoxELQ4rygRqqghttL4qh1tjyM cFOUsBGM1GyGqh+Ph9M8OgysuX/ZLhie7/YCLFogWFtAUp6bHeLhbsA/oLnT69zAQWsn/auiPTZ0c CIuPR8SQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tXVbG-000000077hZ-48cF; Tue, 14 Jan 2025 01:20:10 +0000 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tXVa0-000000077Xw-3B6x for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2025 01:18:54 +0000 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50E1024m018216; Tue, 14 Jan 2025 01:18:43 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2041.outbound.protection.outlook.com [104.47.57.41]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 443fm8ag0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Jan 2025 01:18:42 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DY6k/iFfkEKlfijMLvG/la+lfBeTg90ZLYG/vXxfAyQG6GSoAOkXe/7PhZXZs2U9BSfI0FiHDr4xyZDYiW5xpYhr+Q9kpqza+4jfNK+/eq1+uNCUiJWpNYrF+6NF8+Me67fLWFvGVcUi6ayyiId9srBmHsA0+EHcMREH6gXfvcwCsa0G90y3mom18g7MM9JaOZDFUYEZG4iGisf1vroMlUN1BUoCIdObhsEMfwT4OB5kli+TqTiELh5yFKxQ3Ry8p4uKERmos11neml4UGOzGMfhRAl4jgPNfQ3LUzjsJcQIDIXZJkwCBdS9j0iUhyDwiaMOvtjLc7O9DP1AiFbHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=H/G8WPhGLyqNj/Ez+71muygePsUGi9nPMLlEE5kFDHw=; b=qfxWwSqcz7wgiCyP00agnSIC8l0KnFsfRQW3uZVgnxEyEy4CDdPyoIZClaNX5ZDgLUwBy2lEdD7PHUQGpYr+u7nI+T1kdwXBwa4PZ7BwOrqpzxyynVNKSBTPmL+JUL4d5DVpPsNFTP3T8P5XZaCoNojtPLHk6cgs+kYUKGSNWidc5j6O4YRER6ILFZ6WBLsFd5BTRTmBfbI4SaGmnTBMGEcB3UKLMEr9i1p/UayFyppcT1NbWoPPYUviAQW46/9dQrjkHxVn7236UjM1BLQEnUmS3h3flNTk0undNEBoE7jSsNcIeNDyiJhIyUWKaWkth0TPUsp6Jgipw+8YwsX1Zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from MW5PR11MB5764.namprd11.prod.outlook.com (2603:10b6:303:197::8) by SN7PR11MB7994.namprd11.prod.outlook.com (2603:10b6:806:2e6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Tue, 14 Jan 2025 01:18:40 +0000 Received: from MW5PR11MB5764.namprd11.prod.outlook.com ([fe80::3c2c:a17f:2516:4dc8]) by MW5PR11MB5764.namprd11.prod.outlook.com ([fe80::3c2c:a17f:2516:4dc8%7]) with mapi id 15.20.8335.015; Tue, 14 Jan 2025 01:18:40 +0000 From: Xiaolei Wang To: ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, ping.bai@nxp.com, l.stach@pengutronix.de, marex@denx.de, aford173@gmail.com, xiaolei.wang@windriver.com Cc: linux-pm@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] pmdomain: imx8mp-blk-ctrl: add missing loop break condition Date: Tue, 14 Jan 2025 09:18:18 +0800 Message-Id: <20250114011818.2401479-1-xiaolei.wang@windriver.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: TYCP301CA0018.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:381::19) To MW5PR11MB5764.namprd11.prod.outlook.com (2603:10b6:303:197::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW5PR11MB5764:EE_|SN7PR11MB7994:EE_ X-MS-Office365-Filtering-Correlation-Id: 32ea469b-e380-40bd-2f89-08dd3439612a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|52116014|7416014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: VJa9Gi9+hrMyVgLGdYhYa7p6SCBDvWLzSyIUUNLpRHIJnrj7kLrPzHSJRY20mohyz2hW1m1JsvPHZ7Iwd31nS05g5mZlHkwPRVpI/gvP5MBtIuAUymTgWrIyzPb8uSePNHcg01XtDpdTJwvDm5tqfYqZ438R+c6oTwkNuMZf9xWYVkzU/oBpGtlBm2XLMZdgcmiIOeWuo1vzLZenpXRNhg/VicAyvC4Hlu7kt52qNl+odUhLp3jgFVxjpCv7JdqArqDa3D3ZKBLTrwclGQSBpQDMm7eeODjf5FBwe1DY8yON/3sKext7/MGrHEhubgV5TluFzIgkFf/3jJOfQe4kqM3tbl1EzierE1KNwBu/CgVGE2WNdBhfYvg8xgg3UlVkFzkM5+sNFaviUgpVILZJMXO79zdn5s/7TuqJyi4NrilCraS2hlO5cOZNHlFTDU4qvZvDOgN9DLGilyA+uiOR0Bl42SREHqc58Q5nA6XdmBtomWy3VSKoV7Fd6C4GwUJqdBeovZYqfj2shi93BeGf7EyOvjz5oQ5hKP5D7qoisYTxMNAGd99/vc75rBYsax84I2xnFKN4BTY/zbg6r3Q/yJNHrt0iJZakXP1bdT+/OCqGtkCZY1DOXHcxv92mBF6dkyMOjrxo2sVTKwAtAkV5kxG6UVzExNIO76Z9S4Dzhb8lS+2erSeKsm/72eg9ZRB2ANxmBuZIUn9q3YtItfKfXbFuZfrcFXPoruQoDahGzecQ/QaW62/ifmLZX54gsNg2gtvFhxHd7cD5s5cnb5jodRvHS7/ABA9hWxdM3Xhk+h2E3jsyeLiOXPw4C+l9KqKXv+H+M0Sf7H5jQqnBRFh1JzhNWYMPGZwfUW8Kdems4BZrdgaEYcIRxed8P9FgsYqNE+EMufb+eFqjKfS7SEW7XnVve5Au+WNgtdyEWwuYSeHlsNeH0QRSQ8pe5hgh/A7+HDE2tmdJaurJtYT8Mty1NPtUOzZ7tmQfCkJ1KWA07PxQEbA9Ka9ghAiHXkxOrFNV8+/Wka/1OteIqNElxuiseuTYgZHY6qQMGvvrLVrqMzboQdeSQGjcZAljumqmpRZ8I7zeDHsr9GeeMzwQLK4cEKQb5jx8TsYKphCe1R9oshVKl4BbR7VO2QotWFhGSihAdrhK62clX0gN/BLkbfslelmXizZ1daSVqg0L7G9JlUvp355n7CRJiI7DGDEoPk17PxlHrYZnOE5I5ZLzERjujNc579s4cRdp21ygEexrp4Q7A/9bB5jVs+lyjghwFbwAhOZF1m4ObBvnXOZKV7zGhybHaS+oanqIPh0krB9H3QqR6zIDdIUfEKA7+hsDRwnh8ir5Ebp5KaaOfffejDuu4+3LFEzyJ1AnG/R9APdDauxyRiQm4BKW2/d0NZP9t/toP5bUpxM4a1JctCJuM3AJwThdPHtGCyx26ytUofC09qc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5764.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(52116014)(7416014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9PRDBbwpwRXejGbkkg1WeoeHt2In01u31VuHHvnEUf+1fxVzVZZ6C26ijORKi8wohj7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uP/aoWeyRtMD6uq8tsCZgIC4k0LYJkZc6XbT6goU4A91sfF1D8KA8wV/jA6WOTJr/iZ84EouShlVxBnc5gkbnAAo4b+5JiQcC7G/DvSvkv81sUvu6bF+PnXYYnPZQo6B2SmvBbfMe6XNL0skGUyZ8wLg3ac/LRKEpw8v426DyEVpV2rJMalEEdqF2q9+8TBWEecmxEia0s/bVviV3kS8gcoTgsv0OqhmwlMY965J4TxMSKy5vcRHd1cUstW9lg7EVEeSTKkYC1xrt/Yvdi0/gc7VDFjjdvzlYcFnKEDhGXB6w88/X3djKQ6x25HQ2XBf9vuISB6Mq+RdWS4n9xrPT5Gv5M0gEhlccyvS86hQ4WXrPzd/CiJUKiYRt7BdFXSwmLobg/8OTk0hPJ7KotWegd0khAyg7o/5yyLiEeYmvb4ei5pXqrYeZI+s5Fj0MxLdPLCxtK3X0fExcMLvBRkk0hbrjHwQ== X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32ea469b-e380-40bd-2f89-08dd3439612a X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5764.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2025 01:18:40.6051 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dITe2xIpqnMXA1NcEUAY0lP19yxvz2DVsESNJOUTv8mQlrXsZJJGXHBpOnj2HT/cjGEH/rN3y0ayt0lJgsnU9EyRSjuYbVrUuU6IW7Z/lzk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7994 X-Authority-Analysis: v=2.4 cv=Mtmo63ae c=1 sm=1 tr=0 ts=6785bb72 cx=c_pps a=7V8mf9/socFTThwl5N0qNQ==:117 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=VdSt8ZQiCzkA:10 a=bRTqI5nwn0kA:10 a=VwQbUJbxAAAA:8 a=t7CeM3EgAAAA:8 a=7giN54SSlXpMncPZmE0A:9 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-ORIG-GUID: 80LRkXYX8ZZG6wc68yZbQA8CFbEDt89H X-Proofpoint-GUID: 80LRkXYX8ZZG6wc68yZbQA8CFbEDt89H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-13_10,2025-01-13_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 phishscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 malwarescore=0 bulkscore=0 spamscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.21.0-2411120000 definitions=main-2501140008 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250113_171852_921542_CC8F5657 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently imx8mp_blk_ctrl_remove() will continue the for loop until an out-of-bounds exception occurs. pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : dev_pm_domain_detach+0x8/0x48 lr : imx8mp_blk_ctrl_shutdown+0x58/0x90 sp : ffffffc084f8bbf0 x29: ffffffc084f8bbf0 x28: ffffff80daf32ac0 x27: 0000000000000000 x26: ffffffc081658d78 x25: 0000000000000001 x24: ffffffc08201b028 x23: ffffff80d0db9490 x22: ffffffc082340a78 x21: 00000000000005b0 x20: ffffff80d19bc180 x19: 000000000000000a x18: ffffffffffffffff x17: ffffffc080a39e08 x16: ffffffc080a39c98 x15: 4f435f464f006c72 x14: 0000000000000004 x13: ffffff80d0172110 x12: 0000000000000000 x11: ffffff80d0537740 x10: ffffff80d05376c0 x9 : ffffffc0808ed2d8 x8 : ffffffc084f8bab0 x7 : 0000000000000000 x6 : 0000000000000000 x5 : ffffff80d19b9420 x4 : fffffffe03466e60 x3 : 0000000080800077 x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: dev_pm_domain_detach+0x8/0x48 platform_shutdown+0x2c/0x48 device_shutdown+0x158/0x268 kernel_restart_prepare+0x40/0x58 kernel_kexec+0x58/0xe8 __do_sys_reboot+0x198/0x258 __arm64_sys_reboot+0x2c/0x40 invoke_syscall+0x5c/0x138 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x38/0xc8 el0t_64_sync_handler+0x120/0x130 el0t_64_sync+0x190/0x198 Code: 8128c2d0 ffffffc0 aa1e03e9 d503201f Fixes: 556f5cf9568a ("soc: imx: add i.MX8MP HSIO blk-ctrl") Signed-off-by: Xiaolei Wang Reviewed-by: Lucas Stach Reviewed-by: Fabio Estevam Reviewed-by: Frank Li --- v1: https://patchwork.kernel.org/project/imx/patch/20250113045609.842243-1-xiaolei.wang@windriver.com/ v2: Update commit subject drivers/pmdomain/imx/imx8mp-blk-ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c index e3a0f64c144c..3668fe66b22c 100644 --- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c @@ -770,7 +770,7 @@ static void imx8mp_blk_ctrl_remove(struct platform_device *pdev) of_genpd_del_provider(pdev->dev.of_node); - for (i = 0; bc->onecell_data.num_domains; i++) { + for (i = 0; i < bc->onecell_data.num_domains; i++) { struct imx8mp_blk_ctrl_domain *domain = &bc->domains[i]; pm_genpd_remove(&domain->genpd);