You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6: [AVR32] Fix wrong pt_regs in critical exception handler [AVR32] Fix copy_to_user_page() breakage [AVR32] Follow the rules when dealing with the OCD system [AVR32] Clean up OCD register usage [AVR32] Implement irqflags trace and lockdep support [AVR32] Implement stacktrace support [AVR32] Kconfig: Use def_bool instead of bool + default [AVR32] Fix invalid status register bit definitions in asm/ptrace.h [AVR32] Add TIF_RESTORE_SIGMASK to the work masks
This commit is contained in:
@@ -116,15 +116,16 @@ extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);
|
||||
* flush with all configurations.
|
||||
*/
|
||||
extern void flush_icache_range(unsigned long start, unsigned long end);
|
||||
extern void flush_icache_user_range(struct vm_area_struct *vma,
|
||||
struct page *page,
|
||||
unsigned long addr, int len);
|
||||
|
||||
#define copy_to_user_page(vma, page, vaddr, dst, src, len) do { \
|
||||
memcpy(dst, src, len); \
|
||||
flush_icache_user_range(vma, page, vaddr, len); \
|
||||
} while(0)
|
||||
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
|
||||
memcpy(dst, src, len)
|
||||
extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len);
|
||||
|
||||
static inline void copy_from_user_page(struct vm_area_struct *vma,
|
||||
struct page *page, unsigned long vaddr, void *dst,
|
||||
const void *src, unsigned long len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
}
|
||||
|
||||
#endif /* __ASM_AVR32_CACHEFLUSH_H */
|
||||
|
||||
+520
-60
File diff suppressed because it is too large
Load Diff
@@ -139,6 +139,9 @@ extern void show_regs_log_lvl(struct pt_regs *regs, const char *log_lvl);
|
||||
extern void show_stack_log_lvl(struct task_struct *tsk, unsigned long sp,
|
||||
struct pt_regs *regs, const char *log_lvl);
|
||||
|
||||
#define task_pt_regs(p) \
|
||||
((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
|
||||
|
||||
#define KSTK_EIP(tsk) ((tsk)->thread.cpu_context.pc)
|
||||
#define KSTK_ESP(tsk) ((tsk)->thread.cpu_context.ksp)
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
/*
|
||||
* Status Register bits
|
||||
*/
|
||||
#define SR_H 0x40000000
|
||||
#define SR_R 0x20000000
|
||||
#define SR_H 0x20000000
|
||||
#define SR_J 0x10000000
|
||||
#define SR_DM 0x08000000
|
||||
#define SR_D 0x04000000
|
||||
@@ -35,8 +34,7 @@
|
||||
#define SR_I0M 0x00020000
|
||||
#define SR_GM 0x00010000
|
||||
|
||||
#define SR_H_BIT 30
|
||||
#define SR_R_BIT 29
|
||||
#define SR_H_BIT 29
|
||||
#define SR_J_BIT 28
|
||||
#define SR_DM_BIT 27
|
||||
#define SR_D_BIT 26
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
#define SYSREG_I3M_SIZE 1
|
||||
#define SYSREG_EM_OFFSET 21
|
||||
#define SYSREG_EM_SIZE 1
|
||||
#define SYSREG_MODE_OFFSET 22
|
||||
#define SYSREG_MODE_SIZE 3
|
||||
#define SYSREG_M0_OFFSET 22
|
||||
#define SYSREG_M0_SIZE 1
|
||||
#define SYSREG_M1_OFFSET 23
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include <asm/ocd.h>
|
||||
#define finish_arch_switch(prev) \
|
||||
do { \
|
||||
__mtdr(DBGREG_PID, prev->pid); \
|
||||
__mtdr(DBGREG_PID, current->pid); \
|
||||
ocd_write(PID, prev->pid); \
|
||||
ocd_write(PID, current->pid); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,6 +25,11 @@ struct thread_info {
|
||||
unsigned long flags; /* low level flags */
|
||||
__u32 cpu;
|
||||
__s32 preempt_count; /* 0 => preemptable, <0 => BUG */
|
||||
__u32 rar_saved; /* return address... */
|
||||
__u32 rsr_saved; /* ...and status register
|
||||
saved by debug handler
|
||||
when setting up
|
||||
trampoline */
|
||||
struct restart_block restart_block;
|
||||
__u8 supervisor_stack[0];
|
||||
};
|
||||
@@ -78,8 +83,8 @@ static inline struct thread_info *current_thread_info(void)
|
||||
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
|
||||
#define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling
|
||||
TIF_NEED_RESCHED */
|
||||
#define TIF_BREAKPOINT 4 /* true if we should break after return */
|
||||
#define TIF_SINGLE_STEP 5 /* single step after next break */
|
||||
#define TIF_BREAKPOINT 4 /* enter monitor mode on return */
|
||||
#define TIF_SINGLE_STEP 5 /* single step in progress */
|
||||
#define TIF_MEMDIE 6
|
||||
#define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */
|
||||
#define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */
|
||||
@@ -89,18 +94,24 @@ static inline struct thread_info *current_thread_info(void)
|
||||
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
|
||||
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
|
||||
#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
|
||||
#define _TIF_BREAKPOINT (1 << TIF_BREAKPOINT)
|
||||
#define _TIF_SINGLE_STEP (1 << TIF_SINGLE_STEP)
|
||||
#define _TIF_MEMDIE (1 << TIF_MEMDIE)
|
||||
#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
|
||||
#define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP)
|
||||
|
||||
/* XXX: These two masks must never span more than 16 bits! */
|
||||
/* Note: The masks below must never span more than 16 bits! */
|
||||
|
||||
/* work to do on interrupt/exception return */
|
||||
#define _TIF_WORK_MASK 0x0000013e
|
||||
#define _TIF_WORK_MASK \
|
||||
((1 << TIF_SIGPENDING) \
|
||||
| (1 << TIF_NEED_RESCHED) \
|
||||
| (1 << TIF_POLLING_NRFLAG) \
|
||||
| (1 << TIF_BREAKPOINT) \
|
||||
| (1 << TIF_RESTORE_SIGMASK))
|
||||
|
||||
/* work to do on any return to userspace */
|
||||
#define _TIF_ALLWORK_MASK 0x0000013f
|
||||
#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK | (1 << TIF_SYSCALL_TRACE))
|
||||
/* work to do on return from debug mode */
|
||||
#define _TIF_DBGWORK_MASK 0x0000017e
|
||||
#define _TIF_DBGWORK_MASK (_TIF_WORK_MASK & ~(1 << TIF_BREAKPOINT))
|
||||
|
||||
#endif /* __ASM_AVR32_THREAD_INFO_H */
|
||||
|
||||
Reference in New Issue
Block a user