[CIFS] Fix typo in name of new cifs_show_stats
[safe/jmp/linux-2.6] / arch / um / kernel / um_arch.c
index 26626b2..7896cf9 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com)
  * Licensed under the GPL
  */
@@ -193,6 +193,24 @@ __uml_setup("root=", uml_root_setup,
 "        root=/dev/ubd5\n\n"
 );
 
+#ifndef CONFIG_MODE_TT
+
+static int __init no_skas_debug_setup(char *line, int *add)
+{
+       printf("'debug' is not necessary to gdb UML in skas mode - run \n");
+       printf("'gdb linux' and disable CONFIG_CMDLINE_ON_HOST if gdb \n");
+       printf("doesn't work as expected\n");
+
+       return 0;
+}
+
+__uml_setup("debug", no_skas_debug_setup,
+"debug\n"
+"    this flag is not needed to run gdb on UML in skas mode\n\n"
+);
+
+#endif
+
 #ifdef CONFIG_SMP
 static int __init uml_ncpus_setup(char *line, int *add)
 {
@@ -243,10 +261,6 @@ static int __init mode_tt_setup(char *line, int *add)
        return(0);
 }
 
-#else
-
-#error Either CONFIG_MODE_TT or CONFIG_MODE_SKAS must be enabled
-
 #endif
 #endif
 #endif
@@ -316,6 +330,8 @@ EXPORT_SYMBOL(end_iomem);
 
 #define MIN_VMALLOC (32 * 1024 * 1024)
 
+extern char __binary_start;
+
 int linux_main(int argc, char **argv)
 {
        unsigned long avail, diff;
@@ -360,8 +376,14 @@ int linux_main(int argc, char **argv)
 
        printf("UML running in %s mode\n", mode);
 
-       uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0,
-                                    &host_task_size, &task_size);
+       uml_start = (unsigned long) &__binary_start;
+       host_task_size = CHOOSE_MODE_PROC(set_task_sizes_tt,
+                                         set_task_sizes_skas, &task_size);
+
+       /*
+        * Setting up handlers to 'sig_info' struct
+        */
+       os_fill_handlinfo(handlinfo_kern);
 
        brk_start = (unsigned long) sbrk(0);
        CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start);
@@ -376,7 +398,7 @@ int linux_main(int argc, char **argv)
                physmem_size += UML_ROUND_UP(brk_start) - UML_ROUND_UP(&_end);
        }
 
-       uml_physmem = uml_start;
+       uml_physmem = uml_start & PAGE_MASK;
 
        /* Reserve up to 4M after the current brk */
        uml_reserved = ROUND_4M(brk_start) + (1 << 22);
@@ -402,7 +424,7 @@ int linux_main(int argc, char **argv)
 #ifndef CONFIG_HIGHMEM
                highmem = 0;
                printf("CONFIG_HIGHMEM not enabled - physical memory shrunk "
-                      "to %lu bytes\n", physmem_size);
+                      "to %Lu bytes\n", physmem_size);
 #endif
        }
 
@@ -414,8 +436,8 @@ int linux_main(int argc, char **argv)
 
        setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem);
        if(init_maps(physmem_size, iomem_size, highmem)){
-               printf("Failed to allocate mem_map for %lu bytes of physical "
-                      "memory and %lu bytes of highmem\n", physmem_size,
+               printf("Failed to allocate mem_map for %Lu bytes of physical "
+                      "memory and %Lu bytes of highmem\n", physmem_size,
                       highmem);
                exit(1);
        }
@@ -458,7 +480,8 @@ static struct notifier_block panic_exit_notifier = {
 
 void __init setup_arch(char **cmdline_p)
 {
-       notifier_chain_register(&panic_notifier_list, &panic_exit_notifier);
+       atomic_notifier_chain_register(&panic_notifier_list,
+                       &panic_exit_notifier);
        paging_init();
         strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
        *cmdline_p = command_line;
@@ -468,10 +491,21 @@ void __init setup_arch(char **cmdline_p)
 void __init check_bugs(void)
 {
        arch_check_bugs();
-       check_sigio();
-       check_devanon();
+       os_check_bugs();
+}
+
+void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
+{
+}
+
+#ifdef CONFIG_SMP
+void alternatives_smp_module_add(struct module *mod, char *name,
+                                void *locks, void *locks_end,
+                                void *text,  void *text_end)
+{
 }
 
-void apply_alternatives(void *start, void *end)
+void alternatives_smp_module_del(struct module *mod)
 {
 }
+#endif