From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29879 invoked by alias); 1 Jul 2011 17:08:04 -0000 Received: (qmail 29864 invoked by uid 22791); 1 Jul 2011 17:08:03 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Jul 2011 17:07:43 +0000 Received: by pzk36 with SMTP id 36so899484pzk.20 for ; Fri, 01 Jul 2011 10:07:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.143.18 with SMTP id q18mr1431566wfd.280.1309540062776; Fri, 01 Jul 2011 10:07:42 -0700 (PDT) Received: by 10.142.44.9 with HTTP; Fri, 1 Jul 2011 10:07:42 -0700 (PDT) In-Reply-To: <4E0DEFBB.4060109@redhat.com> References: <20110701155254.GA5242@davesworkthinkpad> <20110701155557.GC5242@davesworkthinkpad> <4E0DEFBB.4060109@redhat.com> Date: Fri, 01 Jul 2011 17:08:00 -0000 Message-ID: Subject: Re: [Patch 2/3] ARM 64 bit atomic operations From: David Gilbert To: Richard Henderson Cc: gcc-patches@gcc.gnu.org, patches@linaro.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00062.txt.bz2 On 1 July 2011 17:03, Richard Henderson wrote: > On 07/01/2011 08:55 AM, Dr. David Alan Gilbert wrote: >> +/* Check that the kernel has a new enough version at load */ >> +void __check_for_sync8_kernelhelper (void) >> +{ >> + =A0if (__kernel_helper_version < 5) >> + =A0 =A0{ >> + =A0 =A0 =A0const char err[] =3D "A newer kernel is required to run thi= s binary. (__kernel_cmpxchg64 helper)\n"; >> + =A0 =A0 =A0/* At this point we need a way to crash with some informati= on >> + =A0 =A0 =A0for the user - I'm not sure I can rely on much else being >> + =A0 =A0 =A0available at this point, so do the same as generic-morestac= k.c >> + =A0 =A0 =A0write() and abort(). */ >> + =A0 =A0 =A0write (2 /* stderr */, err, sizeof(err)); >> + =A0 =A0 =A0abort (); >> + =A0 =A0} >> +}; > > Wouldn't it be better to convert the arm kernel to use a proper VDSO, > so that this error actually comes from the dynamic linker? =A0That's > the beauty of a true VDSO -- proper symbol resolution. Well I can't say I like the need for this check/exit - so yes if something = else could do it for me that would be great. Having said that, I don't know the history of the ARM commpage/lack of VDSO , neither do I know how big a change that would be. Let me have a chat to some of the kernel guys who might know the history. Dave