linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/14] ARM: fixup_pv_table bug when CPU_ENDIAN_BE8
Date: Thu, 25 Jul 2013 11:40:44 +0100	[thread overview]
Message-ID: <20130725104044.GD5609@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20130725102541.GC24642@n2100.arm.linux.org.uk>

On Thu, Jul 25, 2013 at 11:25:41AM +0100, Russell King - ARM Linux wrote:
> On Thu, Jul 25, 2013 at 11:14:42AM +0100, Will Deacon wrote:
> > What's wrong with the following?
> 
> Is this like a challenge to find the silly mistake?

Unfortunately, yes. I'm half asleep this morning...

> > @@ -581,8 +581,13 @@ __fixup_a_pv_table:
> >         b       2f
> >  1:     add     r7, r3
> >         ldrh    ip, [r7, #2]
> > +#ifdef CONFIG_CPU_ENDIAN_BE8
> > +       and     ip, 0x008f
> > +       orr     ip, ip, r6, lsl #24

That was supposed to be lsl #8 (I blindly copied from Ben's correct ARM
hunk), but I think that it's still broken with that change.

> > +#else
> >         and     ip, 0x8f00
> >         orr     ip, r6  @ mask in offset bits 31-24
> > +#endif
> >         strh    ip, [r7, #2]
> 
> Well, ip is being loaded/stored as 16bit, but you're putting r6 in to
> ip's bits 31-24, which are going to be ignored by the following strh.
> 
> The comment "@ mask in offset bits 31-24" refers to the physical address
> bits here, which are already pre-shifted to bits 7-0 in r6.

Yup. It's bits 15-8 that make life slightly fiddly.

Will

  parent reply	other threads:[~2013-07-25 10:40 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 10:27 [repost] ARM big-endian support Ben Dooks
2013-07-24 10:27 ` [PATCH 01/14] ARM: fix ARCH_IXP4xx usage of ARCH_SUPPORTS_BIG_ENDIAN Ben Dooks
2013-07-24 10:27 ` [PATCH 02/14] ARM: asm: Add ARM_BE8() assembly helper Ben Dooks
2013-07-24 14:28   ` Will Deacon
2013-07-24 14:38     ` Ben Dooks
2013-07-24 14:48     ` Ben Dooks
2013-07-24 10:27 ` [PATCH 03/14] ARM: fixup_pv_table bug when CPU_ENDIAN_BE8 Ben Dooks
2013-07-24 14:33   ` Will Deacon
2013-07-24 15:24     ` Ben Dooks
2013-07-25 10:14       ` Will Deacon
2013-07-25 10:21         ` Ben Dooks
2013-07-25 10:30           ` Will Deacon
2013-07-25 10:25         ` Russell King - ARM Linux
2013-07-25 10:34           ` Ben Dooks
2013-07-25 10:40           ` Will Deacon [this message]
2013-07-24 10:27 ` [PATCH 04/14] ARM: set BE8 if LE in head code Ben Dooks
2013-07-24 14:41   ` Will Deacon
2013-07-24 15:55     ` Ben Dooks
2013-07-24 10:27 ` [PATCH 05/14] ARM: pl01x debug code endian fix Ben Dooks
2013-07-24 14:44   ` Will Deacon
2013-07-24 10:27 ` [PATCH 06/14] ARM: twd: data " Ben Dooks
2013-07-24 14:49   ` Will Deacon
2013-07-24 15:00     ` Ben Dooks
2013-07-24 15:06     ` Ben Dooks
2013-07-24 16:29       ` Will Deacon
2013-07-24 10:27 ` [PATCH 07/14] ARM: smp_scu: data endian fixes Ben Dooks
2013-07-24 15:05   ` Will Deacon
2013-07-24 10:27 ` [PATCH 08/14] highbank: enable big-endian Ben Dooks
2013-07-24 10:27 ` [PATCH 09/14] mvebu: support running big-endian Ben Dooks
2013-07-24 10:27 ` [PATCH 10/14] vexpress: add big endian support Ben Dooks
2013-07-24 10:27 ` [PATCH 11/14] ARM: alignment: correctly decode instructions in BE8 mode Ben Dooks
2013-07-24 15:28   ` Will Deacon
2013-07-25  9:44   ` Will Deacon
2013-07-24 10:28 ` [PATCH 12/14] ARM: traps: use <asm/opcodes.h> to get correct instruction order Ben Dooks
2013-07-24 16:20   ` Will Deacon
2013-07-24 10:28 ` [PATCH 13/14] ARM: module: correctly relocate instructions in BE8 Ben Dooks
2013-07-25  9:54   ` Will Deacon
2013-07-24 10:28 ` [PATCH 14/14] ARM: set --be8 when linking modules Ben Dooks
2013-07-24 16:25   ` Will Deacon
2013-07-24 23:41   ` Nicolas Pitre
2013-07-24 16:05 ` [repost] ARM big-endian support Ben Dooks
2013-07-29 13:26   ` Thomas Petazzoni
2013-07-31 20:05     ` Ben Dooks
2013-08-01  6:21       ` Thomas Petazzoni
2013-08-03 16:49         ` Ben Dooks
2013-08-05  8:01           ` Thomas Petazzoni

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=20130725104044.GD5609@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).