]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
Merge branch 'fix/hda' into for-linus
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index 914389158a9bf65c407ee4436051d513fdaea002..643dcac40fcbc56c8cc3102a74e76a6aae4381eb 100644 (file)
@@ -424,9 +424,17 @@ void __init setup_system(void)
        DBG(" <- setup_system()\n");
 }
 
-#ifdef CONFIG_IRQSTACKS
+static u64 slb0_limit(void)
+{
+       if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) {
+               return 1UL << SID_SHIFT_1T;
+       }
+       return 1UL << SID_SHIFT;
+}
+
 static void __init irqstack_early_init(void)
 {
+       u64 limit = slb0_limit();
        unsigned int i;
 
        /*
@@ -436,15 +444,12 @@ static void __init irqstack_early_init(void)
        for_each_possible_cpu(i) {
                softirq_ctx[i] = (struct thread_info *)
                        __va(lmb_alloc_base(THREAD_SIZE,
-                                           THREAD_SIZE, 0x10000000));
+                                           THREAD_SIZE, limit));
                hardirq_ctx[i] = (struct thread_info *)
                        __va(lmb_alloc_base(THREAD_SIZE,
-                                           THREAD_SIZE, 0x10000000));
+                                           THREAD_SIZE, limit));
        }
 }
-#else
-#define irqstack_early_init()
-#endif
 
 #ifdef CONFIG_PPC_BOOK3E
 static void __init exc_lvl_early_init(void)
@@ -470,7 +475,7 @@ static void __init exc_lvl_early_init(void)
  */
 static void __init emergency_stack_init(void)
 {
-       unsigned long limit;
+       u64 limit;
        unsigned int i;
 
        /*
@@ -482,7 +487,7 @@ static void __init emergency_stack_init(void)
         * bringup, we need to get at them in real mode. This means they
         * must also be within the RMO region.
         */
-       limit = min(0x10000000ULL, lmb.rmo_size);
+       limit = min(slb0_limit(), lmb.rmo_size);
 
        for_each_possible_cpu(i) {
                unsigned long sp;
@@ -573,12 +578,6 @@ void ppc64_boot_msg(unsigned int src, const char *msg)
        printk("[boot]%04x %s\n", src, msg);
 }
 
-void cpu_die(void)
-{
-       if (ppc_md.cpu_die)
-               ppc_md.cpu_die();
-}
-
 #ifdef CONFIG_SMP
 #define PCPU_DYN_SIZE          ()