[HACK] arm64: add cpu information log
authorJeongtae Park <jtp.park@samsung.com>
Fri, 1 Jun 2018 00:14:14 +0000 (09:14 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Tue, 19 Jun 2018 08:43:23 +0000 (17:43 +0900)
Change-Id: I052697b4a5bfa77f9351a5659989d522fba1ab18
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
arch/arm64/include/asm/fpsimd.h
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/process.c

index 82760fc0cd3ecd15c98b20f1006227e4d2e08abe..0c784246a5dd71884ccfdaac14fc4aa4025b4055 100644 (file)
@@ -45,6 +45,7 @@ struct fpsimd_kernel_state {
        __uint128_t vregs[32];
        u32 fpsr;
        u32 fpcr;
+       unsigned int cpu;
        /*
         * indicate the depth of using FP/SIMD registers in kernel mode.
         * above kernel state should be preserved at first time
index b81abcc6d83609b974fabb75e0a33bd462e0b4ac..805b9c746e55184fa6f9dc09fa1fad40019685b4 100644 (file)
@@ -153,6 +153,7 @@ void fpsimd_thread_switch(struct task_struct *next)
        if (atomic_read(&nxt_kst->depth)) {
                fpsimd_load_state((struct fpsimd_state *)nxt_kst);
                this_cpu_write(fpsimd_last_state, (struct fpsimd_state *)nxt_kst);
+               nxt_kst->cpu = smp_processor_id();
        }
 
        if (next->mm) {
index a91a40232c01ff4103acd041f60aff3dd59a59de..f9dddce3720f071c9914b9d22b881ba35d2668f8 100644 (file)
@@ -264,6 +264,10 @@ void __show_regs(struct pt_regs *regs)
                dbg_snapshot_set_enable("log_kevents", false);
        }
 
+       pr_info("TIF_FOREIGN_FPSTATE: %d, FP/SIMD depth %d, cpu: %d\n",
+                       atomic_read(&current->thread.fpsimd_kernel_state.depth),
+                       current->thread.fpsimd_kernel_state.cpu);
+
        show_regs_print_info(KERN_DEFAULT);
        print_symbol("PC is at %s\n", instruction_pointer(regs));
        print_symbol("LR is at %s\n", lr);