aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/processor.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-02-22 22:56:30 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-02-22 22:56:30 -0500
commit94ea5e449ae834af058ef005d16a8ad44fcf13d6 (patch)
tree4152e5cc7cd5535452b2cd074b6ba041abc7c301 /arch/sh/include/asm/processor.h
parent7c1b2c6890a1a033dde4f6991c0a1fcd69cf58ce (diff)
sh: wire up SET/GET_UNALIGN_CTL.
This hooks up the SET/GET_UNALIGN_CTL knobs cribbing the bulk of it from the PPC and ia64 implementations. The thread flags happen to be the logical inverse of what the global fault mode is set to, so this works out pretty cleanly. By default the global fault mode is used, with tasks now being able to override their own settings via prctl(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/processor.h')
-rw-r--r--arch/sh/include/asm/processor.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 87a8d1ef64e4..9605e062840f 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -107,6 +107,13 @@ extern unsigned int xstate_size;
107extern void free_thread_xstate(struct task_struct *); 107extern void free_thread_xstate(struct task_struct *);
108extern struct kmem_cache *task_xstate_cachep; 108extern struct kmem_cache *task_xstate_cachep;
109 109
110/* arch/sh/mm/alignment.c */
111extern int get_unalign_ctl(struct task_struct *, unsigned long addr);
112extern int set_unalign_ctl(struct task_struct *, unsigned int val);
113
114#define GET_UNALIGN_CTL(tsk, addr) get_unalign_ctl((tsk), (addr))
115#define SET_UNALIGN_CTL(tsk, val) set_unalign_ctl((tsk), (val))
116
110/* arch/sh/mm/init.c */ 117/* arch/sh/mm/init.c */
111extern unsigned int mem_init_done; 118extern unsigned int mem_init_done;
112 119
@@ -114,6 +121,11 @@ extern unsigned int mem_init_done;
114const char *get_cpu_subtype(struct sh_cpuinfo *c); 121const char *get_cpu_subtype(struct sh_cpuinfo *c);
115extern const struct seq_operations cpuinfo_op; 122extern const struct seq_operations cpuinfo_op;
116 123
124/* thread_struct flags */
125#define SH_THREAD_UAC_NOPRINT (1 << 0)
126#define SH_THREAD_UAC_SIGBUS (1 << 1)
127#define SH_THREAD_UAC_MASK (SH_THREAD_UAC_NOPRINT | SH_THREAD_UAC_SIGBUS)
128
117/* processor boot mode configuration */ 129/* processor boot mode configuration */
118#define MODE_PIN0 (1 << 0) 130#define MODE_PIN0 (1 << 0)
119#define MODE_PIN1 (1 << 1) 131#define MODE_PIN1 (1 << 1)