David S. Miller [Mon, 8 Jul 2013 05:15:36 +0000 (22:15 -0700)]
Full from-scratch rebuild of sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
Chris Metcalf [Wed, 3 Jul 2013 18:48:39 +0000 (14:48 -0400)]
tile: use _dl_static_init to set GLRO(gl_pagesize)
A recently-added test (dlfcn/tststatic5) pointed out that tile was not
properly initializing the variable pagesize in certain cases. This
change just copies the existing code from MIPS.
Chris Metcalf [Wed, 3 Jul 2013 17:58:34 +0000 (13:58 -0400)]
tile: update libm-test-ulps from scratch
Chris Metcalf [Wed, 3 Jul 2013 15:23:01 +0000 (11:23 -0400)]
tile: use soft-fp for fma() and fmaf()
The sfp-machine.h is based on the gcc version, but extended with
required new macros by comparison with other architectures and by
investigating the hardware support for FP on tile.
Jeroen Albers [Fri, 5 Jul 2013 12:58:20 +0000 (12:58 +0000)]
Update x86 and x86_64 ulps on AMD FX-8350 with GCC 4.8.1.
Marcus Shawcroft [Fri, 5 Jul 2013 08:30:52 +0000 (09:30 +0100)]
[AArch64] Regenerate libm-test-ulps
Siddhesh Poyarekar [Thu, 4 Jul 2013 15:03:03 +0000 (20:33 +0530)]
Fix lock elision help text in INSTALL and configure
Adhemerval Zanella [Thu, 4 Jul 2013 12:14:44 +0000 (07:14 -0500)]
Update powerpc-fpu ULPs.
Andreas Jaeger [Thu, 4 Jul 2013 07:45:12 +0000 (09:45 +0200)]
Sync sys/ptrace with Linux 3.10
Joseph Myers [Wed, 3 Jul 2013 21:59:58 +0000 (21:59 +0000)]
Condition sysdeps/arm/include/bits/setjmp.h contents on _ISOMAC.
Joseph Myers [Wed, 3 Jul 2013 16:32:52 +0000 (16:32 +0000)]
Regenerate powerpc-nofpu ULPs.
H.J. Lu [Wed, 3 Jul 2013 16:22:31 +0000 (09:22 -0700)]
Add x86 init-arch to nptl
Allan McRae [Wed, 3 Jul 2013 02:44:59 +0000 (12:44 +1000)]
Update i386 ULPs.
* sysdeps/i386/fpu/libm-test-ulps: Update.
David S. Miller [Tue, 2 Jul 2013 23:41:17 +0000 (16:41 -0700)]
Update sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Update.
Andreas Schwab [Tue, 2 Jul 2013 22:50:13 +0000 (00:50 +0200)]
m68k: update libm test ULPs
Markus Trippelsdorf [Tue, 2 Jul 2013 22:01:13 +0000 (22:01 +0000)]
Update x86_64 ULPs.
Joseph Myers [Tue, 2 Jul 2013 21:53:23 +0000 (21:53 +0000)]
Regenerate MIPS ulps.
Joseph Myers [Tue, 2 Jul 2013 20:34:19 +0000 (20:34 +0000)]
Regenerate ARM ulps.
Joseph Myers [Tue, 2 Jul 2013 20:00:48 +0000 (20:00 +0000)]
Regenerate x86 and x86_64 ulps.
Joseph Myers [Tue, 2 Jul 2013 19:51:19 +0000 (19:51 +0000)]
Make soft-float ARM use soft-fp fma/fmaf.
Richard Henderson [Tue, 2 Jul 2013 16:59:50 +0000 (09:59 -0700)]
alpha: Update libm-test-ulps from scratch
Andi Kleen [Tue, 2 Jul 2013 15:49:30 +0000 (08:49 -0700)]
Add lock elision to NEWS file
Andi Kleen [Fri, 17 May 2013 02:17:14 +0000 (19:17 -0700)]
Add a configure option to enable lock elision and disable by default
Can be enabled with --enable-lock-elision=yes at configure time.
Andi Kleen [Thu, 27 Jun 2013 18:15:06 +0000 (11:15 -0700)]
Disable elision for any pthread_mutexattr_settype call
PTHREAD_MUTEX_NORMAL requires deadlock for nesting, DEFAULT
does not. Since glibc uses the same value (0) disable elision
for any call to pthread_mutexattr_settype() with a 0 value.
This implies that a program can disable elision by doing
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL)
Based on a original proposal by Rich Felker.
Andi Kleen [Sat, 22 Dec 2012 09:03:04 +0000 (01:03 -0800)]
Add elision to pthread_mutex_{try,timed,un}lock
Add elision paths to the basic mutex locks.
The normal path has a check for RTM and upgrades the lock
to RTM when available. Trylocks cannot automatically upgrade,
so they check for elision every time.
We use a 4 byte value in the mutex to store the lock
elision adaptation state. This is separate from the adaptive
spin state and uses a separate field.
Condition variables currently do not support elision.
Recursive mutexes and condition variables may be supported at some point,
but are not in the current implementation. Also "trylock" will
not automatically enable elision unless some other lock call
has been already called on the lock.
This version does not use IFUNC, so it means every lock has one
additional check for elision. Benchmarking showed the overhead
to be negligible.
Andi Kleen [Fri, 28 Jun 2013 12:19:37 +0000 (05:19 -0700)]
Add minimal test suite changes for elision enabled kernels
tst-mutex5 and 8 test some behaviour not required by POSIX,
that elision changes. This changes these tests to not check
this when elision is enabled at configure time.
Andi Kleen [Sat, 22 Dec 2012 08:58:34 +0000 (00:58 -0800)]
Add new internal mutex type flags for elision.
Add Enable/disable flags used internally
Extend the mutex initializers to have the fields needed for
elision. The layout stays the same, and this is not visible
to programs.
These changes are not exposed outside pthread
Andi Kleen [Sat, 10 Nov 2012 08:51:26 +0000 (00:51 -0800)]
Add the low level infrastructure for pthreads lock elision with TSX
Lock elision using TSX is a technique to optimize lock scaling
It allows to run locks in parallel using hardware support for
a transactional execution mode in 4th generation Intel Core CPUs.
See http://www.intel.com/software/tsx for more Information.
This patch implements a simple adaptive lock elision algorithm based
on RTM. It enables elision for the pthread mutexes and rwlocks.
The algorithm keeps track whether a mutex successfully elides or not,
and stops eliding for some time when it is not.
When the CPU supports RTM the elision path is automatically tried,
otherwise any elision is disabled.
The adaptation algorithm and its tuning is currently preliminary.
The code adds some checks to the lock fast paths. Micro-benchmarks
show little to no difference without RTM.
This patch implements the low level "lll_" code for lock elision.
Followon patches hook this into the pthread implementation
Changes with the RTM mutexes:
-----------------------------
Lock elision in pthreads is generally compatible with existing programs.
There are some obscure exceptions, which are expected to be uncommon.
See the manual for more details.
- A broken program that unlocks a free lock will crash.
There are ways around this with some tradeoffs (more code in hot paths)
I'm still undecided on what approach to take here; have to wait for testing reports.
- pthread_mutex_destroy of a lock mutex will not return EBUSY but 0.
- There's also a similar situation with trylock outside the mutex,
"knowing" that the mutex must be held due to some other condition.
In this case an assert failure cannot be recovered. This situation is
usually an existing bug in the program.
- Same applies to the rwlocks. Some of the return values changes
(for example there is no EDEADLK for an elided lock, unless it aborts.
However when elided it will also never deadlock of course)
- Timing changes, so broken programs that make assumptions about specific timing
may expose already existing latent problems. Note that these broken programs will
break in other situations too (loaded system, new faster hardware, compiler
optimizations etc.)
- Programs with non recursive mutexes that take them recursively in a thread and
which would always deadlock without elision may not always see a deadlock.
The deadlock will only happen on an early or delayed abort (which typically
happens at some point)
This only happens for mutexes not explicitely set to PTHREAD_MUTEX_NORMAL
or PTHREAD_MUTEX_ADAPTIVE_NP. PTHREAD_MUTEX_NORMAL mutexes do not elide.
The elision default can be set at configure time.
This patch implements the basic infrastructure for elision.
H.J. Lu [Tue, 2 Jul 2013 15:03:29 +0000 (08:03 -0700)]
Enable static 32-bit SSE4.2 strcasecmp/strncasecmp
Joseph Myers [Tue, 2 Jul 2013 14:55:32 +0000 (14:55 +0000)]
Implement fma in soft-fp.
Will Newton [Tue, 2 Jul 2013 13:01:21 +0000 (13:01 +0000)]
ARM: Pass dl_hwcap to IFUNC resolver functions.
Joseph Myers [Sun, 30 Jun 2013 21:36:59 +0000 (21:36 +0000)]
Support no-FPU ColdFire in sysdeps/m68k/dl-trampoline.S and refactor code.
Chris Metcalf [Sun, 30 Jun 2013 15:48:31 +0000 (11:48 -0400)]
tile: switch to using <fenv.h> fallback functions
Now that the fallback functions match the desired semantics for tile
functions, just switch to using them.
Joseph Myers [Fri, 28 Jun 2013 22:53:57 +0000 (22:53 +0000)]
Add more NEWS items for 2.18.
Liubov Dmitrieva [Fri, 28 Jun 2013 22:28:50 +0000 (15:28 -0700)]
Skip SSE4.2 versions on Intel Silvermont
SSE2/SSSE3 versions are faster than SSE4.2 versions on Intel Silvermont.
Ryan S. Arnold [Fri, 28 Jun 2013 21:52:49 +0000 (16:52 -0500)]
PowerPC: Define AT_HWCAP2 bits and AT_HWCAP2 handling for POWER8.
Ryan S. Arnold [Fri, 28 Jun 2013 21:50:48 +0000 (16:50 -0500)]
Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.
Joseph Myers [Fri, 28 Jun 2013 21:45:11 +0000 (21:45 +0000)]
Consistently use page_shift in sysdeps/unix/sysv/linux/mmap64.c.
Pierre Ynard [Fri, 28 Jun 2013 21:43:42 +0000 (21:43 +0000)]
Test for mprotect failure in dl-load.c (bug 12492).
Nathan Froyd [Fri, 28 Jun 2013 21:42:19 +0000 (21:42 +0000)]
Mark packed structure element used with atomic operation aligned.
Joseph Myers [Fri, 28 Jun 2013 20:30:43 +0000 (20:30 +0000)]
Fix sysdeps/m68k/fpu_control.h preprocessor indentation.
Nathan Sidwell [Fri, 28 Jun 2013 20:28:25 +0000 (20:28 +0000)]
Support no-FPU ColdFire in sysdeps/m68k/fpu_control.h.
Maciej W. Rozycki [Fri, 28 Jun 2013 16:43:07 +0000 (17:43 +0100)]
Add a dlopen/getpagesize static executable test.
Maciej W. Rozycki [Fri, 28 Jun 2013 15:20:26 +0000 (16:20 +0100)]
[BZ #15022] Correct global-scope dlopen issues in static executables.
This change creates a link map in static executables to serve as the
global search list for dlopen. It fixes a problem with the inability
to access the global symbol object and a crash on an attempt to map a
DSO into the global scope. Some code that has become dead after the
addition of this link map is removed too and test cases are provided.
Marcus Shawcroft [Fri, 28 Jun 2013 10:27:26 +0000 (11:27 +0100)]
[AArch64] Adjust elf_machine_dynamic to find _DYNAMIC via _GLOBAL_OFFSET_TABLE_
Marcus Shawcroft [Fri, 28 Jun 2013 10:23:58 +0000 (11:23 +0100)]
[AArch64] Simplify getcontext pstate initialization.
Maciej W. Rozycki [Thu, 27 Jun 2013 10:15:51 +0000 (11:15 +0100)]
_dl_static_init: Remove nested locking.
This function is now called from dl_open_worker with the GL(dl_load_lock)
lock held and no longer needs local protection. GL(dl_load_lock) also
correctly protects _dl_lookup_symbol_x called here that relies on the
caller to have serialized access to the data structures it uses.
Joseph Myers [Wed, 26 Jun 2013 23:10:48 +0000 (23:10 +0000)]
Require GCC 4.4 or later to build glibc.
H.J. Lu [Wed, 26 Jun 2013 22:23:08 +0000 (15:23 -0700)]
Add a test for BZ #15674
H.J. Lu [Wed, 26 Jun 2013 19:29:47 +0000 (12:29 -0700)]
Mention BZ #15674
Liubov Dmitrieva [Wed, 26 Jun 2013 19:28:43 +0000 (12:28 -0700)]
Fix buffers overrun in x86_64 memcmp-ssse3.S
Maciej W. Rozycki [Wed, 26 Jun 2013 18:14:29 +0000 (19:14 +0100)]
[BZ #15022] Avoid repeated calls to DL_STATIC_INIT for the same module.
Ryan S. Arnold [Wed, 26 Jun 2013 13:50:20 +0000 (08:50 -0500)]
Add AT_HWCAP2 as a new auxv_t a_type to elf.h.
Mike Frysinger [Tue, 25 Jun 2013 19:20:13 +0000 (15:20 -0400)]
drop NEWS mention
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Richard Henderson [Tue, 25 Jun 2013 16:27:01 +0000 (09:27 -0700)]
Fix missing libc-internal.h include.
* locale/programs/locarchive.c: Include <libc-internal.h>
Joseph Myers [Tue, 25 Jun 2013 17:21:48 +0000 (17:21 +0000)]
Update texinfo.tex.
Andreas Schwab [Tue, 25 Jun 2013 16:57:42 +0000 (18:57 +0200)]
m68k: fix bad use of register alias in cfi insn
Richard Henderson [Mon, 24 Jun 2013 16:59:26 +0000 (09:59 -0700)]
[BZ #15666] alpha: Add __sqrt*_finite definitions
With compatibility for ev6 and non-ev6 builds, as the non-ev6 did
manage to get definitions emitted for the float and double functions.
Mike Frysinger [Thu, 23 May 2013 16:42:28 +0000 (12:42 -0400)]
[BZ #10283] localedef: align fixed maps to SHMLBA
Many Linux arches require fixed mmaps to be aligned higher than pagesize,
so use the SHMLBA define as it represents this quantity exactly.
This fixes spurious errors seen on those arches like:
cannot map archive header: Invalid argument
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283
Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 28 May 2013 22:25:54 +0000 (18:25 -0400)]
libc-internal.h: add ALIGN helper macros
Rather than open coding the masks, add helper macros to do the magic.
This makes code easier to read.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Vladimir Nikulichev [Mon, 24 Jun 2013 21:08:07 +0000 (17:08 -0400)]
BZ #12310: pthread_exit in static app. segfaults
Static applications that call pthread_exit on the main
thread segfault. This is because after a thread terminates
__libc_start_main decrements __nptl_nthreads which is only
defined in pthread_create. Therefore the right solution is
to add a requirement to pthread_create from pthread_exit.
~~~
nptl/
2013-06-24 Vladimir Nikulichev <v.nikulichev@gmail.com>
[BZ #12310]
* pthread_exit.c: Add reference to pthread_create.
Ryan S. Arnold [Mon, 24 Jun 2013 20:33:32 +0000 (15:33 -0500)]
PowerPC: Enable POWER8 platform sans hwcap bits.
Siddhesh Poyarekar [Mon, 24 Jun 2013 16:16:41 +0000 (21:46 +0530)]
Regenerate INSTALL file
Siddhesh Poyarekar [Mon, 24 Jun 2013 12:37:37 +0000 (18:07 +0530)]
Fix typo in comment
Richard Henderson [Sun, 23 Jun 2013 18:05:40 +0000 (11:05 -0700)]
alpha: Update libm-test-ulps
Joseph Myers [Sat, 22 Jun 2013 19:32:50 +0000 (19:32 +0000)]
Include <string.h> in nptl/pthread_setattr_default_np.c.
Joseph Myers [Sat, 22 Jun 2013 19:30:10 +0000 (19:30 +0000)]
Include <string.h> in sysdeps/unix/sysv/linux/libc_fatal.c.
Joseph Myers [Sat, 22 Jun 2013 19:27:41 +0000 (19:27 +0000)]
Fix soft-fp shadowing between __FP_FRAC_ADD_3 and _FP_MUL_MEAT_2_wide_3mul (bug 15667).
Maciej W. Rozycki [Fri, 21 Jun 2013 23:39:42 +0000 (00:39 +0100)]
Remove dead DL_DST_REQ_STATIC code.
Kaz Kojima [Fri, 21 Jun 2013 22:46:45 +0000 (07:46 +0900)]
Add sh4 implementation of fegetexceptflag (bug 15655).
Joseph Myers [Fri, 21 Jun 2013 19:00:43 +0000 (19:00 +0000)]
Fix bad shift in soft-fp (bug 7006).
Maciej W. Rozycki [Fri, 21 Jun 2013 17:13:39 +0000 (18:13 +0100)]
dlfcn/Makefile: Avoid repeated $(*-ENV) definitions.
Kaz Kojima [Fri, 21 Jun 2013 09:07:31 +0000 (18:07 +0900)]
Add sh4 implementation of fegetexceptflag.
Adhemerval Zanella [Fri, 21 Jun 2013 00:40:55 +0000 (19:40 -0500)]
Fix loop construction to functions calls
Check wheter the compiler has the option -fno-tree-loop-distribute-patterns
to inhibit loop transformation to library calls and uses it on memset
and memmove default implementation to avoid recursive calls.
Joseph Myers [Thu, 20 Jun 2013 19:11:34 +0000 (19:11 +0000)]
Allow fesetround failures in math/test-misc.c if ROUNDING_TESTS fails.
Joseph Myers [Thu, 20 Jun 2013 19:10:44 +0000 (19:10 +0000)]
Avoid spurious failures from <fenv.h> fallback functions (bug 15654).
Roland McGrath [Tue, 18 Jun 2013 23:29:25 +0000 (16:29 -0700)]
Use rtld-CPPFLAGS in rtld-%.os rules for generated sources.
Roland McGrath [Tue, 18 Jun 2013 22:58:48 +0000 (15:58 -0700)]
sysdeps/arm/arm-mcount.S: Comment typo fix.
Roland McGrath [Tue, 18 Jun 2013 22:42:56 +0000 (15:42 -0700)]
ARM: Make armv7 memcpy implementations SFI-friendly
Roland McGrath [Tue, 18 Jun 2013 17:11:02 +0000 (10:11 -0700)]
ARM: Clean up __libc_ifunc_impl_list
Joseph Myers [Tue, 18 Jun 2013 00:35:03 +0000 (00:35 +0000)]
Fix warnings from ARM soft-float fpu_control.h.
Joseph Myers [Tue, 18 Jun 2013 00:30:44 +0000 (00:30 +0000)]
Wrap test-fpucw.c for ARM.
Adhemerval Zanella [Mon, 17 Jun 2013 20:50:53 +0000 (15:50 -0500)]
PowerPC: Reserve TCB space for EBB framework
This patch reserves four pointer to be used in future Event-Based
Branch framework for PowerPC.
Joseph Myers [Mon, 17 Jun 2013 17:20:23 +0000 (17:20 +0000)]
Make ARM feenableexcept detect failure (bug 14907).
Roland McGrath [Mon, 17 Jun 2013 16:54:51 +0000 (09:54 -0700)]
Sort sysd-rules-patterns by descending pattern length.
Roland McGrath [Mon, 17 Jun 2013 16:55:21 +0000 (09:55 -0700)]
Rewrite sysd-rules generation using an awk script.
Joseph Myers [Mon, 17 Jun 2013 11:48:11 +0000 (11:48 +0000)]
Use math-tests.h more in math/test-misc.
Joseph Myers [Sat, 15 Jun 2013 19:59:41 +0000 (19:59 +0000)]
Fix spurious "inexact" exceptions from dbl-64 sqrt (bug 15631).
Joseph Myers [Sat, 15 Jun 2013 19:58:38 +0000 (19:58 +0000)]
Add another fma test.
Siddhesh Poyarekar [Sat, 15 Jun 2013 06:57:40 +0000 (12:27 +0530)]
Add documentation for default pthread attribute functions
Siddhesh Poyarekar [Sat, 15 Jun 2013 06:54:15 +0000 (12:24 +0530)]
New API to set default thread attributes
This patch introduces two new convenience functions to set the default
thread attributes used for creating threads. This allows a programmer
to set the default thread attributes just once in a process and then
run pthread_create without additional attributes.
Joseph Myers [Fri, 14 Jun 2013 21:42:24 +0000 (21:42 +0000)]
Stop MIPS setjmp / longjmp saving / restoring floating-point flags (bug 14909).
Joseph Myers [Fri, 14 Jun 2013 21:19:35 +0000 (21:19 +0000)]
Update ARM _FPU_RESERVED value.
Joseph Myers [Fri, 14 Jun 2013 20:21:40 +0000 (20:21 +0000)]
Add math-tests.h for MIPS.
Liubov Dmitrieva [Fri, 14 Jun 2013 18:46:15 +0000 (20:46 +0200)]
Set fast unaligned load flag for new Intel microarchitecture
I have small patch for new Intel Silvermont machines.
http://newsroom.intel.com/community/intel_newsroom/blog/2013/05/06/intel-launches-low-power-high-performance-silvermont-microarchitecture
I checked this on my machine and see that strcpy, ... unaligned
versions are faster than ssse3 versions.
Siddhesh Poyarekar [Fri, 14 Jun 2013 18:39:26 +0000 (00:09 +0530)]
Add rtld-memset.S for x86_64
Resolves: BZ #15627
Add an assembler version of rtld-memset to avoid using SSE registers.
Joseph Myers [Fri, 14 Jun 2013 17:58:41 +0000 (17:58 +0000)]
Make tst-strtod-round use ROUNDING_TESTS.
Kirk Meyer [Fri, 14 Jun 2013 00:11:02 +0000 (10:11 +1000)]
MicroBlaze: negated errors in lowlevellock.h
The macros in lowlevellock.h are returning positive errors, but the
users of the macros expect negative. This causes e.g. sem_wait to
sometimes return an error with errno set to -EWOULDBLOCK.
Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Roland McGrath [Thu, 13 Jun 2013 22:09:29 +0000 (15:09 -0700)]
Fix raciness in waitid test.
Siddhesh Poyarekar [Thu, 13 Jun 2013 19:50:06 +0000 (01:20 +0530)]
Avoid access beyond memory bounds in pthread_attr_getaffinity_np
Resolves BZ #15618.
pthread_attr_getaffinity_np may write beyond bounds of the input
cpuset buffer if the size of the input buffer is smaller than the
buffer present in the input pthread attributes. Fix is to copy to the
extent of the minimum of the source and the destination.