Re: linux-next: build failure after merge of the rcu tree
From: Paul E. McKenney
Date: Thu May 28 2020 - 12:34:05 EST
On Thu, May 28, 2020 at 07:05:01PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the rcu tree, today's linux-next build (powercp
> allyesconfig) failed like this:
>
> ld: kernel/rcu/refperf.o:(.discard+0x0): multiple definition of `__pcpu_unique_srcu_ctl_perf_srcu_data'; kernel/rcu/rcuperf.o:(.discard+0x0): first defined here
>
> Caused by commit
>
> 786a25497743 ("refperf: Add a test to measure performance of read-side synchronization")
>
> From srcutree.h:
>
> * Note that although DEFINE_STATIC_SRCU() hides the name from other
> * files, the per-CPU variable rules nevertheless require that the
> * chosen name be globally unique.
>
> I have applied the following patch for today.
I have a patch queued, but it is currently blocked by other broken
commits which I expect to have straightened out today.
Yet again, please accept my apologies for the hassle!
Thanx, Paul
> From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Date: Thu, 28 May 2020 18:57:17 +1000
> Subject: [PATCH] refperf: uniqify name
>
> Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> ---
> kernel/rcu/refperf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/refperf.c b/kernel/rcu/refperf.c
> index 8c4a63257be9..47df72c492b3 100644
> --- a/kernel/rcu/refperf.c
> +++ b/kernel/rcu/refperf.c
> @@ -133,8 +133,8 @@ static struct ref_perf_ops rcu_ops = {
>
>
> // Definitions for SRCU ref perf testing.
> -DEFINE_STATIC_SRCU(srcu_ctl_perf);
> -static struct srcu_struct *srcu_ctlp = &srcu_ctl_perf;
> +DEFINE_STATIC_SRCU(ref_srcu_ctl_perf);
> +static struct srcu_struct *srcu_ctlp = &ref_srcu_ctl_perf;
>
> static void srcu_ref_perf_read_section(int nloops)
> {
> --
> 2.26.2
>
> --
> Cheers,
> Stephen Rothwell