Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54015
b: refs/heads/master
c: fe7fdb8
h: refs/heads/master
i:
  54013: 7be6e28
  54011: d5696bd
  54007: 1cebda4
  53999: 25084d7
  53983: e764f20
  53951: 95f816d
  53887: 44251c6
  53759: 0a2949e
v: v3
  • Loading branch information
Sascha Hauer authored and Russell King committed May 3, 2007
1 parent 8053a98 commit c905af7
Show file tree
Hide file tree
Showing 16 changed files with 197 additions and 302 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b11652286a06988f721b506b094d026e8892e2c
refs/heads/master: fe7fdb80e9e576e181b189d0fae62d35cb30fe4d
8 changes: 0 additions & 8 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ config GENERIC_HARDIRQS
bool
default y

config STACKTRACE_SUPPORT
bool
default y

config LOCKDEP_SUPPORT
bool
default y

config TRACE_IRQFLAGS_SUPPORT
bool
default y
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
# Object file lists.

obj-y := compat.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o semaphore.o setup.o signal.o \
sys_arm.o stacktrace.o time.o traps.o
process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
time.o traps.o

obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o
Expand Down
6 changes: 1 addition & 5 deletions trunk/arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,7 @@ __create_page_tables:
* Map some ram to cover our .data and .bss areas.
*/
orr r3, r7, #(KERNEL_RAM_PADDR & 0xff000000)
.if (KERNEL_RAM_PADDR & 0x00f00000)
orr r3, r3, #(KERNEL_RAM_PADDR & 0x00f00000)
.endif
add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> 18
str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> 18]!
ldr r6, =(_end - 1)
Expand All @@ -276,9 +274,7 @@ __create_page_tables:
*/
add r0, r4, #PAGE_OFFSET >> 18
orr r6, r7, #(PHYS_OFFSET & 0xff000000)
.if (PHYS_OFFSET & 0x00f00000)
orr r6, r6, #(PHYS_OFFSET & 0x00f00000)
.endif
orr r6, r6, #(PHYS_OFFSET & 0x00e00000)
str r6, [r0]

#ifdef CONFIG_DEBUG_LL
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
break;

case PTRACE_SET_SYSCALL:
task_thread_info(child)->syscall = data;
ret = 0;
child->ptrace_message = data;
break;

#ifdef CONFIG_CRUNCH
Expand Down Expand Up @@ -817,7 +817,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
ip = regs->ARM_ip;
regs->ARM_ip = why;

current_thread_info()->syscall = scno;
current->ptrace_message = scno;

/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
Expand All @@ -834,5 +834,5 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
}
regs->ARM_ip = ip;

return current_thread_info()->syscall;
return current->ptrace_message;
}
73 changes: 0 additions & 73 deletions trunk/arch/arm/kernel/stacktrace.c

This file was deleted.

9 changes: 0 additions & 9 deletions trunk/arch/arm/kernel/stacktrace.h

This file was deleted.

5 changes: 2 additions & 3 deletions trunk/arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
struct undef_hook *hook;
siginfo_t info;
void __user *pc;
unsigned long flags;

/*
* According to the ARM ARM, PC is 2 or 4 bytes ahead,
Expand All @@ -305,7 +304,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
get_user(instr, (u32 __user *)pc);
}

spin_lock_irqsave(&undef_lock, flags);
spin_lock_irq(&undef_lock);
list_for_each_entry(hook, &undef_hook, node) {
if ((instr & hook->instr_mask) == hook->instr_val &&
(regs->ARM_cpsr & hook->cpsr_mask) == hook->cpsr_val) {
Expand All @@ -315,7 +314,7 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
}
}
}
spin_unlock_irqrestore(&undef_lock, flags);
spin_unlock_irq(&undef_lock);

#ifdef CONFIG_DEBUG_USER
if (user_debug & UDBG_UNDEFINED) {
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/arm/mach-ep93xx/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ struct clk {
u32 enable_mask;
};

static struct clk clk_uart = {
.name = "UARTCLK",
.rate = 14745600,
};
static struct clk clk_pll1 = {
.name = "pll1",
};
Expand All @@ -54,7 +50,6 @@ static struct clk clk_usb_host = {


static struct clk *clocks[] = {
&clk_uart,
&clk_pll1,
&clk_f,
&clk_h,
Expand Down
69 changes: 52 additions & 17 deletions trunk/arch/arm/oprofile/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@
#include <asm/ptrace.h>
#include <asm/uaccess.h>

#include "../kernel/stacktrace.h"

static int report_trace(struct stackframe *frame, void *d)
{
unsigned int *depth = d;

if (*depth) {
oprofile_add_trace(frame->lr);
(*depth)--;
}

return *depth == 0;
}

/*
* The registers we're interested in are at the end of the variable
Expand All @@ -45,6 +32,21 @@ struct frame_tail {
unsigned long lr;
} __attribute__((packed));


#ifdef CONFIG_FRAME_POINTER
static struct frame_tail* kernel_backtrace(struct frame_tail *tail)
{
oprofile_add_trace(tail->lr);

/* frame pointers should strictly progress back up the stack
* (towards higher addresses) */
if (tail >= tail->fp)
return NULL;

return tail->fp-1;
}
#endif

static struct frame_tail* user_backtrace(struct frame_tail *tail)
{
struct frame_tail buftail[2];
Expand All @@ -65,14 +67,47 @@ static struct frame_tail* user_backtrace(struct frame_tail *tail)
return buftail[0].fp-1;
}

/*
* | | /\ Higher addresses
* | |
* --------------- stack base (address of current_thread_info)
* | thread info |
* . .
* | stack |
* --------------- saved regs->ARM_fp value if valid (frame_tail address)
* . .
* --------------- struct pt_regs stored on stack (struct pt_regs *)
* | |
* . .
* | |
* --------------- %esp
* | |
* | | \/ Lower addresses
*
* Thus, &pt_regs <-> stack base restricts the valid(ish) fp values
*/
static int valid_kernel_stack(struct frame_tail *tail, struct pt_regs *regs)
{
unsigned long tailaddr = (unsigned long)tail;
unsigned long stack = (unsigned long)regs;
unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE;

return (tailaddr > stack) && (tailaddr < stack_base);
}

void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
{
struct frame_tail *tail = ((struct frame_tail *) regs->ARM_fp) - 1;
struct frame_tail *tail;

tail = ((struct frame_tail *) regs->ARM_fp) - 1;

if (!user_mode(regs)) {
unsigned long base = ((unsigned long)regs) & ~(THREAD_SIZE - 1);
walk_stackframe(regs->ARM_fp, base, base + THREAD_SIZE,
report_trace, &depth);

#ifdef CONFIG_FRAME_POINTER
while (depth-- && tail && valid_kernel_stack(tail, regs)) {
tail = kernel_backtrace(tail);
}
#endif
return;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/vfp/vfpdouble.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/bitops.h>

#include <asm/div64.h>
#include <asm/ptrace.h>
#include <asm/vfp.h>

#include "vfpinstr.h"
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/vfp/vfpsingle.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/bitops.h>

#include <asm/div64.h>
#include <asm/ptrace.h>
#include <asm/vfp.h>

#include "vfpinstr.h"
Expand Down
Loading

0 comments on commit c905af7

Please sign in to comment.