OSDN Git Service

Merge "Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4'"
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / arch / arm64 / kernel / process.c
index 6f3fb46..fc0a7aa 100644 (file)
@@ -49,6 +49,7 @@
 #include <asm/alternative.h>
 #include <asm/compat.h>
 #include <asm/cacheflush.h>
+#include <asm/exec.h>
 #include <asm/fpsimd.h>
 #include <asm/mmu_context.h>
 #include <asm/processor.h>
@@ -83,6 +84,16 @@ void arch_cpu_idle(void)
        trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
 }
 
+void arch_cpu_idle_enter(void)
+{
+       idle_notifier_call_chain(IDLE_START);
+}
+
+void arch_cpu_idle_exit(void)
+{
+       idle_notifier_call_chain(IDLE_END);
+}
+
 #ifdef CONFIG_HOTPLUG_CPU
 void arch_cpu_idle_dead(void)
 {
@@ -178,7 +189,7 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
         * don't attempt to dump non-kernel addresses or
         * values that are probably just small negative numbers
         */
-       if (addr < PAGE_OFFSET || addr > -256UL)
+       if (addr < KIMAGE_VADDR || addr > -256UL)
                return;
 
        printk("\n%s: %#lx:\n", name, addr);
@@ -203,29 +214,23 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
                        if (probe_kernel_address(p, data)) {
                                printk(" ********");
                        } else {
-                               printk(" %08x", data);
+                               pr_cont(" %08x", data);
                        }
                        ++p;
                }
-               printk("\n");
+               pr_cont("\n");
        }
 }
 
 static void show_extra_register_data(struct pt_regs *regs, int nbytes)
 {
        mm_segment_t fs;
-       unsigned int i;
 
        fs = get_fs();
        set_fs(KERNEL_DS);
        show_data(regs->pc - nbytes, nbytes * 2, "PC");
        show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
        show_data(regs->sp - nbytes, nbytes * 2, "SP");
-       for (i = 0; i < 30; i++) {
-               char name[4];
-               snprintf(name, sizeof(name), "X%u", i);
-               show_data(regs->regs[i] - nbytes, nbytes * 2, name);
-       }
        set_fs(fs);
 }
 
@@ -256,7 +261,7 @@ void __show_regs(struct pt_regs *regs)
                        printk("\n");
        }
        if (!user_mode(regs))
-               show_extra_register_data(regs, 128);
+               show_extra_register_data(regs, 64);
        printk("\n");
 }
 
@@ -379,7 +384,7 @@ static void tls_thread_switch(struct task_struct *next)
 }
 
 /* Restore the UAO state depending on next's addr_limit */
-static void uao_thread_switch(struct task_struct *next)
+void uao_thread_switch(struct task_struct *next)
 {
        if (IS_ENABLED(CONFIG_ARM64_UAO)) {
                if (task_thread_info(next)->addr_limit == KERNEL_DS)