about summary refs log tree commit diff
path: root/arch/or1k/bits/syscall.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-07-19 23:37:21 -0400
committerRich Felker <dalias@aerifal.cx>2014-07-19 23:37:21 -0400
commitf61be1f875a2758509d6e9e2cf6f1d9603b28b65 (patch)
tree9a79fbe9842035762a5437ca3eeb4c41a293bdfa /arch/or1k/bits/syscall.h
parentddddec106fd17c3aca3287005d21e92f742aa9d4 (diff)
downloadmusl-f61be1f875a2758509d6e9e2cf6f1d9603b28b65.tar.gz
musl-f61be1f875a2758509d6e9e2cf6f1d9603b28b65.tar.xz
musl-f61be1f875a2758509d6e9e2cf6f1d9603b28b65.zip
fix mips struct stat dev_t members for big endian
the mips version of this structure on the kernel side wrongly has
32-bit type rather than 64-bit type. fortunately there is adjacent
padding to bring it up to 64 bits, and on little-endian, this allows
us to treat the adjacent kernel st_dev and st_pad0[0] as as single
64-bit dev_t. however, on big endian, such treatment results in the
upper and lower 32-bit parts of the dev_t value being swapped. for the
purpose of just comparing st_dev values this did not break anything,
but it precluded actually processing the device numbers as major/minor
values.

since the broken kernel behavior that needs to be worked around is
isolated to one arch, I put the workarounds in syscall_arch.h rather
than adding a stat fixup path in the common code. on little endian
mips, the added code optimizes out completely.

the changes necessary were incompatible with the way the __asm_syscall
macro was factored so I just removed it and flattened the individual
__syscallN functions. this arguably makes the code easier to read and
understand, anyway.
Diffstat (limited to 'arch/or1k/bits/syscall.h')
0 files changed, 0 insertions, 0 deletions