Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25974
b: refs/heads/master
c: b73781c
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Apr 19, 2006
1 parent 0c6a97a commit cf5a2a7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 676ff453e58c5ff7ddbfebf5a11142e3e4add161
refs/heads/master: b73781c866f671ff5a84d7c840510b43e8731d13
2 changes: 2 additions & 0 deletions trunk/arch/um/include/sysdep-i386/kernel-offsets.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/elf.h>
#include <asm/mman.h>

#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
Expand All @@ -16,6 +17,7 @@
void foo(void)
{
OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs);
DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
#ifdef CONFIG_MODE_TT
OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
#endif
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/um/include/sysdep-x86_64/kernel-offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/time.h>
#include <linux/elf.h>
#include <asm/page.h>
#include <asm/mman.h>

#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
Expand All @@ -18,6 +19,7 @@

void foo(void)
{
DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
#ifdef CONFIG_MODE_TT
OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/os-Linux/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int os_unmap_memory(void *addr, int len)
}

#ifndef MADV_REMOVE
#define MADV_REMOVE 0x5 /* remove these pages & resources */
#define MADV_REMOVE KERNEL_MADV_REMOVE
#endif

int os_drop_memory(void *addr, int length)
Expand All @@ -216,7 +216,7 @@ int can_drop_memory(void)
}

addr = mmap64(NULL, UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE, fd, 0);
MAP_SHARED, fd, 0);
if(addr == MAP_FAILED){
printk("Mapping test memory file failed, err = %d\n", -errno);
return 0;
Expand Down

0 comments on commit cf5a2a7

Please sign in to comment.