diff options
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/a.out.h | 20 | ||||
-rw-r--r-- | arch/sh/include/asm/ptrace.h | 9 | ||||
-rw-r--r-- | arch/sh/include/asm/seccomp.h | 10 | ||||
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 51 | ||||
-rw-r--r-- | arch/sh/include/asm/tlb_64.h | 12 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh2/cpu/cache.h | 6 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh2a/cpu/addrspace.h | 10 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh2a/cpu/cache.h | 3 | ||||
-rw-r--r-- | arch/sh/include/cpu-sh2a/cpu/cacheflush.h | 34 |
9 files changed, 109 insertions, 46 deletions
diff --git a/arch/sh/include/asm/a.out.h b/arch/sh/include/asm/a.out.h deleted file mode 100644 index 1f93130e179c..000000000000 --- a/arch/sh/include/asm/a.out.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __ASM_SH_A_OUT_H | ||
2 | #define __ASM_SH_A_OUT_H | ||
3 | |||
4 | struct exec | ||
5 | { | ||
6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | ||
7 | unsigned a_text; /* length of text, in bytes */ | ||
8 | unsigned a_data; /* length of data, in bytes */ | ||
9 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
10 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
11 | unsigned a_entry; /* start address */ | ||
12 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
13 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
14 | }; | ||
15 | |||
16 | #define N_TRSIZE(a) ((a).a_trsize) | ||
17 | #define N_DRSIZE(a) ((a).a_drsize) | ||
18 | #define N_SYMSIZE(a) ((a).a_syms) | ||
19 | |||
20 | #endif /* __ASM_SH_A_OUT_H */ | ||
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index 643ab5a7cf3b..b86aeabba61a 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -104,6 +104,15 @@ struct pt_dspregs { | |||
104 | 104 | ||
105 | extern void show_regs(struct pt_regs *); | 105 | extern void show_regs(struct pt_regs *); |
106 | 106 | ||
107 | /* | ||
108 | * These are defined as per linux/ptrace.h. | ||
109 | */ | ||
110 | struct task_struct; | ||
111 | |||
112 | #define arch_has_single_step() (1) | ||
113 | extern void user_enable_single_step(struct task_struct *); | ||
114 | extern void user_disable_single_step(struct task_struct *); | ||
115 | |||
107 | #ifdef CONFIG_SH_DSP | 116 | #ifdef CONFIG_SH_DSP |
108 | #define task_pt_regs(task) \ | 117 | #define task_pt_regs(task) \ |
109 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ | 118 | ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE \ |
diff --git a/arch/sh/include/asm/seccomp.h b/arch/sh/include/asm/seccomp.h new file mode 100644 index 000000000000..3280ed3802ef --- /dev/null +++ b/arch/sh/include/asm/seccomp.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __ASM_SECCOMP_H | ||
2 | |||
3 | #include <linux/unistd.h> | ||
4 | |||
5 | #define __NR_seccomp_read __NR_read | ||
6 | #define __NR_seccomp_write __NR_write | ||
7 | #define __NR_seccomp_exit __NR_exit | ||
8 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
9 | |||
10 | #endif /* __ASM_SECCOMP_H */ | ||
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index eeb4c747119e..0a894cafb1dd 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -117,24 +117,45 @@ static inline struct thread_info *current_thread_info(void) | |||
117 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 117 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
118 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ | 118 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ |
119 | #define TIF_SINGLESTEP 4 /* singlestepping active */ | 119 | #define TIF_SINGLESTEP 4 /* singlestepping active */ |
120 | #define TIF_SYSCALL_AUDIT 5 | 120 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ |
121 | #define TIF_SECCOMP 6 /* secure computing */ | ||
122 | #define TIF_NOTIFY_RESUME 7 /* callback before returning to user */ | ||
121 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 123 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
122 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 124 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
123 | #define TIF_MEMDIE 18 | 125 | #define TIF_MEMDIE 18 |
124 | #define TIF_FREEZE 19 | 126 | #define TIF_FREEZE 19 /* Freezing for suspend */ |
125 | 127 | ||
126 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 128 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
127 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 129 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
128 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 130 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 131 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
130 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 132 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
131 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 133 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
132 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 134 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
133 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 135 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
134 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 136 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) |
135 | 137 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | |
136 | #define _TIF_WORK_MASK 0x000000FE /* work to do on interrupt/exception return */ | 138 | #define _TIF_FREEZE (1 << TIF_FREEZE) |
137 | #define _TIF_ALLWORK_MASK 0x000000FF /* work to do on any return to u-space */ | 139 | |
140 | /* | ||
141 | * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within a byte, or we | ||
142 | * blow the tst immediate size constraints and need to fix up | ||
143 | * arch/sh/kernel/entry-common.S. | ||
144 | */ | ||
145 | |||
146 | /* work to do in syscall trace */ | ||
147 | #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ | ||
148 | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP) | ||
149 | |||
150 | /* work to do on any return to u-space */ | ||
151 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ | ||
152 | _TIF_NEED_RESCHED | _TIF_SYSCALL_AUDIT | \ | ||
153 | _TIF_SINGLESTEP | _TIF_RESTORE_SIGMASK | \ | ||
154 | _TIF_NOTIFY_RESUME) | ||
155 | |||
156 | /* work to do on interrupt/exception return */ | ||
157 | #define _TIF_WORK_MASK (_TIF_ALLWORK_MASK & ~(_TIF_SYSCALL_TRACE | \ | ||
158 | _TIF_SYSCALL_AUDIT | _TIF_SINGLESTEP)) | ||
138 | 159 | ||
139 | #endif /* __KERNEL__ */ | 160 | #endif /* __KERNEL__ */ |
140 | 161 | ||
diff --git a/arch/sh/include/asm/tlb_64.h b/arch/sh/include/asm/tlb_64.h index 0a96f3af69e3..ef0ae2a28f23 100644 --- a/arch/sh/include/asm/tlb_64.h +++ b/arch/sh/include/asm/tlb_64.h | |||
@@ -21,11 +21,9 @@ | |||
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | 22 | ||
23 | /** | 23 | /** |
24 | * for_each_dtlb_entry | 24 | * for_each_dtlb_entry - Iterate over free (non-wired) DTLB entries |
25 | * | 25 | * |
26 | * @tlb: TLB entry | 26 | * @tlb: TLB entry |
27 | * | ||
28 | * Iterate over free (non-wired) DTLB entries | ||
29 | */ | 27 | */ |
30 | #define for_each_dtlb_entry(tlb) \ | 28 | #define for_each_dtlb_entry(tlb) \ |
31 | for (tlb = cpu_data->dtlb.first; \ | 29 | for (tlb = cpu_data->dtlb.first; \ |
@@ -33,11 +31,9 @@ | |||
33 | tlb += cpu_data->dtlb.step) | 31 | tlb += cpu_data->dtlb.step) |
34 | 32 | ||
35 | /** | 33 | /** |
36 | * for_each_itlb_entry | 34 | * for_each_itlb_entry - Iterate over free (non-wired) ITLB entries |
37 | * | 35 | * |
38 | * @tlb: TLB entry | 36 | * @tlb: TLB entry |
39 | * | ||
40 | * Iterate over free (non-wired) ITLB entries | ||
41 | */ | 37 | */ |
42 | #define for_each_itlb_entry(tlb) \ | 38 | #define for_each_itlb_entry(tlb) \ |
43 | for (tlb = cpu_data->itlb.first; \ | 39 | for (tlb = cpu_data->itlb.first; \ |
@@ -45,11 +41,9 @@ | |||
45 | tlb += cpu_data->itlb.step) | 41 | tlb += cpu_data->itlb.step) |
46 | 42 | ||
47 | /** | 43 | /** |
48 | * __flush_tlb_slot | 44 | * __flush_tlb_slot - Flushes TLB slot @slot. |
49 | * | 45 | * |
50 | * @slot: Address of TLB slot. | 46 | * @slot: Address of TLB slot. |
51 | * | ||
52 | * Flushes TLB slot @slot. | ||
53 | */ | 47 | */ |
54 | static inline void __flush_tlb_slot(unsigned long long slot) | 48 | static inline void __flush_tlb_slot(unsigned long long slot) |
55 | { | 49 | { |
diff --git a/arch/sh/include/cpu-sh2/cpu/cache.h b/arch/sh/include/cpu-sh2/cpu/cache.h index 4e0b16500686..673515bc4135 100644 --- a/arch/sh/include/cpu-sh2/cpu/cache.h +++ b/arch/sh/include/cpu-sh2/cpu/cache.h | |||
@@ -21,11 +21,11 @@ | |||
21 | #define CCR 0xffffffec | 21 | #define CCR 0xffffffec |
22 | 22 | ||
23 | #define CCR_CACHE_CE 0x01 /* Cache enable */ | 23 | #define CCR_CACHE_CE 0x01 /* Cache enable */ |
24 | #define CCR_CACHE_WT 0x06 /* CCR[bit1=1,bit2=1] */ | 24 | #define CCR_CACHE_WT 0x02 /* CCR[bit1=1,bit2=1] */ |
25 | /* 0x00000000-0x7fffffff: Write-through */ | 25 | /* 0x00000000-0x7fffffff: Write-through */ |
26 | /* 0x80000000-0x9fffffff: Write-back */ | 26 | /* 0x80000000-0x9fffffff: Write-back */ |
27 | /* 0xc0000000-0xdfffffff: Write-through */ | 27 | /* 0xc0000000-0xdfffffff: Write-through */ |
28 | #define CCR_CACHE_CB 0x00 /* CCR[bit1=0,bit2=0] */ | 28 | #define CCR_CACHE_CB 0x04 /* CCR[bit1=0,bit2=0] */ |
29 | /* 0x00000000-0x7fffffff: Write-back */ | 29 | /* 0x00000000-0x7fffffff: Write-back */ |
30 | /* 0x80000000-0x9fffffff: Write-through */ | 30 | /* 0x80000000-0x9fffffff: Write-through */ |
31 | /* 0xc0000000-0xdfffffff: Write-back */ | 31 | /* 0xc0000000-0xdfffffff: Write-back */ |
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #define CCR_CACHE_ENABLE CCR_CACHE_CE | 37 | #define CCR_CACHE_ENABLE CCR_CACHE_CE |
38 | #define CCR_CACHE_INVALIDATE CCR_CACHE_CF | 38 | #define CCR_CACHE_INVALIDATE CCR_CACHE_CF |
39 | #define CACHE_PHYSADDR_MASK 0x1ffffc00 | ||
40 | |||
39 | #endif | 41 | #endif |
40 | 42 | ||
41 | #endif /* __ASM_CPU_SH2_CACHE_H */ | 43 | #endif /* __ASM_CPU_SH2_CACHE_H */ |
diff --git a/arch/sh/include/cpu-sh2a/cpu/addrspace.h b/arch/sh/include/cpu-sh2a/cpu/addrspace.h new file mode 100644 index 000000000000..31eb4b58aa6d --- /dev/null +++ b/arch/sh/include/cpu-sh2a/cpu/addrspace.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __ASM_SH_CPU_SH2A_ADDRSPACE_H | ||
2 | #define __ASM_SH_CPU_SH2A_ADDRSPACE_H | ||
3 | |||
4 | #define P0SEG 0x00000000 | ||
5 | #define P1SEG 0x00000000 | ||
6 | #define P2SEG 0x20000000 | ||
7 | #define P3SEG 0x40000000 | ||
8 | #define P4SEG 0x60000000 | ||
9 | |||
10 | #endif /* __ASM_SH_CPU_SH2A_ADDRSPACE_H */ | ||
diff --git a/arch/sh/include/cpu-sh2a/cpu/cache.h b/arch/sh/include/cpu-sh2a/cpu/cache.h index afe228b3f493..defb0baa5a06 100644 --- a/arch/sh/include/cpu-sh2a/cpu/cache.h +++ b/arch/sh/include/cpu-sh2a/cpu/cache.h | |||
@@ -36,5 +36,8 @@ | |||
36 | 36 | ||
37 | #define CCR_CACHE_ENABLE (CCR_CACHE_OCE | CCR_CACHE_ICE) | 37 | #define CCR_CACHE_ENABLE (CCR_CACHE_OCE | CCR_CACHE_ICE) |
38 | #define CCR_CACHE_INVALIDATE (CCR_CACHE_OCI | CCR_CACHE_ICI) | 38 | #define CCR_CACHE_INVALIDATE (CCR_CACHE_OCI | CCR_CACHE_ICI) |
39 | #define CCR_ICACHE_INVALIDATE CCR_CACHE_ICI | ||
40 | #define CCR_OCACHE_INVALIDATE CCR_CACHE_OCI | ||
41 | #define CACHE_PHYSADDR_MASK 0x1ffffc00 | ||
39 | 42 | ||
40 | #endif /* __ASM_CPU_SH2A_CACHE_H */ | 43 | #endif /* __ASM_CPU_SH2A_CACHE_H */ |
diff --git a/arch/sh/include/cpu-sh2a/cpu/cacheflush.h b/arch/sh/include/cpu-sh2a/cpu/cacheflush.h new file mode 100644 index 000000000000..3d3b9205d2ac --- /dev/null +++ b/arch/sh/include/cpu-sh2a/cpu/cacheflush.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __ASM_CPU_SH2A_CACHEFLUSH_H | ||
2 | #define __ASM_CPU_SH2A_CACHEFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * Cache flushing: | ||
6 | * | ||
7 | * - flush_cache_all() flushes entire cache | ||
8 | * - flush_cache_mm(mm) flushes the specified mm context's cache lines | ||
9 | * - flush_cache_dup mm(mm) handles cache flushing when forking | ||
10 | * - flush_cache_page(mm, vmaddr, pfn) flushes a single page | ||
11 | * - flush_cache_range(vma, start, end) flushes a range of pages | ||
12 | * | ||
13 | * - flush_dcache_page(pg) flushes(wback&invalidates) a page for dcache | ||
14 | * - flush_icache_range(start, end) flushes(invalidates) a range for icache | ||
15 | * - flush_icache_page(vma, pg) flushes(invalidates) a page for icache | ||
16 | * | ||
17 | * Caches are indexed (effectively) by physical address on SH-2, so | ||
18 | * we don't need them. | ||
19 | */ | ||
20 | #define flush_cache_all() do { } while (0) | ||
21 | #define flush_cache_mm(mm) do { } while (0) | ||
22 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
23 | #define flush_cache_range(vma, start, end) do { } while (0) | ||
24 | #define flush_cache_page(vma, vmaddr, pfn) do { } while (0) | ||
25 | #define flush_dcache_page(page) do { } while (0) | ||
26 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | ||
27 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | ||
28 | void flush_icache_range(unsigned long start, unsigned long end); | ||
29 | #define flush_icache_page(vma,pg) do { } while (0) | ||
30 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | ||
31 | #define flush_cache_sigtramp(vaddr) do { } while (0) | ||
32 | |||
33 | #define p3_cache_init() do { } while (0) | ||
34 | #endif /* __ASM_CPU_SH2A_CACHEFLUSH_H */ | ||