]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
powerpc: Correct DSCR during TM context switch
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index 3d7a50a08f5e17d080f701ff4a14a39da39aa6a1..ee082d771178d463ff259adef107de4845ed84f2 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/lockdep.h>
 #include <linux/memblock.h>
 #include <linux/hugetlb.h>
+#include <linux/memory.h>
 
 #include <asm/io.h>
 #include <asm/kdump.h>
@@ -201,7 +202,8 @@ static void cpu_ready_for_interrupts(void)
        get_paca()->kernel_msr = MSR_KERNEL;
 
        /* Enable AIL if supported */
-       if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
+       if (cpu_has_feature(CPU_FTR_HVMODE) &&
+           cpu_has_feature(CPU_FTR_ARCH_207S)) {
                unsigned long lpcr = mfspr(SPRN_LPCR);
                mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
        }
@@ -340,7 +342,7 @@ void smp_release_cpus(void)
 
        ptr  = (unsigned long *)((unsigned long)&__secondary_hold_spinloop
                        - PHYSICAL_START);
-       *ptr = __pa(generic_secondary_smp_init);
+       *ptr = ppc_function_entry(generic_secondary_smp_init);
 
        /* And wait a bit for them to catch up */
        for (i = 0; i < 100000; i++) {
@@ -779,6 +781,15 @@ void __init setup_per_cpu_areas(void)
 }
 #endif
 
+#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
+unsigned long memory_block_size_bytes(void)
+{
+       if (ppc_md.memory_block_size)
+               return ppc_md.memory_block_size();
+
+       return MIN_MEMORY_BLOCK_SIZE;
+}
+#endif
 
 #if defined(CONFIG_PPC_INDIRECT_PIO) || defined(CONFIG_PPC_INDIRECT_MMIO)
 struct ppc_pci_io ppc_pci_io;