All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: linux-mips@linux-mips.org
Cc: Franck Bui-Huu <vagabon.xyz@gmail.com>, ralf@linux-mips.org
Subject: RFC: Sentosa boot fix
Date: Sun, 28 Jan 2007 13:08:07 -0500	[thread overview]
Message-ID: <20070128180807.GA18890@nevyn.them.org> (raw)

From: Daniel Jacobowitz <dan@codesourcery.com>

Always support CKSEG0 for 64-bit kernels.

This prevents an early exception when used without a ramdisk.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>

---

Here's a crude patch that lets my Sentosa boot using GIT HEAD.
The problem is __pa_symbol(&_end); the kernel is linked at
0xffffffff80xxxxxx, so subtracting a PAGE_OFFSET of 0xa800000000000000
does not do anything useful to this address at all.

This may be the wrong fix, but if so, I don't understand what's going
on.  What does CKSEG0 have to do with !CONFIG_BUILD_ELF64?

diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 2f9e1a9..81dc8a6 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -132,7 +132,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
 /* to align the pointer to the (next) page boundary */
 #define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
 
-#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
+#if defined(CONFIG_64BIT)
 #define __pa_page_offset(x)	((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
 #else
 #define __pa_page_offset(x)	PAGE_OFFSET

-- 
Daniel Jacobowitz
CodeSourcery

             reply	other threads:[~2007-01-28 18:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28 18:08 Daniel Jacobowitz [this message]
2007-01-29  9:59 ` RFC: Sentosa boot fix Franck Bui-Huu
2007-01-29 15:46   ` Maciej W. Rozycki
2007-01-29 16:14     ` Atsushi Nemoto
2007-01-29 16:27       ` Franck Bui-Huu
2007-01-30 16:41         ` Atsushi Nemoto
2007-01-30 17:56           ` Maciej W. Rozycki
2007-01-29 18:07       ` Thiemo Seufer
2007-01-29 18:32       ` Maciej W. Rozycki
2007-01-29 18:09     ` Thiemo Seufer
2007-01-29 15:52   ` Daniel Jacobowitz
2007-01-29 16:06     ` Franck Bui-Huu
2007-01-29 16:14       ` Daniel Jacobowitz
2007-01-29 18:47         ` Maciej W. Rozycki
2007-01-30 14:45           ` Atsushi Nemoto
2007-01-30 15:18             ` Ralf Baechle
2007-01-30 17:33             ` Maciej W. Rozycki
2007-02-01  9:51               ` Franck Bui-Huu
2007-02-01 13:20                 ` Maciej W. Rozycki
2007-02-01 14:31                   ` Atsushi Nemoto
2007-02-01 14:36                     ` Atsushi Nemoto
2007-02-01 15:59                   ` Franck Bui-Huu
2007-02-08 15:49                     ` Maciej W. Rozycki
2007-02-08 16:36                       ` Franck Bui-Huu

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=20070128180807.GA18890@nevyn.them.org \
    --to=dan@debian.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=vagabon.xyz@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.