]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/tile/include/asm/stack.h
sched/headers: Prepare for new header dependencies before moving code to <linux/sched...
[mirror_ubuntu-artful-kernel.git] / arch / tile / include / asm / stack.h
CommitLineData
867e359b
CM
1/*
2 * Copyright 2010 Tilera Corporation. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
13 */
14
15#ifndef _ASM_TILE_STACK_H
16#define _ASM_TILE_STACK_H
17
18#include <linux/types.h>
19#include <linux/sched.h>
b17b0153
IM
20#include <linux/sched/debug.h>
21
867e359b 22#include <asm/backtrace.h>
76c567fb 23#include <asm/page.h>
867e359b
CM
24#include <hv/hypervisor.h>
25
26/* Everything we need to keep track of a backtrace iteration */
27struct KBacktraceIterator {
28 BacktraceIterator it;
29 struct task_struct *task; /* task we are backtracing */
867e359b
CM
30 int end; /* iteration complete. */
31 int new_context; /* new context is starting */
32 int profile; /* profiling, so stop on async intrpt */
33 int verbose; /* printk extra info (don't want to
34 * do this for profiling) */
35 int is_current; /* backtracing current task */
36};
37
38/* Iteration methods for kernel backtraces */
39
40/*
41 * Initialize a KBacktraceIterator from a task_struct, and optionally from
42 * a set of registers. If the registers are omitted, the process is
43 * assumed to be descheduled, and registers are read from the process's
44 * thread_struct and stack. "verbose" means to printk some additional
45 * information about fault handlers as we pass them on the stack.
46 */
47extern void KBacktraceIterator_init(struct KBacktraceIterator *kbt,
48 struct task_struct *, struct pt_regs *);
49
50/* Initialize iterator based on current stack. */
51extern void KBacktraceIterator_init_current(struct KBacktraceIterator *kbt);
52
0707ad30
CM
53/* Helper method for above. */
54extern void _KBacktraceIterator_init_current(struct KBacktraceIterator *kbt,
55 ulong pc, ulong lr, ulong sp, ulong r52);
56
867e359b
CM
57/* No more frames? */
58extern int KBacktraceIterator_end(struct KBacktraceIterator *kbt);
59
60/* Advance to the next frame. */
61extern void KBacktraceIterator_next(struct KBacktraceIterator *kbt);
62
47ad7b9b
CM
63/* Dump just the contents of the pt_regs structure. */
64extern void tile_show_regs(struct pt_regs *);
65
867e359b
CM
66/*
67 * Dump stack given complete register info. Use only from the
68 * architecture-specific code; show_stack()
47ad7b9b 69 * and dump_stack() are architecture-independent entry points.
867e359b 70 */
47ad7b9b 71extern void tile_show_stack(struct KBacktraceIterator *);
867e359b
CM
72
73#endif /* _ASM_TILE_STACK_H */