public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Geoff Levand <geoffrey.levand@am•sony.com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Linuxppc-dev@ozlabs•org
Subject: vdso error
Date: Fri, 09 Feb 2007 13:36:55 -0800	[thread overview]
Message-ID: <45CCE977.4000502@am.sony.com> (raw)

There seems to be a rounding error in VDSO32_MAXPAGES.
Pulled today from linux-2.6.git-eaefd5fb7d793c9c1bcef1b0c0d5ec3824a85b91
Fix below, but I'm not entierly sue that is what is needed.


vdso_init:696: vdso64_end 0, vdso64_start 127
vdso64_kbase: c0000000004c0000, 0x1 pages
vdso32_kbase: c0000000004b0000, 0x1 pages
vdso_init:731: PAGE_MASK 18446744073709486080 (ffffffffffff0000h)
vdso_init:735: PAGE_SHIFT 16
vdso_init:739: (unsigned int)(0x3000 + PAGE_MASK) 4294914048 (ffff3000h)
vdso_init:743: ((0x3000 + PAGE_MASK) >> PAGE_SHIFT) 4294967295 (ffffffffh)
vdso_init:747: (((0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2) 1 (1h)
vdso_init:757: vdso32_pages 1, VDSO32_MAXPAGES 1 (1h)
<0>------------[ cut here ]------------
<2>kernel BUG at /home/geoff/projects/cell/ps3-linux-dev/arch/powerpc/kernel/vdso.c:760!


Signed-off-by: Geoff Levand <geoffrey.levand@am•sony.com>

---
 arch/powerpc/kernel/vdso.c |   42 +++++++++++++++++++++++++++++++++++++++---
 arch/powerpc/mm/mem.c      |    2 +-
 2 files changed, 40 insertions(+), 4 deletions(-)

--- ps3-linux-dev.orig/arch/powerpc/kernel/vdso.c
+++ ps3-linux-dev/arch/powerpc/kernel/vdso.c
@@ -49,8 +50,8 @@
 /* Max supported size for symbol names */
 #define MAX_SYMNAME	64
 
-#define VDSO32_MAXPAGES	(((0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
-#define VDSO64_MAXPAGES	(((0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
+#define VDSO32_MAXPAGES	(((unsigned int)(0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
+#define VDSO64_MAXPAGES	(((unsigned int)(0x3000 + PAGE_MASK) >> PAGE_SHIFT) + 2)
 
 extern char vdso32_start, vdso32_end;
 static void *vdso32_kbase = &vdso32_start;

                 reply	other threads:[~2007-02-09 21:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45CCE977.4000502@am.sony.com \
    --to=geoffrey.levand@am$(echo .)sony.com \
    --cc=Linuxppc-dev@ozlabs$(echo .)org \
    --cc=benh@kernel$(echo .)crashing.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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