Merge branch 'upstream-fixes'
[cascardo/linux.git] / arch / powerpc / kernel / prom_init.c
index e381f2f..ec7153f 100644 (file)
@@ -137,8 +137,8 @@ struct prom_t {
 };
 
 struct mem_map_entry {
-       unsigned long   base;
-       unsigned long   size;
+       u64     base;
+       u64     size;
 };
 
 typedef u32 cell_t;
@@ -605,7 +605,8 @@ static void __init early_cmdline_parse(void)
        opt = strstr(RELOC(prom_cmd_line), RELOC("crashkernel="));
        if (opt) {
                opt += 12;
-               RELOC(prom_crashk_size) = prom_memparse(opt, &opt);
+               RELOC(prom_crashk_size) = 
+                       prom_memparse(opt, (const char **)&opt);
 
                if (ALIGN(RELOC(prom_crashk_size), 0x1000000) !=
                        RELOC(prom_crashk_size)) {
@@ -897,9 +898,9 @@ static unsigned long __init prom_next_cell(int s, cell_t **cellp)
  * If problems seem to show up, it would be a good start to track
  * them down.
  */
-static void reserve_mem(unsigned long base, unsigned long size)
+static void reserve_mem(u64 base, u64 size)
 {
-       unsigned long top = base + size;
+       u64 top = base + size;
        unsigned long cnt = RELOC(mem_reserve_cnt);
 
        if (size == 0)
@@ -2097,6 +2098,10 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4,
         */
        prom_init_stdout();
 
+       /* Bail if this is a kdump kernel. */
+       if (PHYSICAL_START > 0)
+               prom_panic("Error: You can't boot a kdump kernel from OF!\n");
+
        /*
         * Check for an initrd
         */