lkml.org 
[lkml]   [2017]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] prctl: implement PR_GET_ENDIAN for all architectures
On Sun, 5 Feb 2017, Matt Turner wrote:

> > I don't think it is other than for PPC. If you're not variable endian
> > (which is only PPC to date), then you should know a priori what endian
> > you are from the #defines in userspace.
>
> MIPS as well, but it seems strange to require the kernel to tell you
> your endianness, when you can easily determine it yourself. Unless
> there's something about this I don't understand.

Many MIPS processors do have a reverse-endian control bit, which allows a
user process to execute in the endianness opposite to the endianness the
kernel runs in. The feature has been around since 1991 and the R4000 CPU,
however support is unlikely to be ever added to the MIPS/Linux port, due
to the complexity required for byte-swapping all the data structures
passed in memory between the kernel and the userland. Does the PPC/Linux
port actually implement this swapping?

Maciej

\
 
 \ /
  Last update: 2017-02-05 14:16    [W:3.611 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site