From: Ivan Kokshaysky Date: Sun, 6 May 2007 21:50:38 +0000 (-0700) Subject: ALPHA: "prctl" macros X-Git-Tag: MMI-PSA29.97-13-9~44052 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed58a593dcf6bb9853f711e56f8618f84b7b8cb2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ALPHA: "prctl" macros Files: include/asm-alpha/thread_info.h Provide "prctl" macros for ALPHA. Signed-off-by: Jay Estabrook Signed-off-by: Ivan Kokshaysky Cc: Richard Henderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h index 69ffd93f8e22..eeb3bef91e11 100644 --- a/include/asm-alpha/thread_info.h +++ b/include/asm-alpha/thread_info.h @@ -92,5 +92,27 @@ register struct thread_info *__current_thread_info __asm__("$8"); #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ | _TIF_SYSCALL_TRACE) +#define ALPHA_UAC_SHIFT 6 +#define ALPHA_UAC_MASK (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \ + 1 << TIF_UAC_SIGBUS) + +#define SET_UNALIGN_CTL(task,value) ({ \ + (task)->thread_info->flags = (((task)->thread_info->flags & \ + ~ALPHA_UAC_MASK) \ + | (((value) << ALPHA_UAC_SHIFT) & (1<thread_info->flags & (1 << TIF_UAC_NOPRINT)) \ + >> ALPHA_UAC_SHIFT \ + | ((task)->thread_info->flags & (1 << TIF_UAC_SIGBUS)) \ + >> (ALPHA_UAC_SHIFT + 1) \ + | ((task)->thread_info->flags & (1 << TIF_UAC_NOFIX)) \ + >> (ALPHA_UAC_SHIFT - 1), \ + (int __user *)(value)); \ + }) + #endif /* __KERNEL__ */ #endif /* _ALPHA_THREAD_INFO_H */