Commit 8a60ba0a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull AVR32 updates from Hans-Christian Egtvedt.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
  avr32: uapi: be sure of "_UAPI" prefix for all guard macros
  avr32: add kprobe_ctlblk memory struct
  avr32: fix out-of-range jump in large kernels
  avr32: setup crt for early panic()
parents af2e2f32 e7f2c8c1
Loading
Loading
Loading
Loading
+29 −6
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@
 * published by the Free Software Foundation.
 */
#include <asm/setup.h>
#include <asm/thread_info.h>
#include <asm/sysreg.h>

	/*
	 * The kernel is loaded where we want it to be and all caches
@@ -20,11 +22,6 @@
	.section .init.text,"ax"
	.global _start
_start:
	/* Check if the boot loader actually provided a tag table */
	lddpc	r0, magic_number
	cp.w	r12, r0
	brne	no_tag_table

	/* Initialize .bss */
	lddpc	r2, bss_start_addr
	lddpc   r3, end_addr
@@ -34,6 +31,25 @@ _start:
	cp      r2, r3
	brlo    1b

	/* Initialize status register */
	lddpc	r0, init_sr
	mtsr	SYSREG_SR, r0

	/* Set initial stack pointer */
	lddpc	sp, stack_addr
	sub	sp, -THREAD_SIZE

#ifdef CONFIG_FRAME_POINTER
	/* Mark last stack frame */
	mov	lr, 0
	mov	r7, 0
#endif

	/* Check if the boot loader actually provided a tag table */
	lddpc	r0, magic_number
	cp.w	r12, r0
	brne	no_tag_table

	/*
	 * Save the tag table address for later use. This must be done
	 * _after_ .bss has been initialized...
@@ -53,8 +69,15 @@ bss_start_addr:
	.long   __bss_start
end_addr:
	.long   _end
init_sr:
	.long	0x007f0000	/* Supervisor mode, everything masked */
stack_addr:
	.long	init_thread_union
panic_addr:
	.long	panic

no_tag_table:
	sub	r12, pc, (. - 2f)
	bral	panic
	/* branch to panic() which can be far away with that construct */
	lddpc	pc, panic_addr
2:	.asciz	"Boot loader didn't provide correct magic number\n"
+14 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
typedef u16	kprobe_opcode_t;
#define BREAKPOINT_INSTRUCTION	0xd673	/* breakpoint */
#define MAX_INSN_SIZE		2
#define MAX_STACK_SIZE		64	/* 32 would probably be OK */

#define kretprobe_blacklist_size 0

@@ -26,6 +27,19 @@ struct arch_specific_insn {
	kprobe_opcode_t	insn[MAX_INSN_SIZE];
};

struct prev_kprobe {
	struct kprobe *kp;
	unsigned int status;
};

/* per-cpu kprobe control block */
struct kprobe_ctlblk {
	unsigned int kprobe_status;
	struct prev_kprobe prev_kprobe;
	struct pt_regs jprobe_saved_regs;
	char jprobes_stack[MAX_STACK_SIZE];
};

extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
				    unsigned long val, void *data);
+12 −12
Original line number Diff line number Diff line
@@ -2,35 +2,35 @@
include include/uapi/asm-generic/Kbuild.asm

header-y += auxvec.h
header-y += bitsperlong.h
header-y += byteorder.h
header-y += cachectl.h
header-y += errno.h
header-y += fcntl.h
header-y += ioctl.h
header-y += ioctls.h
header-y += ipcbuf.h
header-y += kvm_para.h
header-y += mman.h
header-y += msgbuf.h
header-y += param.h
header-y += poll.h
header-y += posix_types.h
header-y += ptrace.h
header-y += resource.h
header-y += sembuf.h
header-y += setup.h
header-y += shmbuf.h
header-y += sigcontext.h
header-y += siginfo.h
header-y += signal.h
header-y += socket.h
header-y += sockios.h
header-y += stat.h
header-y += statfs.h
header-y += swab.h
header-y += termbits.h
header-y += termios.h
header-y += types.h
header-y += unistd.h
generic-y += bitsperlong.h
generic-y += errno.h
generic-y += fcntl.h
generic-y += ioctl.h
generic-y += ioctls.h
generic-y += ipcbuf.h
generic-y += kvm_para.h
generic-y += mman.h
generic-y += param.h
generic-y += poll.h
generic-y += resource.h
generic-y += siginfo.h
generic-y += statfs.h
+3 −3
Original line number Diff line number Diff line
#ifndef __ASM_AVR32_AUXVEC_H
#define __ASM_AVR32_AUXVEC_H
#ifndef _UAPI__ASM_AVR32_AUXVEC_H
#define _UAPI__ASM_AVR32_AUXVEC_H

#endif /* __ASM_AVR32_AUXVEC_H */
#endif /* _UAPI__ASM_AVR32_AUXVEC_H */
+0 −1
Original line number Diff line number Diff line
#include <asm-generic/bitsperlong.h>
Loading