[PATCH] uml: obvious compile fixes for x86-64 Subarch and x86 regression fixes
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Thu, 5 May 2005 23:15:15 +0000 (16:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 5 May 2005 23:36:32 +0000 (16:36 -0700)
This patch does some totally trivial compilation fixes.  It also restores the
debugregs manipulation, which was commented out simply because it doesn't
compile on x86_64 (we haven't yet implemented there debugregs handling).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/ptrace.c
arch/um/sys-x86_64/syscalls.c
include/asm-um/ipc.h
include/asm-um/page.h
include/asm-um/pgtable-3level.h

index 959b2d2490df273bdd2051cd65bb01ab7acb3004..ffc599bd85c322ffee8313e2a2601e076a425e6b 100644 (file)
@@ -98,12 +98,14 @@ long sys_ptrace(long request, long pid, long addr, long data)
                if(addr < MAX_REG_OFFSET){
                        tmp = getreg(child, addr);
                }
+#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
                else if((addr >= offsetof(struct user, u_debugreg[0])) &&
                        (addr <= offsetof(struct user, u_debugreg[7]))){
                        addr -= offsetof(struct user, u_debugreg[0]);
                        addr = addr >> 2;
                        tmp = child->thread.arch.debugregs[addr];
                }
+#endif
                ret = put_user(tmp, (unsigned long __user *) data);
                break;
        }
@@ -127,7 +129,7 @@ long sys_ptrace(long request, long pid, long addr, long data)
                        ret = putreg(child, addr, data);
                        break;
                }
-#if 0 /* XXX x86_64 */
+#if defined(CONFIG_UML_X86) && !defined(CONFIG_64BIT)
                else if((addr >= offsetof(struct user, u_debugreg[0])) &&
                        (addr <= offsetof(struct user, u_debugreg[7]))){
                          addr -= offsetof(struct user, u_debugreg[0]);
index ab4b0abf8af3fe528881a2f6a95429d6469d8f57..2a575ef52bba70fd104cbd76488c30772b15ee82 100644 (file)
@@ -7,6 +7,8 @@
 #include "linux/linkage.h"
 #include "linux/slab.h"
 #include "linux/shm.h"
+#include "linux/utsname.h"
+#include "linux/personality.h"
 #include "asm/uaccess.h"
 #define __FRAME_OFFSETS
 #include "asm/ptrace.h"
index e2ddc47f3e52639bc7dffc235c7b67505589573e..a46e3d9c2a3fc176772d1b6b7726a977bb585cab 100644 (file)
@@ -1,6 +1 @@
-#ifndef __UM_IPC_H
-#define __UM_IPC_H
-
-#include "asm/arch/ipc.h"
-
-#endif
+#include <asm-generic/ipc.h>
index 102eb3df1aafad05f3b216a148cfdcac208acdcb..504ea8e486b0532d5d70c387cf262d3c92d8a148 100644 (file)
@@ -45,6 +45,9 @@ typedef struct { unsigned long pgd; } pgd_t;
        ({ (pte).pte_high = (phys) >> 32; \
           (pte).pte_low = (phys) | pgprot_val(prot); })
 
+#define pmd_val(x)     ((x).pmd)
+#define __pmd(x) ((pmd_t) { (x) } )
+
 typedef unsigned long long pfn_t;
 typedef unsigned long long phys_t;
 
index d309f3a9e6f65920dd85c50ef806810e55b7c997..65e8bfc55fc415440e8021650b2b8fd39ecc87b1 100644 (file)
@@ -149,7 +149,7 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot)
 
 #define pte_to_pgoff(p) ((p).pte >> 32)
 
-#define pgoff_to_pte(off) ((pte_t) { ((off) < 32) | _PAGE_FILE })
+#define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE })
 
 #else