summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/um/kernel/ptrace.c4
-rw-r--r--arch/um/sys-x86_64/syscalls.c2
-rw-r--r--include/asm-um/ipc.h7
-rw-r--r--include/asm-um/page.h3
-rw-r--r--include/asm-um/pgtable-3level.h2
5 files changed, 10 insertions, 8 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 959b2d2..ffc599b 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -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]);
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index ab4b0ab..2a575ef 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -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"
diff --git a/include/asm-um/ipc.h b/include/asm-um/ipc.h
index e2ddc47..a46e3d9 100644
--- a/include/asm-um/ipc.h
+++ b/include/asm-um/ipc.h
@@ -1,6 +1 @@
-#ifndef __UM_IPC_H
-#define __UM_IPC_H
-
-#include "asm/arch/ipc.h"
-
-#endif
+#include <asm-generic/ipc.h>
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 102eb3d..504ea8e 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -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;
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h
index d309f3a..65e8bfc 100644
--- a/include/asm-um/pgtable-3level.h
+++ b/include/asm-um/pgtable-3level.h
@@ -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
OpenPOWER on IntegriCloud