From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6349 invoked by alias); 20 Mar 2007 14:59:51 -0000 Received: (qmail 6332 invoked by uid 22791); 20 Mar 2007 14:59:50 -0000 X-Spam-Check-By: sourceware.org Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Mar 2007 14:59:41 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id l2KExb7g013670 for ; Tue, 20 Mar 2007 10:59:37 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l2KExab1044958 for ; Tue, 20 Mar 2007 08:59:36 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l2KExaRA016127 for ; Tue, 20 Mar 2007 08:59:36 -0600 Received: from [9.10.86.122] (spokane1.rchland.ibm.com [9.10.86.122]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l2KExZaM016041; Tue, 20 Mar 2007 08:59:35 -0600 Message-ID: <45FFFA7D.6000508@us.ibm.com> Date: Tue, 20 Mar 2007 14:59:00 -0000 From: Steven Munroe User-Agent: Mozilla/5.0 (X11; U; Linux ppc64; en-US; rv:1.8.0.9) Gecko/20060906 SUSE/1.8_seamonkey_1.0.7-1.1 SeaMonkey/1.0.7 MIME-Version: 1.0 To: Jakub Jelinek CC: Ulrich Drepper , Roland McGrath , Richard Henderson , libc-hacker@sourceware.org Subject: Re: [PATCH] Fix up ppc __cache_line_size References: <20070313201706.8D8351801C5@magilla.sf.frob.com> <45F71009.8020705@us.ibm.com> <20070320123958.GW1826@sunsite.mff.cuni.cz> In-Reply-To: <20070320123958.GW1826@sunsite.mff.cuni.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00031.txt.bz2 Jakub Jelinek wrote: > On Tue, Mar 13, 2007 at 03:56:41PM -0500, Steven Munroe wrote: > >> Roland McGrath wrote: >> >>>> +#ifdef DL_PLATFORM_AUXV >>>> + DL_PLATFORM_AUXV >>>> +#endif >>>> >>>> >>> This looks ok to me, but make it # ifdef there inside another #ifdef. >>> >>> This will also affect powerpc, which AFAICT was also failing to set its >>> __cache_line_size in static programs. It looks to me like that will be fine. >>> >>> >>> >> hmmm looks like powerpc needs a >> sysdeps/unix/sysv/linux/powerpc/dl-support.c to define DL_PLATFORM_AUXV >> and include /elf/dl-support.c ? >> > > IMHO there is no reason to use weak_extern for __cache_line_size. > Code to check the weak references and only conditionally set it is > certainly bigger than just defining the hidden variables in libc-start.c > and dl-sysdep.c. > Additionally, if you build power4+ optimized ld.so, __cache_line_size > isn't defined at all and thus dl-machine.c will never use it. > > The following patch works for me (though only tested with > binutils and gcc that support HAVE_ASM_PPC_REL16 (so __cache_line_size > references don't need runtime relocation). Not sure if we still support > older binutils. > Looks good, I'll verify this against the powerpc-cpu add-on as soon as I finish testing and submitt the MUTEX_HINTS patch I am working on ... Thanks