projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
[powerpc.git]
/
arch
/
powerpc
/
mm
/
imalloc.c
diff --git
a/arch/powerpc/mm/imalloc.c
b/arch/powerpc/mm/imalloc.c
index
c65b87b
..
8b0c132
100644
(file)
--- a/
arch/powerpc/mm/imalloc.c
+++ b/
arch/powerpc/mm/imalloc.c
@@
-14,9
+14,10
@@
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/semaphore.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/semaphore.h>
-#include <asm/imalloc.h>
#include <asm/cacheflush.h>
#include <asm/cacheflush.h>
+#include "mmu_decl.h"
+
static DECLARE_MUTEX(imlist_sem);
struct vm_struct * imlist = NULL;
static DECLARE_MUTEX(imlist_sem);
struct vm_struct * imlist = NULL;
@@
-106,6
+107,7
@@
static int im_region_status(unsigned long v_addr, unsigned long size,
if (v_addr < (unsigned long) tmp->addr + tmp->size)
break;
if (v_addr < (unsigned long) tmp->addr + tmp->size)
break;
+ *vm = NULL;
if (tmp) {
if (im_region_overlaps(v_addr, size, tmp))
return IM_REGION_OVERLAP;
if (tmp) {
if (im_region_overlaps(v_addr, size, tmp))
return IM_REGION_OVERLAP;
@@
-126,7
+128,6
@@
static int im_region_status(unsigned long v_addr, unsigned long size,
}
}
}
}
- *vm = NULL;
return IM_REGION_UNUSED;
}
return IM_REGION_UNUSED;
}
@@
-300,12
+301,7
@@
void im_free(void * addr)
for (p = &imlist ; (tmp = *p) ; p = &tmp->next) {
if (tmp->addr == addr) {
*p = tmp->next;
for (p = &imlist ; (tmp = *p) ; p = &tmp->next) {
if (tmp->addr == addr) {
*p = tmp->next;
-
- /* XXX: do we need the lock? */
- spin_lock(&init_mm.page_table_lock);
unmap_vm_area(tmp);
unmap_vm_area(tmp);
- spin_unlock(&init_mm.page_table_lock);
-
kfree(tmp);
up(&imlist_sem);
return;
kfree(tmp);
up(&imlist_sem);
return;