Skip to content

Commit

Permalink
[PATCH] uml: obvious compile fixes for x86-64 Subarch and x86 regress…
Browse files Browse the repository at this point in the history
…ion fixes

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>
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed May 5, 2005
1 parent 1f8d419 commit f7fe878
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion arch/um/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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]);
Expand Down
2 changes: 2 additions & 0 deletions arch/um/sys-x86_64/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 1 addition & 6 deletions include/asm-um/ipc.h
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
#ifndef __UM_IPC_H
#define __UM_IPC_H

#include "asm/arch/ipc.h"

#endif
#include <asm-generic/ipc.h>
3 changes: 3 additions & 0 deletions include/asm-um/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion include/asm-um/pgtable-3level.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f7fe878

Please sign in to comment.