Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754029AbbGFINo (ORCPT ); Mon, 6 Jul 2015 04:13:44 -0400 Received: from ozlabs.org ([103.22.144.67]:46628 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbbGFINl (ORCPT ); Mon, 6 Jul 2015 04:13:41 -0400 Date: Mon, 6 Jul 2015 18:13:32 +1000 From: Stephen Rothwell To: Ingo Molnar Cc: Riku Voipio , Rusty Russell , Peter Zijlstra , mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, "Paul E. McKenney" Subject: Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space Message-ID: <20150706181332.0f7f61f7@canb.auug.org.au> In-Reply-To: <20150617091703.GA2883@gmail.com> References: <20150617060952.GA5375@kos.to> <20150617091703.GA2883@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; i586-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/avooUg6VEBlj7n3p=qGdHqs"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3840 Lines: 110 --Sig_/avooUg6VEBlj7n3p=qGdHqs Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ingo, On Wed, 17 Jun 2015 11:17:04 +0200 Ingo Molnar wrote: > > * Riku Voipio wrote: >=20 > > The commit: > >=20 > > commit d72da4a4d973d8a0a0d3c97e7cdebf287fbe3a99 > > Author: Peter Zijlstra > > Date: Wed May 27 11:09:36 2015 +0930 > >=20 > > rbtree: Make lockless searches non-fatal > >=20 > > Adds to rbtree.h, which in turn is included from per= f userspace > > headers. Now building tools/perf will fail with hundreds of lines of gc= c complaining > > about kernel defines not available. Reverting the patch makes perf buil= d again.=20 > > This is with gcc-4.9 from debian but I don't think it's compiler specif= ic. >=20 > Does the patch below make things work? >=20 > This fix could go into the modules tree, as this commit came via Rusty. >=20 > Stephen, feel free to add: >=20 > make -C tools/perf > > to the linux-next build tests. It's always supposed to build without fail= ure, in=20 > pretty much whatever x86 distro you run your build tests on. OK, I have started doing that, but int order to make it build at all, I have added the patch below to my fixes tree (since the breakage is now in Linus' tree). This means that it will get a conflict with the tip tree tomorrow, but I will just fix the conflict by using the version from the tip tree. Once the tip tree fixes are sent to Linus, I will drop this patch from my fixes tree. > From 62c251255f07ede8efa356d4ea9ab51827ffa0d0 Mon Sep 17 00:00:00 2001 > From: Ingo Molnar > Date: Wed, 17 Jun 2015 11:07:11 +0200 > Subject: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h us= able in user-space >=20 > Reported-by: Riku Voipio > Signed-off-by: Ingo Molnar > --- > tools/perf/util/include/linux/rcupdate.h | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/tools/perf/util/include/linux/rcupdate.h b/tools/perf/util/i= nclude/linux/rcupdate.h > new file mode 100644 > index 000000000000..3e022dd9a69b > --- /dev/null > +++ b/tools/perf/util/include/linux/rcupdate.h > @@ -0,0 +1,9 @@ > +#ifndef PERF_LINUX_RCUPDATE_H_ > +#define PERF_LINUX_RCUPDATE_H_ > + > +/* Simple trivial wrappers for now, we don't use RCU in perf user-space = (yet): */ > +#define WRITE_ONCE(var, val) ((var) =3D (val)) > +#define rcu_assign_pointer(ptr, val) WRITE_ONCE(ptr, val) > + > +#endif > + --=20 Cheers, Stephen Rothwell sfr@canb.auug.org.au --Sig_/avooUg6VEBlj7n3p=qGdHqs Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVmjixAAoJEMDTa8Ir7ZwVM2sP/0ykJ+E7Cl+6DU8KVgaFKPj4 aCauZ44/cXxfLvh08/g5dwnUyoZFMORjWNbB/t6pFPpvM+BGTUwZN1LQimUEJQYr V3SsDB5g6JpvSGx5h14ZNfZPdvmr6ar9m97FKWbBuUlpqdddb6Y6W8WDqG7iQq7N Bo1V0tSW2a4tj/gtoHrVDesjTsPsNJAuqsZnMsvfn//Ra0xFaNSBjUHpE653Safs BSSNiuWlHH3FMdbF7RdnniO/JouGtdHyQz8E3woDWiH0PBFlLpTSlEHPkBeoX6ip /2Hg81vdoLBf+cCL8GphMoZ4Bz1609ZEueLczA+Dg0JXPAwoQSnB5HffdVFH+Sdn DuvGJ5S7jdUp9lxGdfW7orDcE1a/i3uCA5KP0U8wuv1z+dOZ7Q5/G73qRCFIG1s+ SPwDYXr+mgtzxQZ4Bi5wa56qLSbZKGaWb66XGVNQGQFCQgSixPVLnhj6Cp58EPdl m/o23+vuEnfoasc0YybJCvm8TRoAw4sEYnT8YxyF5V+zuaV0SxU0AEiWESomd3OJ om9VqHtBzLeqAwaqSVAsR7XYvIC4cvP3o0gLfthd+ogZ596QyJIftud9zztZHMe8 eXsVsM8n9L54hMbqKgeNgL2VfmLn+sux+AA4uPunWTc442hdcafC29ZUO+kTAj31 OHlFz4ptLscCJZnO97L+ =10Fy -----END PGP SIGNATURE----- --Sig_/avooUg6VEBlj7n3p=qGdHqs-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/