All of lore.kernel.org
 help / color / mirror / Atom feed
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
To: Martin Michlmayr <tbm@cyrius.com>
Cc: linux-mips@linux-mips.org, Franck Bui-Huu <fbuihuu@gmail.com>,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: CONFIG_BUILD_ELF64 broken on IP32 since 2.6.20
Date: Wed, 26 Sep 2007 10:03:44 +0200	[thread overview]
Message-ID: <46FA1260.4000404@gmail.com> (raw)
In-Reply-To: <20070925181353.GA15412@deprecation.cyrius.com>

Martin Michlmayr wrote:
> IP32 kernels that are built with CONFIG_BUILD_ELF64=y only produce an
> exception when booted.  This worked with 2.6.19 and before.  I haven't
> had a chance to dig deep yet but it seems both Franck Bui-Huu and
> Atsushi Nemoto had patches in 2.6.20 that might have caused this.

I'm the culprit ;) but...

> This still happens with 2.6.22.  I cannot boot current git for other
> reasons.
> 
> If anyone has an idea which specific patch might have caused this,
> please let me know.  Otherwise I'll try to find time in the next few
> days to revert various patches.

It's sad to see this issue is still not fixed. Some people complained
about IPxx kernels broken by CONFIG_BUILD_ELF64 config but disappear
once they reported the problem. Anyways, hopefully this time we could
do a better job...

OK, it seems that Ralf's commit
db423f6e86c3c4c70edf3eaf504e22c467b9f97c fixes your issue. But
actually I think it just hides another problem. Because with
CONFIG_BUILD_ELF64=y you claim to run a kernel with 64 bit
symbols. However if the previous commit fixes your issue then it shows
that your kernel handles a symbol linked in CKSEG0 although
CONFIG_BUILD_ELF64 is set.

To verify this, could you apply the following patch _without_ Ralf's
commit and report back the trace. You may need to enable early printk
to see something and be sure CONFIG_KALLSYMS_ALL is set.

thanks,
		Franck

-- 8< --

diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index b92dd8c..a469cf1 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -149,8 +149,17 @@ typedef struct { unsigned long pgprot; } pgprot_t;
     __x < CKSEG0 ? XPHYSADDR(__x) : CPHYSADDR(__x);			\
 })
 #else
-#define __pa(x)								\
-    ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
+static inline unsigned long __pa(void *p)
+{
+	unsigned long x = (unsigned long)p;
+
+	if (x > CKSEG0 - 1) {
+		__print_symbol("*** __pa: symbol in CKSEG0 found: %s\n", x);
+		BUG();
+	}
+
+	return x - PAGE_OFFSET + PHYS_OFFSET;
+}
 #endif
 #define __va(x)		((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET))
 #define __pa_symbol(x)	__pa(RELOC_HIDE((unsigned long)(x),0))

  parent reply	other threads:[~2007-09-26  8:06 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 18:13 CONFIG_BUILD_ELF64 broken on IP32 since 2.6.20 Martin Michlmayr
2007-09-25 18:32 ` sknauert
2007-09-25 18:43   ` Martin Michlmayr
2007-09-25 18:56     ` sknauert
2007-09-26  8:03 ` Franck Bui-Huu [this message]
2007-09-26  9:14   ` Martin Michlmayr
2007-09-26  9:54     ` Franck Bui-Huu
2007-09-26 10:24       ` Martin Michlmayr
2007-09-26 11:32         ` Maciej W. Rozycki
2007-09-26 13:34           ` Franck Bui-Huu
2007-09-26 13:46             ` Martin Michlmayr
2007-09-26 14:49             ` Maciej W. Rozycki
2007-09-26 15:34               ` Atsushi Nemoto
2007-09-26 15:47                 ` Maciej W. Rozycki
2007-09-27  8:11                   ` Franck Bui-Huu
2007-09-27 11:10                     ` Maciej W. Rozycki
2007-09-27 13:36                     ` Ralf Baechle
2007-09-27 13:47                       ` Franck Bui-Huu
  -- strict thread matches above, loose matches on Subject: below --
2007-03-04 23:18 Building 64 bit kernel on Cobalt Jim Gifford
2007-03-04 23:27 ` Ralf Baechle
2007-03-08  6:11   ` Jim Gifford
2007-03-08  8:46     ` Jim Gifford
2007-03-08 12:48     ` Franck Bui-Huu
2007-03-08 16:11       ` Jim Gifford
2007-03-13  0:57         ` Jim Gifford
2007-03-13 10:38           ` Franck Bui-Huu
2007-03-13 11:53             ` Ralf Baechle
2007-03-18 21:52             ` Jim Gifford
2007-03-19  1:12               ` Atsushi Nemoto
2007-03-19  5:20                 ` Jim Gifford
2007-03-19  6:07                   ` Atsushi Nemoto
2007-03-19 10:08                     ` Franck Bui-Huu
2007-03-19 10:17                       ` Franck Bui-Huu
2007-03-21 17:07                         ` Atsushi Nemoto
2007-03-21 19:31                           ` Franck Bui-Huu
2007-03-23 13:47                             ` Kumba
2007-03-23 15:24                               ` Atsushi Nemoto
2007-03-24  3:31                                 ` Kumba
2007-03-24 14:47                                   ` Atsushi Nemoto
2007-03-24 23:16                                     ` Thiemo Seufer
2007-03-25  7:25                                       ` [PATCH]: Remove CONFIG_BUILD_ELF64 entirely Kumba
2007-03-25 14:45                                         ` Thiemo Seufer
2007-03-26 11:35                                           ` Maciej W. Rozycki
2007-03-26 11:56                                             ` Ralf Baechle
2007-03-26 12:09                                               ` Maciej W. Rozycki
2007-03-26 12:34                                                 ` Ralf Baechle
2007-03-25 16:10                                         ` Atsushi Nemoto
2007-03-25 16:40                                           ` Ralf Baechle
2007-03-26  9:14                                             ` Franck Bui-Huu
2007-03-26  9:42                                               ` Thiemo Seufer
2007-03-25 16:59                                           ` Kumba
2007-03-25 17:07                                             ` Atsushi Nemoto
2007-03-25 18:33                                               ` Kumba
2007-03-26 10:36                                                 ` Atsushi Nemoto
2007-03-26 13:48                                                   ` Kumba
2007-03-26 14:43                                                     ` Atsushi Nemoto
2007-03-27  0:51                                                       ` Kumba
2007-03-27 14:53                                                         ` Atsushi Nemoto
2007-03-27 17:54                                                           ` Ilya A. Volynets-Evenbakh
2007-03-28 15:14                                                             ` Atsushi Nemoto
2007-03-27 19:01                                                           ` Thiemo Seufer
2007-03-28 13:26                                                           ` Kumba
2007-03-28 15:24                                                             ` Atsushi Nemoto
2007-03-29  1:50                                                               ` Kumba
2007-03-29 14:53                                                                 ` Atsushi Nemoto
2007-03-30  6:18                                                                   ` Kumba
2007-03-30  2:20                                                               ` Kumba
2007-02-18 20:00                                                                 ` IP32 prom crashes due to __pa() funkiness Kumba
2007-03-01  4:33                                                                   ` Kumba
2007-03-01  9:39                                                                   ` Franck Bui-Huu
2007-03-10  9:41                                                                     ` [PATCH], " peter fuerst
2007-03-17 19:52                                                                     ` Kumba
2007-03-17 21:48                                                                       ` Arnaud Giersch
2007-03-18  2:04                                                                         ` Kumba
2007-03-19 13:53                                                                           ` Franck Bui-Huu
2007-03-19 14:07                                                                             ` Thiemo Seufer
2007-03-19 14:19                                                                               ` Franck Bui-Huu
2007-03-19 14:17                                                                             ` Franck Bui-Huu
2007-03-19 14:24                                                                             ` Kumba
2007-03-19 14:45                                                                               ` Thiemo Seufer
2007-03-19 14:46                                                                               ` Atsushi Nemoto
2007-03-19 21:35                                                                               ` Franck Bui-Huu
2007-03-20 14:10                                                                                 ` Kumba
2007-03-23 15:12                                                                                   ` Franck Bui-Huu
     [not found]                                                                     ` <45FC3923.2080207@gentoo.org>
2007-03-18  9:42                                                                       ` peter fuerst
2007-03-18 21:26                                                                         ` Kumba
2007-03-18 21:37                                                                           ` Kumba
2007-03-18 22:44                                                                         ` Kumba
2007-03-19 13:57                                                                           ` Franck Bui-Huu
2007-03-30  3:01                                                                   ` [PATCH]: Remove CONFIG_BUILD_ELF64 entirely Atsushi Nemoto
2007-03-30  5:35                                                                     ` Kumba
2007-03-30  6:09                                                                       ` Atsushi Nemoto
2007-09-26  2:08                                                                         ` CONFIG_BUILD_ELF64 broken on IP32 since 2.6.20 Atsushi Nemoto
2007-09-26  5:59                                                                           ` Martin Michlmayr
2007-09-26  6:19                                                                             ` Giuseppe Sacco
2007-09-27  0:24                                                                             ` Thiemo Seufer
2007-09-26  9:14                                                                           ` Franck Bui-Huu
2007-09-26 14:42                                                                             ` Atsushi Nemoto
2007-03-25 22:19                                             ` [PATCH]: Remove CONFIG_BUILD_ELF64 entirely Ralf Baechle
2007-03-26 13:25                                               ` Atsushi Nemoto
2007-03-26 13:54                                               ` Franck Bui-Huu
2007-03-26 14:48                                                 ` Atsushi Nemoto
2007-03-26 15:31                                                   ` Franck Bui-Huu
2007-03-26 15:45                                                     ` Atsushi Nemoto
2007-03-26 16:07                                                       ` Franck Bui-Huu
2007-03-27  3:12                                                         ` Atsushi Nemoto
2007-03-27  8:01                                                           ` Franck Bui-Huu
2007-03-26 15:56                                                     ` Thiemo Seufer
2007-03-26  9:02                                             ` Franck Bui-Huu
2007-03-25 15:40                                       ` Building 64 bit kernel on Cobalt Atsushi Nemoto

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=46FA1260.4000404@gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=fbuihuu@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=tbm@cyrius.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.