This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / um / kernel / physmem.c
index 258e158..d0e0f50 100644 (file)
@@ -122,19 +122,14 @@ int physmem_subst_mapping(void *virt, int fd, __u64 offset, int w)
        unsigned long phys;
        int err;
 
-       phys = __pa(virt);
-       desc = find_virtmem_hash(&virtmem_hash, (void *) virt);
-       if(desc != NULL){
-               if((virt != desc->virt) || (fd != desc->fd) || 
-                  (offset != desc->offset))
-                       panic("Address 0x%p is already substituted\n", virt);
-               return(0);
-       }
-
        fd_maps = descriptor_mapping(fd);
        if(fd_maps == NULL)
                return(-ENOMEM);
 
+       phys = __pa(virt);
+       if(find_virtmem_hash(&virtmem_hash, virt) != NULL)
+               panic("Address 0x%p is already substituted\n", virt);
+
        err = -ENOMEM;
        desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
        if(desc == NULL)
@@ -205,9 +200,6 @@ void physmem_forget_descriptor(int fd)
        if(desc == NULL)
                return;
 
-       if(!list_empty(&desc->pages))
-               printk("Still have mapped pages on fd %d\n", fd);
-
        list_for_each_safe(ele, next, &desc->pages){
                page = list_entry(ele, struct phys_desc, list);
                offset = page->offset;
@@ -240,16 +232,9 @@ void arch_free_page(struct page *page, int order)
        }
 }
 
-int is_remapped(const void *virt, int fd, __u64 offset)
+int is_remapped(void *virt)
 {
-       struct phys_desc *desc;
-
-       desc = find_virtmem_hash(&virtmem_hash, (void *) virt);
-       if(desc == NULL)
-               return(0);
-       if(offset != desc->offset)
-               printk("offset mismatch\n");
-       return(find_virtmem_hash(&virtmem_hash, (void *) virt) != NULL);
+       return(find_virtmem_hash(&virtmem_hash, virt) != NULL);
 }
 
 /* Changed during early boot */