Age | Commit message (Collapse) | Author |
|
Rename _timer[12] to si_tid and si_overrun to fix compilation of
strace-4.9+
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This patch fixes the rest of the set-but-not-used warnings in the MIPS
code by using attribute_unused and also fixes some conversion warnings
by changing __arch_compare_and_exchange_xxx_[8|16]_int. Assigning __cmp
(int type) to __prev (pointer type) generates a warning. Assigning zero
to each separately avoids this warning without having to add a cast.
Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Uclibc is not building for MIPS N64 because pread is trying to use the
pread/pwrite system calls instead of pread64/pwrite64. This patch fixes
the problem and was tested with LFS enabled and disabled.
Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The INLINE_SYSCALL, INTERNAL_SYSCALL*, and internal_syscall* macros
are defined for MIPS in both libc/sysdeps/linux/mips/sysdep.h and
libc/sysdeps/linux/mips/bits/syscalls.h. The macros are the same
in both cases except that syscalls.h defines internal_syscalls[567]
the same for N32 and N64 ABIs and has a different definition for O32.
I believe that is correct. The sysdep.h header uses the O32 versions
for N32 and has different definitions for N64. I think that is wrong
and that N32 and N64 should share the same definition (modulo the
type 'long' vs. 'long long' for the arguments. This setup (from
sysdep.h) now agrees with what glibc has.
I am not positive about which header (sysdep.h vs syscalls.h) is
really the right one to have these definitions in but using sysdep.h
seems to work for all my builds.
Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
When booting a Linux system with qemu-system-mips64 the execution
of $(pwd) in the ash shell triggers a segmentation fault. Ash uses
setjmp/longjmp for exception handling.
After looking at the glibc implementation,
I found some differences, with this patch tries to resolve.
Now the system boots up fine and no segmentation faults occur.
The global pointer should be restored and the types for the
register values should be wide enough.
See:
http://www.cygwin.com/ml/libc-alpha/2003-03/msg00363.html
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This patch uses 'attribute_unused' to clean up a number of warnings
messages that are generated when doing a MIPS build. All of the
changes are in MIPS specific files and there are no code changes
other then adding the unused attribute where needed.
Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The MIPS build is failing when UCLIBC_HAS_LFS is set to "n"
because posix_fadvise64.c is included in the build when it
should not be.
Signed-off-by: Steve Ellcey <sellcey@mips.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
fork() is broken for MIPS64 N64 ABI. You can check it with a simple
C program statically linked with qemu-mips64 user emulation.
Internally fork() is using the clone system call (at least with NPTL)
with 5 arguments. See ./libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c.
The calling conventions for MIPS N32 and N64 allow to use up to 8 registers
for that. See http://en.wikipedia.org/wiki/Calling_convention#MIPS
This is correctly implemented in libc/sysdeps/linux/mips/bits/syscalls.h,
but not in libc/sysdeps/linux/mips/sysdep.h. fork.c uses the later one.
It seems that fork() works fine for MIPS64 N32 with just using the stack like
with the O32 case. There is a user of INLINE_SYSCALL with 7 arguments in
libc/sysdeps/linux/common/sync_file_range.c for MIPS64 N32, so I decided to
only use the macros for the MIPS64 N64 case. With this patch my uClibc based
Linux system boots up fine in qemu-system-mips64.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Make __SIGEV_PAD_SIZE to take __WORDSIZE into account for alpha, mips
and ia64 arches.
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Add "__pid_t _tid" member which is used for some packages, like rt-test
for instance, which fails with an error like this one:
src/cyclictest/cyclictest.c:638:9: error: 'union <anonymous>' has no
member named '_tid'
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
* Add a common ret_ERRVAL definition
* Remove ret_ERRVAL from architectures using the common 'ret'
* Add 'undef' to architectures that need a different return instruction
* Add '#include <common/sysdep.h>' to cris and ia64 that were missing it
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Prompted by lkml discussion of a MIPS bug where sending
signal 128 was found to be able to crash the machine :/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
As in timerfd.h, eventfd.h needs arch-specific definition files.
alpha, mips and sparc needs separate file, all the other arch
will use common definition.
This problem is already fixed in glibc.
Also sanitize and provide bits for hppa.
Make sure not to install the new bits/eventfd unless eventfd support is
enabled.
Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The syscall on 64bit ports takes 4 args as there is no need to split
up the value into two args. Add support for that to the common code.
Once we fix that, the mips code can now leverage it for its 64bit and
32bit needs. However, we can't just drop it entirely yet because its
n32 ABI needs special handling to treat it like a 64bit port. This
does change the existing behavior which treats the n32 like a 32bit
port, but we want to do this.
In the future, we'll probably have to introduce a define for this as
it currently affects x86_64/x32 and mips/n32.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The readahead syscall has the 64bit register align issue for all
arches. Only mips was handling this though.
Clean up the common readahead.c to use the SYSCALL_ALIGN_64BIT
define so that we can throw away the mips version and make this
work correctly on arm/ppc/xtensa.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The 64bit register alignment issue only affects the O32 ABI, so wrap
the define accordingly. We don't want this being used for N32 ABIs.
This doesn't directly affect the N64 ABI since these files wouldn't
even be compiled for those targets (no need for the 32bit/64bit shim).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The reason truncate64 takes 4 args on some arches is that their ABI
requires 64bit values to be aligned on register pair boundaries.
Since this alignment affects more than just truncate64, rename the
define to properly document its purpose. This also allows us to
expand it to the other impacted syscalls (which will be done in a
follow up commit).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The name was changed to include a trailing 'D' when it went into the
kernel.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Add the obsolescent SUSv3 family of user context manipulating functions
for arm, i386, mips, x86_64.
Signed-off-by: Timon ter Braak <timonterbraak@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This drops __signed, __volatile, and __const. Only the latter was
used in the code base, and for uClibc, not consistently. Much of
the code used plain "const" which meant "__const" was useless.
Really, the point of this is to stay in sync with what glibc did.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
This matches a similar change made to glibc.
No functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
exported header files were updated to use these new types. Add the
definitions for __kernel_long_t and __kernel_ulong_t to the relevant
kernel_types.h headers.
This change was automated with the following scriptlet
git grep --name-only 'typedef.*__kernel_old_dev_t' \
| xargs sed -i '/typedef.*__kernel_old_dev_t/ a\
typedef long\t\t__kernel_long_t;\
typedef unsigned long\t__kernel_ulong_t;'
Whitespace in arm, avr32, hppa, sparc was then manually fixed up.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
--
Here's a cleaned up patch which should get the whitespace right. I'm a
bit iffy about the sparc changes they make sense to me but it's not a
platform I have access to.
I can break this up per arch or per maintainer if requested.
libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++
22 files changed, 50 insertions(+)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Remove the related headers.
Adapt sh's type to the one used everywhere and add prototype for it.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
c6x does not need own version at all
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
__vfork is hidden.
__GI_vfork is strong (not weak as it was).
vfork is weak.
e1 can use the generic version.
Note: libc_hidden_def(x) has different meaning in .c and .S files.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
_lfs_64.h makes the compile fail, if LFS is not enabled, no need for the guard.
Reorganize to include only the minimal necessary headers.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Remove all versions, that can be covered by the common one.
Drop incorrectly implemented fallback support, if __NR_fadvise64_64 is not available.
To support 64 bit ppc, move ppc support into common.
Cleanup including headers.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
While there, remove unneeded headers.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The header had to be removed under the guard, else asm/cachectl.h might
not be available at all.
While there, disable __cachectl prototype.
Use untyped strong_alias for cacheflush because char * != void *.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Remove all others, only avr32 needs to be kept.
Define __UCLIBC_ARCH_HAS_6_ARGS__ where needed.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Make sure we use the new jmpbuf-*.h headers
While there, adapt the offset on microblaze and the _JMPBUF_UNWINDS macro on bfin,
it seems, these were changed in the meantime.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
solve inconsistency between archs
NPTL should not use __syscall_rt_sigaction at all, for now it needs to be visible
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately,
__syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI
standard. This means that if lazy binding was used for __syscall_error(),
the errno value in $v0 could get corrupted.
The problem can be easily seen in testcases where syscalls in librt fail;
when librt tries to call __syscall_error() in libc, the argument gets
lost and errno gets set to a bogus value:
# ./tst-mqueue1 ; echo $?
mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208
1
# ./tst-mqueue2 ; echo $?
mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560
1
# ./tst-mqueue4 ; echo $?
mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440
1
When _dl_runtime_resolve() was taken out of the equation, the same test
cases passed:
# LD_BIND_NOW=y ./tst-mqueue1 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue2 ; echo $?
0
# LD_BIND_NOW=y ./tst-mqueue4 ; echo $?
0
Changing __syscall_error() to look at $a0 instead of $v0 fixed the
problem.
(Note that there is also a "__syscall_error.c" file which presumably
uses the standard C calling conventions, but I do not think it is used
on MIPS.)
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Some callers passed the first argument in $v0, while others used $a0.
Change the callers to use $a0 consistently.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Since glibc has split out arch-specific stuff to bits/epoll.h, we can
pull that sanity back into our tree and drop the arch ifdefs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
glibc has split off the arch-specific flag definitions (like
SFD_NONBLOCK) into <arch>/bits/signalfd.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
glibc has split off the arch-specific flag definitions (like
TFD_NONBLOCK) into <arch>/bits/timerfd.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
glibc has split off the arch-specific flag definitions (like
IN_NONBLOCK) into <arch>/bits/inotify.h, so that there are no longer
multiple redundant copies of the entire header file. We will adopt the
same scheme in uClibc.
Special cases are included for: alpha mips sparc
hppa was omitted because it has not been updated in glibc.
All others use the common definition.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|