From: Jonas Bonn <jonas@southpole.se>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Weinberger <richard@nod.at>,
linux@openrisc.net,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: OpenRISC: Module loader broken
Date: Fri, 02 Mar 2012 08:07:51 +0100 [thread overview]
Message-ID: <1330672071.19557.105.camel@satguru> (raw)
In-Reply-To: <CAMuHMdVEQ-=vCawQPUbG_D6jA7fLxV4zYddYjc-5htW1baE2zg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
On Fri, 2012-03-02 at 07:49 +0100, Geert Uytterhoeven wrote:
> On Fri, Mar 2, 2012 at 07:11, Jonas Bonn <jonas@southpole.se> wrote:
> So OpenRISC is big endian, which matches
> arch/openrisc/include/asm/byteorder.h:#include <linux/byteorder/big_endian.h>
>
> However, there are some remainings of little endian support:
> arch/openrisc/include/asm/unaligned.h:#if defined(__LITTLE_ENDIAN)
> arch/openrisc/include/asm/unaligned.h:#elif defined(__BIG_ENDIAN)
> arch/openrisc/include/asm/unaligned.h:# error need to define endianess
Technically OpenRISC can be either big or little endian, but there is no
publically available little-endian implementation... yet. There's a
proprietary little-endian implementation, but they're not running Linux.
Anyway, that's the reason for starting to cater for both endianesses.
>
> > Since 'location' points at the 32-bit instruction in question, that cast
> > is supposed to be saying: 'move 16 bit value into low 16 bits of
> > instruction'.
>
> It may be more readable and safer (w.r.t. changing endianness) to do
> 32-bit loads and stores and explicitly modify the 16 LSB.
Agreed. It's probably a bit too clever that way it's written now.
/Jonas
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2012-03-02 7:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 1:03 Richard Weinberger
2012-03-02 6:11 ` Jonas Bonn
2012-03-02 6:49 ` Geert Uytterhoeven
2012-03-02 7:07 ` Jonas Bonn [this message]
2012-03-02 8:51 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330672071.19557.105.camel@satguru \
--to=jonas@southpole.se \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@openrisc.net \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®