mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, travis@sgi.com
Subject: Re: [patch 6/6] x86: Add checks for virtual addresses in __phys_addr()
Date: Fri, 9 May 2008 20:07:54 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0805092007110.24814@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0805091927450.32224@schroedinger.engr.sgi.com>

We also need to address this issue with __pa expected to be a constant in 
32 bit code. Sigh.


---
 arch/x86/kernel/doublefault_32.c |    2 +-
 include/asm-x86/page_32.h        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/include/asm-x86/page_32.h
===================================================================
--- linux-2.6.orig/include/asm-x86/page_32.h	2008-05-09 19:32:47.000000000 -0700
+++ linux-2.6/include/asm-x86/page_32.h	2008-05-09 19:32:55.000000000 -0700
@@ -65,7 +65,7 @@ typedef struct page *pgtable_t;
 
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_DEBUG_VM
-unsigned long __phys_addr(unsigned long x)
+extern unsigned long __phys_addr(unsigned long x);
 #else
 #define __phys_addr(x)	((x) - PAGE_OFFSET)
 #endif
Index: linux-2.6/arch/x86/kernel/doublefault_32.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/doublefault_32.c	2008-05-09 19:40:08.000000000 -0700
+++ linux-2.6/arch/x86/kernel/doublefault_32.c	2008-05-09 19:40:45.000000000 -0700
@@ -66,6 +66,6 @@ struct tss_struct doublefault_tss __cach
 		.ds		= __USER_DS,
 		.fs		= __KERNEL_PERCPU,
 
-		.__cr3		= __pa(swapper_pg_dir)
+		.__cr3		= (unsigned long)swapper_pg_dir - PAGE_OFFSET
 	}
 };


  reply	other threads:[~2008-05-10  3:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-10  2:09 [patch 0/6] x86: Unification patches etc Christoph Lameter
2008-05-10  2:09 ` [patch 1/6] x86: Unify current.h Christoph Lameter
2008-05-13 12:28   ` Ingo Molnar
2008-05-10  2:09 ` [patch 2/6] x86: e820.h unification Christoph Lameter
2008-05-10  2:09 ` [patch 3/6] x86: e820 unification: Extract shared comments Christoph Lameter
2008-05-10  2:09 ` [patch 4/6] x86: e820 unification: Common #ifdef __ASSEMBLY Christoph Lameter
2008-05-10  2:09 ` [patch 5/6] x86: e820 unification: Extract common functions Christoph Lameter
2008-05-10  2:09 ` [patch 6/6] x86: Add checks for virtual addresses in __phys_addr() Christoph Lameter
2008-05-10  2:23   ` Sam Ravnborg
2008-05-10  2:33     ` Christoph Lameter
2008-05-10  3:07       ` Christoph Lameter [this message]
2008-05-13 12:27         ` Ingo Molnar

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=Pine.LNX.4.64.0805092007110.24814@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=travis@sgi.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 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®