]> err.no Git - linux-2.6/blobdiff - arch/um/kernel/physmem.c
Blackfin arch: Apply Bluetchnix vendor patch provided by Harald Krapfenbauer
[linux-2.6] / arch / um / kernel / physmem.c
index f7b2f3594793ec40a7442836648e10eaa2d37d45..e66432f42485dad02584bb13a6bc28a626aa0814 100644 (file)
@@ -10,7 +10,7 @@
 #include "as-layout.h"
 #include "init.h"
 #include "kern.h"
-#include "mode_kern.h"
+#include "mem_user.h"
 #include "os.h"
 
 static int physmem_fd = -1;
@@ -61,7 +61,7 @@ static unsigned long kmem_top = 0;
 unsigned long get_kmem_end(void)
 {
        if (kmem_top == 0)
-               kmem_top = kmem_end_skas;
+               kmem_top = host_task_size - 1024 * 1024;
        return kmem_top;
 }
 
@@ -75,7 +75,7 @@ void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
        err = os_map_memory((void *) virt, fd, offset, len, r, w, x);
        if (err) {
                if (err == -ENOMEM)
-                       printk("try increasing the host's "
+                       printk(KERN_ERR "try increasing the host's "
                               "/proc/sys/vm/max_map_count to <physical "
                               "memory size>/4096\n");
                panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, "
@@ -99,11 +99,14 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
        err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
                            len - offset, 1, 1, 1);
        if (err < 0) {
-               os_print_error(err, "Mapping memory");
+               printf("setup_physmem - mapping %ld bytes of memory at 0x%p "
+                      "failed - errno = %d\n", len - offset,
+                      (void *) uml_reserved, err);
                exit(1);
        }
 
-       /* Special kludge - This page will be mapped in to userspace processes
+       /*
+        * Special kludge - This page will be mapped in to userspace processes
         * from physmem_fd, so it needs to be written out there.
         */
        os_seek_file(physmem_fd, __pa(&__syscall_stub_start));
@@ -114,7 +117,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
                     len - bootmap_size - reserve);
 }
 
-int phys_mapping(unsigned long phys, __u64 *offset_out)
+int phys_mapping(unsigned long phys, unsigned long long *offset_out)
 {
        int fd = -1;
 
@@ -202,8 +205,8 @@ int setup_iomem(void)
                err = os_map_memory((void *) iomem_start, region->fd, 0,
                                    region->size, 1, 1, 0);
                if (err)
-                       printk("Mapping iomem region for driver '%s' failed, "
-                              "errno = %d\n", region->driver, -err);
+                       printk(KERN_ERR "Mapping iomem region for driver '%s' "
+                              "failed, errno = %d\n", region->driver, -err);
                else {
                        region->virt = iomem_start;
                        region->phys = __pa(region->virt);