linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rcu:rcu/dev 23/23] kernel//rcu/tree.c:2147:4: note: in expansion of macro 'pr_info'
@ 2017-12-04  4:10 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-12-04  4:10 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 7788 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/dev
head:   b4a12b9fc6e8c8e6b17b968b654f388a1379ce8a
commit: b4a12b9fc6e8c8e6b17b968b654f388a1379ce8a [23/23] EXP: rcu: Add yet more debugging info to assertion
config: arm-efm32_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout b4a12b9fc6e8c8e6b17b968b654f388a1379ce8a
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:14,
                    from kernel//rcu/tree.c:31:
   kernel//rcu/tree.c: In function 'rcu_gp_cleanup':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 9 has type 'unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
>> kernel//rcu/tree.c:2147:4: note: in expansion of macro 'pr_info'
       pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %lu\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, offsetof(typeof(*rnp), blkd_tasks));
       ^~~~~~~
   kernel//rcu/tree.c:2147:95: note: format string is defined here
       pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %lu\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, offsetof(typeof(*rnp), blkd_tasks));
                                                                                                ~~^
                                                                                                %u
--
   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:14,
                    from kernel/rcu/tree.c:31:
   kernel/rcu/tree.c: In function 'rcu_gp_cleanup':
>> include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 9 has type 'unsigned int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:308:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
   kernel/rcu/tree.c:2147:4: note: in expansion of macro 'pr_info'
       pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %lu\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, offsetof(typeof(*rnp), blkd_tasks));
       ^~~~~~~
   kernel/rcu/tree.c:2147:95: note: format string is defined here
       pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %lu\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, offsetof(typeof(*rnp), blkd_tasks));
                                                                                                ~~^
                                                                                                %u

vim +/pr_info +2147 kernel//rcu/tree.c

  2102	
  2103	/*
  2104	 * Clean up after the old grace period.
  2105	 */
  2106	static void rcu_gp_cleanup(struct rcu_state *rsp)
  2107	{
  2108		unsigned long gp_duration;
  2109		bool needgp = false;
  2110		int nocb = 0;
  2111		struct rcu_data *rdp;
  2112		struct rcu_node *rnp = rcu_get_root(rsp);
  2113		struct swait_queue_head *sq;
  2114	
  2115		WRITE_ONCE(rsp->gp_activity, jiffies);
  2116		raw_spin_lock_irq_rcu_node(rnp);
  2117		gp_duration = jiffies - rsp->gp_start;
  2118		if (gp_duration > rsp->gp_max)
  2119			rsp->gp_max = gp_duration;
  2120	
  2121		/*
  2122		 * We know the grace period is complete, but to everyone else
  2123		 * it appears to still be ongoing.  But it is also the case
  2124		 * that to everyone else it looks like there is nothing that
  2125		 * they can do to advance the grace period.  It is therefore
  2126		 * safe for us to drop the lock in order to mark the grace
  2127		 * period as completed in all of the rcu_node structures.
  2128		 */
  2129		raw_spin_unlock_irq_rcu_node(rnp);
  2130	
  2131		/*
  2132		 * Propagate new ->completed value to rcu_node structures so
  2133		 * that other CPUs don't have to wait until the start of the next
  2134		 * grace period to process their callbacks.  This also avoids
  2135		 * some nasty RCU grace-period initialization races by forcing
  2136		 * the end of the current grace period to be completely recorded in
  2137		 * all of the rcu_node structures before the beginning of the next
  2138		 * grace period is recorded in any of the rcu_node structures.
  2139		 */
  2140		rcu_for_each_node_breadth_first(rsp, rnp) {
  2141			raw_spin_lock_irq_rcu_node(rnp);
  2142	#ifdef CONFIG_PREEMPT_RCU
  2143			if (WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp))) {
  2144				int i;
  2145				struct task_struct *t;
  2146	
> 2147				pr_info("%s: grp: %d-%d level: %d ->gp_tasks %p ->exp_tasks %p &->blkd_tasks: %p offset: %lu\n", __func__, rnp->grplo, rnp->grphi, rnp->level, rnp->gp_tasks, rnp->exp_tasks, &rnp->blkd_tasks, offsetof(typeof(*rnp), blkd_tasks));
  2148				pr_cont("\t->blkd_tasks");
  2149				i = 0;
  2150				list_for_each_entry(t, &rnp->blkd_tasks, rcu_node_entry) {
  2151					pr_cont(" %p", t);
  2152					if (++i >= 10)
  2153						break;
  2154				}
  2155				pr_cont("\n");
  2156			}
  2157	#endif /* #ifdef CONFIG_PREEMPT_RCU */
  2158			WARN_ON_ONCE(rnp->qsmask);
  2159			WRITE_ONCE(rnp->completed, rsp->gpnum);
  2160			rdp = this_cpu_ptr(rsp->rda);
  2161			if (rnp == rdp->mynode)
  2162				needgp = __note_gp_changes(rsp, rnp, rdp) || needgp;
  2163			/* smp_mb() provided by prior unlock-lock pair. */
  2164			nocb += rcu_future_gp_cleanup(rsp, rnp);
  2165			sq = rcu_nocb_gp_get(rnp);
  2166			raw_spin_unlock_irq_rcu_node(rnp);
  2167			rcu_nocb_gp_cleanup(sq);
  2168			cond_resched_rcu_qs();
  2169			WRITE_ONCE(rsp->gp_activity, jiffies);
  2170			rcu_gp_slow(rsp, gp_cleanup_delay);
  2171		}
  2172		rnp = rcu_get_root(rsp);
  2173		raw_spin_lock_irq_rcu_node(rnp); /* Order GP before ->completed update. */
  2174		rcu_nocb_gp_set(rnp, nocb);
  2175	
  2176		/* Declare grace period done. */
  2177		WRITE_ONCE(rsp->completed, rsp->gpnum);
  2178		trace_rcu_grace_period(rsp->name, rsp->completed, TPS("end"));
  2179		rsp->gp_state = RCU_GP_IDLE;
  2180		rdp = this_cpu_ptr(rsp->rda);
  2181		/* Advance CBs to reduce false positives below. */
  2182		needgp = rcu_advance_cbs(rsp, rnp, rdp) || needgp;
  2183		if (needgp || cpu_needs_another_gp(rsp, rdp)) {
  2184			WRITE_ONCE(rsp->gp_flags, RCU_GP_FLAG_INIT);
  2185			trace_rcu_grace_period(rsp->name,
  2186					       READ_ONCE(rsp->gpnum),
  2187					       TPS("newreq"));
  2188		}
  2189		raw_spin_unlock_irq_rcu_node(rnp);
  2190	}
  2191	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 11557 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-04  4:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04  4:10 [rcu:rcu/dev 23/23] kernel//rcu/tree.c:2147:4: note: in expansion of macro 'pr_info' kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).