CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] TO: Nicolas Pitre <[email protected]> CC: "Rafael J. Wysocki" <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge head: a44d3fbdfbd1dde8c1726ba55638767fa359103d commit: 4ad38741cc1e6f282d7668f1ae08792266f2b80f [28/57] PM: clk: make PM clock layer compatible with clocks that must sleep :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: i386-randconfig-s002-20210124 (attached as .config) compiler: gcc-9 (Debian 9.3.0-20) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-208-g46a52ca4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=4ad38741cc1e6f282d7668f1ae08792266f2b80f git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git git fetch --no-tags pm bleeding-edge git checkout 4ad38741cc1e6f282d7668f1ae08792266f2b80f # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> "sparse warnings: (new ones prefixed by >>)" drivers/base/power/clock_ops.c:52:13: sparse: sparse: context imbalance in 'pm_clk_list_lock' - wrong count at exit >> drivers/base/power/clock_ops.c:64:13: sparse: sparse: context imbalance in >> 'pm_clk_list_unlock' - wrong count at exit drivers/base/power/clock_ops.c:86:12: sparse: sparse: context imbalance in 'pm_clk_op_lock' - different lock contexts for basic block drivers/base/power/clock_ops.c:131:39: sparse: sparse: context imbalance in 'pm_clk_op_unlock' - unexpected unlock vim +/pm_clk_list_unlock +64 drivers/base/power/clock_ops.c 85eb8c8d0b0900c Rafael J. Wysocki 2011-04-30 38 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 39 /** 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 40 * pm_clk_list_lock - ensure exclusive access for modifying the PM clock 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 41 * entry list. 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 42 * @psd: pm_subsys_data instance corresponding to the PM clock entry list 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 43 * and clk_op_might_sleep count to be modified. 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 44 * 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 45 * Get exclusive access before modifying the PM clock entry list and the 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 46 * clock_op_might_sleep count to guard against concurrent modifications. 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 47 * This also protects against a concurrent clock_op_might_sleep and PM clock 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 48 * entry list usage in pm_clk_suspend()/pm_clk_resume() that may or may not 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 49 * happen in atomic context, hence both the mutex and the spinlock must be 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 50 * taken here. 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 51 */ 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 @52 static void pm_clk_list_lock(struct pm_subsys_data *psd) 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 53 __acquires(&psd->clock_mutex) __acquires(&psd->lock) 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 54 { 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 55 mutex_lock(&psd->clock_mutex); 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 56 spin_lock_irq(&psd->lock); 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 57 } 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 58 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 59 /** 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 60 * pm_clk_list_unlock - counterpart to pm_clk_list_lock(). 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 61 * @psd: the same pm_subsys_data instance previously passed to 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 62 * pm_clk_list_lock(). 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 63 */ 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 @64 static void pm_clk_list_unlock(struct pm_subsys_data *psd) 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 65 __releases(&psd->lock) __releases(&psd->clock_mutex) 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 66 { 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 67 spin_unlock_irq(&psd->lock); 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 68 mutex_unlock(&psd->clock_mutex); 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 69 } 4ad38741cc1e6f2 Nicolas Pitre 2021-01-21 70 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
