]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/parisc/kernel/setup.c
[PARISC] Fix unwinder on 64-bit kernels
[linux-2.6-omap-h63xx.git] / arch / parisc / kernel / setup.c
index 4a36ec3f6ac15f9ae0466fcfc2992374a3962601..c44b8c51f5d1ef82f542f8f35e56d7fb2d9ec7a3 100644 (file)
@@ -27,7 +27,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/initrd.h>
 #include <linux/init.h>
@@ -46,7 +45,7 @@
 #include <asm/io.h>
 #include <asm/setup.h>
 
-char   command_line[COMMAND_LINE_SIZE] __read_mostly;
+static char __initdata command_line[COMMAND_LINE_SIZE];
 
 /* Intended for ccio/sba/cpu statistics under /proc/bus/{runway|gsc} */
 struct proc_dir_entry * proc_runway_root __read_mostly = NULL;
@@ -72,9 +71,9 @@ void __init setup_cmdline(char **cmdline_p)
        /* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */
        if (boot_args[0] < 64) {
                /* called from hpux boot loader */
-               saved_command_line[0] = '\0';
+               boot_command_line[0] = '\0';
        } else {
-               strcpy(saved_command_line, (char *)__va(boot_args[1]));
+               strcpy(boot_command_line, (char *)__va(boot_args[1]));
 
 #ifdef CONFIG_BLK_DEV_INITRD
                if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
@@ -85,7 +84,7 @@ void __init setup_cmdline(char **cmdline_p)
 #endif
        }
 
-       strcpy(command_line, saved_command_line);
+       strcpy(command_line, boot_command_line);
        *cmdline_p = command_line;
 }
 
@@ -121,13 +120,13 @@ extern void collect_boot_cpu_data(void);
 
 void __init setup_arch(char **cmdline_p)
 {
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
        extern int parisc_narrow_firmware;
 #endif
 
        init_per_cpu(smp_processor_id());       /* Set Modes & Enable FP */
 
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
        printk(KERN_INFO "The 64-bit Kernel has started...\n");
 #else
        printk(KERN_INFO "The 32-bit Kernel has started...\n");
@@ -135,7 +134,7 @@ void __init setup_arch(char **cmdline_p)
 
        pdc_console_init();
 
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
        if(parisc_narrow_firmware) {
                printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
        }
@@ -163,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
 }
 
 /*
- * Display cpu info for all cpu's.
+ * Display CPU info for all CPUs.
  * for parisc this is in processor.c
  */
 extern int show_cpuinfo (struct seq_file *m, void *v);
@@ -226,6 +225,7 @@ static void __init parisc_proc_mkdir(void)
                 }
                 break;
        case mako:
+       case mako2:
                 if (NULL == proc_mckinley_root)
                 {
                         proc_mckinley_root = proc_mkdir("bus/mckinley", NULL);
@@ -303,6 +303,8 @@ extern void eisa_init(void);
 
 static int __init parisc_init(void)
 {
+       u32 osid = (OS_ID_LINUX << 16);
+
        parisc_proc_mkdir();
        parisc_init_resources();
        do_device_inventory();                  /* probe for hardware */
@@ -311,6 +313,9 @@ static int __init parisc_init(void)
        
        /* set up a new led state on systems shipped LED State panel */
        pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BSTART);
+
+       /* tell PDC we're Linux. Nevermind failure. */
+       pdc_stable_write(0x40, &osid, sizeof(osid));
        
        processor_init();
        printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n",