Pull asus into release branch
[pandora-kernel.git] / arch / s390 / kernel / early.c
index 5d02e48..5e47936 100644 (file)
@@ -110,7 +110,7 @@ static inline void create_kernel_nss(void) { }
  */
 static noinline __init void clear_bss_section(void)
 {
-       memset(__bss_start, 0, _end - __bss_start);
+       memset(__bss_start, 0, __bss_stop - __bss_start);
 }
 
 /*
@@ -141,9 +141,9 @@ static noinline __init void detect_machine_type(void)
                machine_flags |= 4;
 }
 
+#ifdef CONFIG_64BIT
 static noinline __init int memory_fast_detect(void)
 {
-
        unsigned long val0 = 0;
        unsigned long val1 = 0xc;
        int ret = -ENOSYS;
@@ -161,9 +161,15 @@ static noinline __init int memory_fast_detect(void)
        if (ret || val0 != val1)
                return -ENOSYS;
 
-       memory_chunk[0].size = val0;
+       memory_chunk[0].size = val0 + 1;
        return 0;
 }
+#else
+static inline int memory_fast_detect(void)
+{
+       return -ENOSYS;
+}
+#endif
 
 #define ADDR2G (1UL << 31)