From: Alexander Graf <agraf@suse.de>
To: linuxppc-dev@lists.ozlabs.org
Cc: Anton Blanchard <anton@samba.org>
Subject: [PATCH] powerpc: Fix dynamic relocation
Date: Sat, 9 Mar 2013 02:02:30 +0100 [thread overview]
Message-ID: <1362790950-23065-1-git-send-email-agraf@suse.de> (raw)
Commit 5ac47f7a introduced dynamic relocation of code by manually
relocating TOC entries. However, we need to access the TOC using
the physical address that we have for it, not the virtual address
that we can't even access yet.
Drop the offset from the TOC accessing pointer.
This fixes Linux 3.9 booting on OpenBIOS for me.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
I've also encountered breakage on a G5 Mac, not sure if it's related.
I'll have to test whether this is the culprit on that one too.
Ben, please make sure that this gets into 3.9.
---
arch/powerpc/kernel/prom_init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 7f7fb7f..2bf7cc3 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2851,7 +2851,7 @@ static void reloc_toc(void)
(__prom_init_toc_end - __prom_init_toc_start) / sizeof(long);
/* Need to add offset to get at __prom_init_toc_start */
- __reloc_toc(__prom_init_toc_start + offset, offset, nr_entries);
+ __reloc_toc(__prom_init_toc_start, offset, nr_entries);
mb();
}
--
1.6.0.2
next reply other threads:[~2013-03-09 1:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-09 1:02 Alexander Graf [this message]
2013-03-09 7:29 ` [PATCH] powerpc: Fix dynamic relocation Benjamin Herrenschmidt
2013-03-09 10:12 ` Alexander Graf
[not found] ` <1362814152.6977.32.camel__2059.78525705195$1362814216$gmane$org@pasglop>
2013-03-09 9:30 ` Andreas Schwab
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=1362790950-23065-1-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.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).