~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/tile/kernel/stack.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#define KBT_LOOP        3  /* Backtrace entered a loop */
37
37
 
38
38
/* Is address on the specified kernel stack? */
39
 
static int in_kernel_stack(struct KBacktraceIterator *kbt, VirtualAddress sp)
 
39
static int in_kernel_stack(struct KBacktraceIterator *kbt, unsigned long sp)
40
40
{
41
41
        ulong kstack_base = (ulong) kbt->task->stack;
42
42
        if (kstack_base == 0)  /* corrupt task pointer; just follow stack... */
45
45
}
46
46
 
47
47
/* Is address valid for reading? */
48
 
static int valid_address(struct KBacktraceIterator *kbt, VirtualAddress address)
 
48
static int valid_address(struct KBacktraceIterator *kbt, unsigned long address)
49
49
{
50
50
        HV_PTE *l1_pgtable = kbt->pgtable;
51
51
        HV_PTE *l2_pgtable;
97
97
}
98
98
 
99
99
/* Callback for backtracer; basically a glorified memcpy */
100
 
static bool read_memory_func(void *result, VirtualAddress address,
 
100
static bool read_memory_func(void *result, unsigned long address,
101
101
                             unsigned int size, void *vkbt)
102
102
{
103
103
        int retval;
124
124
{
125
125
        const char *fault = NULL;  /* happy compiler */
126
126
        char fault_buf[64];
127
 
        VirtualAddress sp = kbt->it.sp;
 
127
        unsigned long sp = kbt->it.sp;
128
128
        struct pt_regs *p;
129
129
 
130
130
        if (!in_kernel_stack(kbt, sp))
163
163
}
164
164
 
165
165
/* Is the pc pointing to a sigreturn trampoline? */
166
 
static int is_sigreturn(VirtualAddress pc)
 
166
static int is_sigreturn(unsigned long pc)
167
167
{
168
168
        return (pc == VDSO_BASE);
169
169
}
260
260
void KBacktraceIterator_init(struct KBacktraceIterator *kbt,
261
261
                             struct task_struct *t, struct pt_regs *regs)
262
262
{
263
 
        VirtualAddress pc, lr, sp, r52;
 
263
        unsigned long pc, lr, sp, r52;
264
264
        int is_current;
265
265
 
266
266
        /*
331
331
 
332
332
void KBacktraceIterator_next(struct KBacktraceIterator *kbt)
333
333
{
334
 
        VirtualAddress old_pc = kbt->it.pc, old_sp = kbt->it.sp;
 
334
        unsigned long old_pc = kbt->it.pc, old_sp = kbt->it.sp;
335
335
        kbt->new_context = 0;
336
336
        if (!backtrace_next(&kbt->it) && !KBacktraceIterator_restart(kbt)) {
337
337
                kbt->end = KBT_DONE;