swh:1:snp:173f8deb0c56c557784b4fd217e7608ac6197844
Raw File
Tip revision: 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d authored by Linus Torvalds on 01 September 2012, 17:39:58 UTC
Linux 3.6-rc4
Tip revision: 4cbe5a5
ftrace.c
/*
 * Copyright 2012  Google, Inc.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/kernel.h>
#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <linux/percpu.h>
#include <linux/smp.h>
#include <linux/atomic.h>
#include <asm/barrier.h>
#include "internal.h"

void notrace pstore_ftrace_call(unsigned long ip, unsigned long parent_ip)
{
	struct pstore_ftrace_record rec = {};

	if (unlikely(oops_in_progress))
		return;

	rec.ip = ip;
	rec.parent_ip = parent_ip;
	pstore_ftrace_encode_cpu(&rec, raw_smp_processor_id());
	psinfo->write_buf(PSTORE_TYPE_FTRACE, 0, NULL, 0, (void *)&rec,
			  sizeof(rec), psinfo);
}
back to top