Message ID | 20230913074032.27927-1-raag.jadav@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1048964vqx; Wed, 13 Sep 2023 05:30:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVmzkNWv5O/2Ao/ybfnPENkZeyzxOw7fn6uHsPPQ6evARnN0+2caHYxHhibbAGj4Okmypw X-Received: by 2002:a17:903:4d7:b0:1c3:9aa7:66d2 with SMTP id jm23-20020a17090304d700b001c39aa766d2mr2339843plb.55.1694608209290; Wed, 13 Sep 2023 05:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694608209; cv=none; d=google.com; s=arc-20160816; b=0pmGLcqzRYPWboAXEe72Jb26BfEhY9ZpnrN64+nfr18Wto1uIXqp8Px33JiPL9yVop RfXppsa4WwQtDmg6/KRMl9ezDMZLOCcWb0mOw27O26hBzJdEtTX+vBarOnO0nDnK9aB1 TWeWizBr/QATWd//QIpcy2Nd7pFzdL9mOQRUcXMNI99bmyepWrmKXpuHEHht4AUeElDW 3aVKW8xlSi4ZsBeZBQ28jgc8NeS3uAK3YMLZfL1+UCl3dC1EaC4p7VesldkMngy79cqy Zq8WVdOmQLMOsgM7YgbypzaORnGn8X8iiO8euFDTPGHOerfDUiY2XSPgfAHY/y3CU4KN 1EUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=BqU2rA4BNd7cF6LIviG2JWo/Ja5Aj7gE6ucD810LsL0=; fh=5Kz5SMTbxRzacFposuKshVXqDrm6Bf8nQGi1HiJfgj8=; b=MXwgoO1Ga+ZH/ABiJNdc/v1NFFwpVGfK/z/aXN/VjycKt5z0p58kdaOeIYsWXyeiql JMWMK6fUtxQZ6XshEiEzXQb1Jt7L4m2o0YSxMvNtRYMXi9AbhFRWzhZuS7uNsKIf4gLt xe73iLrXajuRL9YnaU6vvGBGW3flJ7+EF7PIqPxKT4kM/vQ9s/gVLGecYcVO208XWRbL ZKueZx54dB52TQ4sCEcXAWZ/WiBJrxTW1h2z1jHwuJvKTl6pySTndISeN5f8r//cbRjg 9n8zZGIZqR3ByHzVh2yWPQz8Mf8mwL3aAebDDEZA4q+sopxwctNLcMZ1mCGlSmd4gGqV SdDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UidyyCCu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id c15-20020a170902d48f00b001a6ef92d441si9861092plg.599.2023.09.13.05.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 05:30:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UidyyCCu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 744C4815CDBC; Wed, 13 Sep 2023 00:42:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238614AbjIMHlu (ORCPT <rfc822;pwkd43@gmail.com> + 35 others); Wed, 13 Sep 2023 03:41:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233816AbjIMHls (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 03:41:48 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ADA41729; Wed, 13 Sep 2023 00:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694590904; x=1726126904; h=from:to:cc:subject:date:message-id; bh=xkd+enwWC/o97hoGExYV8Dw54JNG5oupVOp/1MwZry4=; b=UidyyCCuerW2cFP/yc2pMzfmyG/h99R8sOZGn88oae+/gVdcfjvlsM3H IwPLNirW+xGG0k8HDirfKlSr0BkGWLCPsEjPJCdzorvcETuZsZmwpPjRy T8cSVs4yCyWmfoinGPrxovZ4703ZYaMUJqzeE761XIaV+T1UrDzYSy2VA ETyWzIsMvvFwTlGaHOMqY+SjzhYSevcTEx+wZR6xXlbz76P+S/kjV4DZ5 0/51ep265eeTUcL3CCMysoJUhnPlvdu+94g816ONZZ/9Eeao8G2taLtXn OoknQ+zZORjAAoMddymwHCtnyut5y0GDOpn5pddP/G6bIez7F7Hu8/Ds2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="368859091" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="368859091" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Sep 2023 00:41:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10831"; a="747208878" X-IronPort-AV: E=Sophos;i="6.02,142,1688454000"; d="scan'208";a="747208878" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmsmga007.fm.intel.com with ESMTP; 13 Sep 2023 00:41:40 -0700 From: Raag Jadav <raag.jadav@intel.com> To: rafael.j.wysocki@intel.com, len.brown@intel.com, pavel@ucw.cz, Jonathan.Cameron@huawei.com, paul@crapouillou.net, andriy.shevchenko@linux.intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav <raag.jadav@intel.com> Subject: [RFC v1 0/2] Fix symbol export for _SIMPLE_ variants of _PM_OPS() Date: Wed, 13 Sep 2023 13:10:30 +0530 Message-Id: <20230913074032.27927-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 00:42:05 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776925497775243076 X-GMAIL-MSGID: 1776925497775243076 |
Series |
Fix symbol export for _SIMPLE_ variants of _PM_OPS()
|
|
Message
Raag Jadav
Sept. 13, 2023, 7:40 a.m. UTC
Currently EXPORT_*_SIMPLE_DEV_PM_OPS() use EXPORT_*_DEV_PM_OPS() set of macros to export dev_pm_ops symbol, which export the symbol in case CONFIG_PM=y but don't take CONFIG_PM_SLEEP into consideration. Since _SIMPLE_ variants of _PM_OPS() do not include runtime PM handles and are only used in case CONFIG_PM_SLEEP=y, we should not be exporting dev_pm_ops symbol for them in case CONFIG_PM_SLEEP=n. This can be fixed by having two distinct set of export macros for both _RUNTIME_ and _SIMPLE_ variants of _PM_OPS(), such that the export of dev_pm_ops symbol used in each variant depends on CONFIG_PM and CONFIG_PM_SLEEP respectively. PS: This needs a few (~6) drivers to be updated with new set of macros, which will be done in following versions if this is worth moving forward. Raag Jadav (2): PM: Introduce export macros for _SIMPLE_ variants of _PM_OPS() PM: Update EXPORT_*_DEV_PM_OPS() to EXPORT_*_RUNTIME_PM_OPS() include/linux/pm.h | 38 ++++++++++++++++++++++++-------------- include/linux/pm_runtime.h | 13 +++++++++---- 2 files changed, 33 insertions(+), 18 deletions(-)
Comments
On Wed, Sep 13, 2023 at 01:10:30PM +0530, Raag Jadav wrote: > Currently EXPORT_*_SIMPLE_DEV_PM_OPS() use EXPORT_*_DEV_PM_OPS() set of > macros to export dev_pm_ops symbol, which export the symbol in case > CONFIG_PM=y but don't take CONFIG_PM_SLEEP into consideration. > > Since _SIMPLE_ variants of _PM_OPS() do not include runtime PM handles > and are only used in case CONFIG_PM_SLEEP=y, we should not be exporting > dev_pm_ops symbol for them in case CONFIG_PM_SLEEP=n. > > This can be fixed by having two distinct set of export macros for both > _RUNTIME_ and _SIMPLE_ variants of _PM_OPS(), such that the export of > dev_pm_ops symbol used in each variant depends on CONFIG_PM and > CONFIG_PM_SLEEP respectively. From my point of view this cleans up a bit the initial idea and maybe a good stuff to apply. But I leave this to the maintainers and Paul to decide.