mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: slyich@gmail.com
Cc: rob@landley.net, aboriginal@lists.landley.net,
	linux-kernel@vger.kernel.org, tytso@mit.edu,
	sparclinux@vger.kernel.org, jakub@redhat.com
Subject: Re: Sparc-32 doesn't work in 3.1.
Date: Wed, 14 Dec 2011 13:18:10 -0500 (EST)	[thread overview]
Message-ID: <20111214.131810.916491563666428853.davem@davemloft.net> (raw)
In-Reply-To: <20111214.125443.973289484729064945.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Wed, 14 Dec 2011 12:54:43 -0500 (EST)

> The right fix is to simply teach btfixup to be able to patch
> the 'restore' just as equally as it would patch an 'or'.

Try this:

--------------------
sparc32: Be less strict in matching %lo part of relocation.

The "(insn & 0x01800000) != 0x01800000" test matches 'restore'
but that is a legitimate place to see the %lo() part of a 32-bit
symbol relocation, particularly in tail calls.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/mm/btfixup.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c
index 5175ac2..8a7f817 100644
--- a/arch/sparc/mm/btfixup.c
+++ b/arch/sparc/mm/btfixup.c
@@ -302,8 +302,7 @@ void __init btfixup(void)
 				case 'i':	/* INT */
 					if ((insn & 0xc1c00000) == 0x01000000) /* %HI */
 						set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10));
-					else if ((insn & 0x80002000) == 0x80002000 &&
-					         (insn & 0x01800000) != 0x01800000) /* %LO */
+					else if ((insn & 0x80002000) == 0x80002000) /* %LO */
 						set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff));
 					else {
 						prom_printf(insn_i, p, addr, insn);
-- 
1.7.6.401.g6a319


  reply	other threads:[~2011-12-14 18:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12 17:22 Rob Landley
2011-11-13  0:07 ` Rob Landley
2011-12-11  8:17   ` Sergei Trofimovich
2011-12-14  2:23     ` Rob Landley
2011-12-14 17:42       ` Sergei Trofimovich
2011-12-14 17:49         ` Eric Dumazet
2011-12-14 17:53         ` David Miller
2011-12-14 17:54         ` David Miller
2011-12-14 18:18           ` David Miller [this message]
2011-12-14 18:55             ` Sergei Trofimovich
2011-12-14 19:13               ` David Miller
2011-12-14 19:27                 ` Rob Landley
2011-12-14 19:26             ` Rob Landley

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=20111214.131810.916491563666428853.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aboriginal@lists.landley.net \
    --cc=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob@landley.net \
    --cc=slyich@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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®