2 * Copyright 2012 Google, Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include <linux/kernel.h>
15 #include <linux/compiler.h>
16 #include <linux/irqflags.h>
17 #include <linux/percpu.h>
18 #include <linux/smp.h>
19 #include <linux/atomic.h>
20 #include <asm/barrier.h>
23 void notrace pstore_ftrace_call(unsigned long ip, unsigned long parent_ip)
25 struct pstore_ftrace_record rec = {};
27 if (unlikely(oops_in_progress))
31 rec.parent_ip = parent_ip;
32 pstore_ftrace_encode_cpu(&rec, raw_smp_processor_id());
33 psinfo->write_buf(PSTORE_TYPE_FTRACE, 0, NULL, 0, (void *)&rec,