From patchwork Tue Jul 6 10:05:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 470431 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4809347jao; Tue, 6 Jul 2021 02:31:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziLqa1ZtlRdHpbWA4l6sGwnAzKT3Ksc3L2kharPsQSkHBLDXMiWtq0VKxxsdwY+j5BdC3v X-Received: by 2002:a17:907:9720:: with SMTP id jg32mr17465486ejc.108.1625563896949; Tue, 06 Jul 2021 02:31:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1625563896; cv=pass; d=google.com; s=arc-20160816; b=qLv3ERyFY9b69x2wqWaYSnnaTxwmyA+2GcXm8ki/8J+jXfVi81EMyy4/wv/FPFYZKW Vz2AB8b0eaoa7l3cOV+e7zEmilm3XqYL3YIiA7YDQPp1f8fgib1h4HJ+PY8MONNXhnwv yiIfJ6L0DgMyfGyt9POYoRObpmIhK9SLvtRSwmOm47HSkaIYQ4oyyc7ilKH2EsMd2urS nP5xFMcINp1FiEottsiH+xGY9QwoMAomOU7l/NRl1MGGGAd6rxPIJ9K3SsCSud1UNqaN Tsu0XXaWZWEhbA6GBMmiESWc5lHuUZqTWNEHxzMhWbSgZpRj6irlJ1YTsvM3zi6P9+s1 F4lw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=9TH4dSuE/RICWuqVedJF6PJG/9soufp/J9D/JBeclCA=; b=nC084rhMXJXk7g+8YcTnPwG5j1eHyKNx/xQKKb9mx0ZNbwX53kAoeUghoWujLz63xV 4sjAt7O86VQYoSHnbz3qo3LBAIVxuL2D6MATnUyeS1j1bXM+3DU5RREH97jfX3pJQL/f Tmc9gzBIosm6dKHXDOzfAQ8E9IRVHKLOTpPhnItWd5Vpd7R0aMWvELWPUS1PeSSz5ng8 DP/iLDDa47Y3l6p8DHdOM0ua67WmUDtW3IMbzw7zg+bqOd0Z0BM3FVlq82vLQQZpqg+z joU1BpNnN8hbNtxhPaz5ZOrlDXd1TKD4/Gxh2oW+eC4goJGRQNGCt2bcp2Ffs1q8dGro itGg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=eLWzJFVf; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 23si15408166ejg.480.2021.07.06.02.31.36; Tue, 06 Jul 2021 02:31:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=eLWzJFVf; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231150AbhGFJeN (ORCPT + 8 others); Tue, 6 Jul 2021 05:34:13 -0400 Received: from mail-eopbgr70051.outbound.protection.outlook.com ([40.107.7.51]:15073 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230472AbhGFJeN (ORCPT ); Tue, 6 Jul 2021 05:34:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ls1+VgcfpPut81U9piU8qjbwniLJ5G3x7Fcz+9R8Od3jHDDvYDVFFIjOLzfWDhnoymge0iAH5cK0c7CBxp4Pcsi2H2+MLZmtTbBR+DCwRGFoPVGBcrhAsgAqmO2edHldMQWe3650DhUvilXuFGZ1unE/Gw7xXz4cLITnteaJTdTZ/wbSl4PDOUm5v/QNcY6ojcBfPyPoJAanhDUFROWpTpEA9gAOP6M78R9AtINd6krXNSMuCXCQVESbnfKY/T0fNA1kyZLVXc2I/cWQfp2D9OfflrlW7IMw2bQbM7mTX6i3KBWDgX1iKnjNakGF5YEfPePWy6M4wkcJIxFTtuM6bQ== 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-SenderADCheck; bh=9TH4dSuE/RICWuqVedJF6PJG/9soufp/J9D/JBeclCA=; b=RpFTFnPZHnAOl/P7GnvWmNM5eKV4AExbT0Xo3TwZN3LC88R0CWnoMA5KoboNLcT73WtGHx25Y4fC35mFhoe5QpRPS1pCMFnG/MhfzCxp/N7IvFg2P8We5/7TxO9oJ9MXZNeJFzVuvFxBAfR95hGCsARpNXNFQcwnLcqZ+0ILcoPsdmcCvpH+mQYKNfhdRPVI7CDrz21cQqtGNmbvI6yWMg1Fnd5yWWLXR8RzQ2s90gmbSgsPFZ8TNvDfgAsMus2wem/RLdwXPdPG7+Pp9XKPOC+eVvXaClBkrbhfZh+c/m8j2L0BFgGjQ2wL+rsaXiEpsS/+avcGg8bVP+/MaJHU8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9TH4dSuE/RICWuqVedJF6PJG/9soufp/J9D/JBeclCA=; b=eLWzJFVfx9CquFkIiX1+u1Go5JdAgf/Ltw1jg9Ze7gGWxhWdCY/pEjkCVq/e3XJdm1jSPf8qIc6fClyIgucIRWozBJ8wueunW8M19qYeh+nNxlb1OOEk+U4yya1FV4mV/adU/q74rL+icgW1rPV2jjiftKfzyhN7cBFTexQ4MNE= Authentication-Results: rjwysocki.net; dkim=none (message not signed) header.d=none; rjwysocki.net; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB8PR04MB5660.eurprd04.prod.outlook.com (2603:10a6:10:a5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Tue, 6 Jul 2021 09:31:30 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4287.033; Tue, 6 Jul 2021 09:31:30 +0000 From: peng.fan@oss.nxp.com To: rjw@rjwysocki.net, khilman@kernel.org, ulf.hansson@linaro.org, pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH] PM: domains: not update genpd status when power on fail Date: Tue, 6 Jul 2021 18:05:19 +0800 Message-Id: <20210706100519.13851-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGXP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Tue, 6 Jul 2021 09:31:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe833d82-699c-4ff4-b0cc-08d94060d61b X-MS-TrafficTypeDiagnostic: DB8PR04MB5660: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hQnl1EQ7RBu/o2P83fmKzbe14Y4WV32IInAMiyYEUJ1FSC7aidFMcD70OrvTA8oYMxBN81NS1VxhvCrQUGuGOxkwZNqIyD3uxQAfMYYTp5OHyTsqQjDGTIA12s1GIyjkmzqGxM3M8a7z5o7SgyWUU/b30PRGFGWEYfO3C23msOswKlf9K9kpnCVoONXyZyfOsZ6J9aI9jjbOaDizE64rWk9UOnzgwRhvvmcUR2cIUQ9S5ilvFI9YVclWN+wpBvx7osv0YJXIO0PsggoLNCkgdD8mhPOWqdicHtnLQrYQJJBLWnSf2LDuLwYQDK+IzfhCkwvWElOJuUwRlSV8ly3tZGPsqh30rFhqY3xCLu/RvBLIg2TAojBNVWPuhL7Ds3qXtoPSViu9iRD8ZfiO8bYjbkCsCMz7h6v0WqP0cKU6s7ryM/WE4KhMbM+tTIP/CJT2diX8g0Niom+5vj0RPZChxN33WVv9x5YQplokjAxiiVIPtOlwMwNoM8K8aki+s5PvbcRLY1Tb7JYkE4mMij7UK6gIk6wgVPklgF5q9eGgy21pVJ+ji0Lycdi/Pxgi6oTNvlpKXjM7WmLL583RskUwUNWlcSa1hlNhTVdmSsN0JZJ/Da0IUvZL0Cqu3YT2PfttqB4zu30tJDQPg6ScCUKl1TtMbjgmoGImq71u5zX0YUQF9uniwFp0AeO4j92tA4oSXHCRdaVvbZOznmV/6GbsZg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(376002)(136003)(39860400002)(366004)(1076003)(4744005)(52116002)(956004)(26005)(316002)(5660300002)(8936002)(6506007)(6486002)(86362001)(83380400001)(8676002)(2616005)(66946007)(66556008)(6666004)(478600001)(38350700002)(66476007)(2906002)(186003)(6512007)(38100700002)(16526019)(9686003)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VUW2msvlTzJ/8QUwrsjWXQo6N3ENT4H+QfV60IKPHvvC5W7KVuY1wvxBqcFHYTG4lwWofEMKKr0hzQaC1q6F09E5aPNjCnO8QhaDM5FN4E0b5CxVAR25iEaXYDDMd0RN5HTakIS7CAwjWyEG+6a4XCGYTcGPUMU2WMQ0I17kuneZiCLnXjAFxQ2oFk3VJJrpFsQiXHfDm5qkHHSQLQZmo+QaFletaaCLf5kWPb/UrsMUTHd0ZN50Ltnp9g2oTHpUPulYkQ+j2AkJJCVFIyjLCJnXTr2GmiQY7wRuRa7Cmdi8VvnrLQMRuaCz4srdgot96BZIC1aQ61SLhlhkCSPXqwRZKEttIRnhU6smYLT9J9ca1VgkFqKDRw3QJNvpuHU5SnOIkA1hCko8CVOgcYre8ldCZWoFxq18ju63qkQvbfcVZrPYAGc5RePIwhLpmfDxKLtB6+77TsBIGEASAJklQZ7NdcqOn8oF2KiKtEA9300/dZ+XV9F4jNMxgk6IJCaFSoQCp2AylbbsiyeWI7x/Ax4mjw1CCGfweGCaka3Kj4nFsvbsXVGL8KTCfZ7RyGVjdmswNbR6yIJDMg6lyA/zgel0Rl9bYp5yPiNG6Ql99Xs2qyvCzdhKf4qPHiM1UnhyZafLzJifauhPfurC/SYhaV7NC66vX5EHGrxuu9LxKSG4w6PX/hlaH5UTrjYjVGDsqHgI837KdT/bdesqHNvsPvK9z5MomQDw4hXBh+zDoZSM4Tv+Nwxnqt/tA5aqddwRsDTyYzXeCGvXHf1MD/whNGRWAJE01FTy9A2We4jOaupSTRC4rU/jXFD3SrSUpwGEmLGQsd0Y7wF5vBSvDDz3k7fT7UVnYQbIGUEUvEKO9BKQKqyaflrrfXUYZto0P0oTCxGeWXu+9eRPtizCHA4YndfE8IpRx+/PlJ2Ocfj5mkbByJl9WSGnyj+9pORGvzr6rUPK46nzzM6Ik2SVkrFNaJb6WHQ/BXyKQkBfA3y8bbxF1VR/q/Wjr409W6NiePX7m1RR6eGT430y8Sr0FD5owHlmtRZn2kmsADkGdr3UUcvOAFK7TJQrB6/NN2ouJQUXBiaC68cTYBF+jYzCfOC2IL8tAaAhAusU5MiyJpq+56LhJgXWeOL9BM6iHyMpiVz5nEqw0Air2LwcMGbzyWZx87mPkhsdbfmpGdaWjCfMxBlbZ/BdDIzUnEsMhezlAXEyJptLVwcWo2hsKW7WKOWRNPHhxcsJbObS2DC5OE2GxrXeO1/Rmrj3Ifetr5mge2L95AzfynCeopzSxP3Q9aYBfeWyS+dAvcgAk9UQNB4bo9/m6f7BagZIgQXEtoJPbt8P X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe833d82-699c-4ff4-b0cc-08d94060d61b X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2021 09:31:30.6501 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: S9GLEKGKrIR3ZHXikVnUTK4qjNJkrd6O2fmKBjkg3SZJtfLwfrKSIFupRI0hK3Fg90/vZuy7pyahwnJDsAoDWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5660 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Peng Fan When _genpd_power_on fail, the generic power domain status should not be changed to GENPD_STATE_ON. Signed-off-by: Peng Fan --- drivers/base/power/domain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.30.0 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ab0b740cc0f1..754a5d384479 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1101,6 +1101,7 @@ static void genpd_sync_power_on(struct generic_pm_domain *genpd, bool use_lock, unsigned int depth) { struct gpd_link *link; + int ret; if (genpd_status_on(genpd)) return; @@ -1117,8 +1118,9 @@ static void genpd_sync_power_on(struct generic_pm_domain *genpd, bool use_lock, genpd_unlock(link->parent); } - _genpd_power_on(genpd, false); - genpd->status = GENPD_STATE_ON; + ret = _genpd_power_on(genpd, false); + if (!ret) + genpd->status = GENPD_STATE_ON; } /**