Uml: obvious compile fixes for x86-64 Subarch and x86 regression fixes [for 2.6.12]
Subsystems (2)
PATCH 1/1 Uml: obvious compile fixes for x86-64 Subarch and x86 regression fixes [for 2.6.12]
From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
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).
---
linux-2.6.12-paolo/arch/um/kernel/ptrace.c | 4 +++- linux-2.6.12-paolo/arch/um/sys-x86_64/syscalls.c | 2 ++ linux-2.6.12-paolo/include/asm-um/ipc.h | 7 +------ linux-2.6.12-paolo/include/asm-um/page.h | 3 +++ linux-2.6.12-paolo/include/asm-um/pgtable-3level.h | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-)
arch/um/kernel/ptrace.c renamed from arch/um/kernel/ptrace.c~uml-simple-x86-64-compilation +3 -1
@@ -98,12 +98,14 @@ long sys_ptrace(long request, long pid,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, 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]);
arch/um/sys-x86_64/syscalls.c renamed from arch/um/sys-x86_64/syscalls.c~uml-simple-x86-64-compilation +2 -0
@@ -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"
include/asm-um/ipc.h renamed from include/asm-um/ipc.h~uml-simple-x86-64-compilation +1 -6
@@ -1,6 +1 @@ -#ifndef __UM_IPC_H -#define __UM_IPC_H - -#include "asm/arch/ipc.h" - -#endif +#include <asm-generic/ipc.h>
include/asm-um/page.h renamed from include/asm-um/page.h~uml-simple-x86-64-compilation +3 -0
@@ -45,6 +45,9 @@ typedef struct { unsigned long pgd; } pg ({ (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 ;
include/asm-um/pgtable-3level.h renamed from include/asm-um/pgtable-3level.h~uml-simple-x86-64-compilation +1 -1
@@ -149,7 +149,7 @@ static inline pmd_t pfn_pmd(pfn_t page_n#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
_
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel