aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m32r')
-rw-r--r--arch/m32r/include/asm/pgtable-2level.h4
-rw-r--r--arch/m32r/include/asm/pgtable.h13
-rw-r--r--arch/m32r/include/asm/thread_info.h5
-rw-r--r--arch/m32r/kernel/signal.c2
-rw-r--r--arch/m32r/mm/fault.c2
5 files changed, 4 insertions, 22 deletions
diff --git a/arch/m32r/include/asm/pgtable-2level.h b/arch/m32r/include/asm/pgtable-2level.h
index 9cdaf7350ef6..8fd8ee70266a 100644
--- a/arch/m32r/include/asm/pgtable-2level.h
+++ b/arch/m32r/include/asm/pgtable-2level.h
@@ -70,9 +70,5 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
70#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 70#define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
71#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) 71#define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
72 72
73#define PTE_FILE_MAX_BITS 29
74#define pte_to_pgoff(pte) (((pte_val(pte) >> 2) & 0x7f) | (((pte_val(pte) >> 10)) << 7))
75#define pgoff_to_pte(off) ((pte_t) { (((off) & 0x7f) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
76
77#endif /* __KERNEL__ */ 73#endif /* __KERNEL__ */
78#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ 74#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
diff --git a/arch/m32r/include/asm/pgtable.h b/arch/m32r/include/asm/pgtable.h
index 103ce6710f07..8c1fb902a9ce 100644
--- a/arch/m32r/include/asm/pgtable.h
+++ b/arch/m32r/include/asm/pgtable.h
@@ -53,7 +53,7 @@ extern unsigned long empty_zero_page[1024];
53#define PGDIR_MASK (~(PGDIR_SIZE - 1)) 53#define PGDIR_MASK (~(PGDIR_SIZE - 1))
54 54
55#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) 55#define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE)
56#define FIRST_USER_ADDRESS 0 56#define FIRST_USER_ADDRESS 0UL
57 57
58#ifndef __ASSEMBLY__ 58#ifndef __ASSEMBLY__
59/* Just any arbitrary offset to the start of the vmalloc VM area: the 59/* Just any arbitrary offset to the start of the vmalloc VM area: the
@@ -80,8 +80,6 @@ extern unsigned long empty_zero_page[1024];
80 */ 80 */
81 81
82#define _PAGE_BIT_DIRTY 0 /* software: page changed */ 82#define _PAGE_BIT_DIRTY 0 /* software: page changed */
83#define _PAGE_BIT_FILE 0 /* when !present: nonlinear file
84 mapping */
85#define _PAGE_BIT_PRESENT 1 /* Valid: page is valid */ 83#define _PAGE_BIT_PRESENT 1 /* Valid: page is valid */
86#define _PAGE_BIT_GLOBAL 2 /* Global */ 84#define _PAGE_BIT_GLOBAL 2 /* Global */
87#define _PAGE_BIT_LARGE 3 /* Large */ 85#define _PAGE_BIT_LARGE 3 /* Large */
@@ -93,7 +91,6 @@ extern unsigned long empty_zero_page[1024];
93#define _PAGE_BIT_PROTNONE 9 /* software: if not present */ 91#define _PAGE_BIT_PROTNONE 9 /* software: if not present */
94 92
95#define _PAGE_DIRTY (1UL << _PAGE_BIT_DIRTY) 93#define _PAGE_DIRTY (1UL << _PAGE_BIT_DIRTY)
96#define _PAGE_FILE (1UL << _PAGE_BIT_FILE)
97#define _PAGE_PRESENT (1UL << _PAGE_BIT_PRESENT) 94#define _PAGE_PRESENT (1UL << _PAGE_BIT_PRESENT)
98#define _PAGE_GLOBAL (1UL << _PAGE_BIT_GLOBAL) 95#define _PAGE_GLOBAL (1UL << _PAGE_BIT_GLOBAL)
99#define _PAGE_LARGE (1UL << _PAGE_BIT_LARGE) 96#define _PAGE_LARGE (1UL << _PAGE_BIT_LARGE)
@@ -206,14 +203,6 @@ static inline int pte_write(pte_t pte)
206 return pte_val(pte) & _PAGE_WRITE; 203 return pte_val(pte) & _PAGE_WRITE;
207} 204}
208 205
209/*
210 * The following only works if pte_present() is not true.
211 */
212static inline int pte_file(pte_t pte)
213{
214 return pte_val(pte) & _PAGE_FILE;
215}
216
217static inline int pte_special(pte_t pte) 206static inline int pte_special(pte_t pte)
218{ 207{
219 return 0; 208 return 0;
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h
index 00171703402f..32422d0211c3 100644
--- a/arch/m32r/include/asm/thread_info.h
+++ b/arch/m32r/include/asm/thread_info.h
@@ -34,7 +34,6 @@ struct thread_info {
34 0-0xBFFFFFFF for user-thread 34 0-0xBFFFFFFF for user-thread
35 0-0xFFFFFFFF for kernel-thread 35 0-0xFFFFFFFF for kernel-thread
36 */ 36 */
37 struct restart_block restart_block;
38 37
39 __u8 supervisor_stack[0]; 38 __u8 supervisor_stack[0];
40}; 39};
@@ -49,7 +48,6 @@ struct thread_info {
49#define TI_CPU 0x00000010 48#define TI_CPU 0x00000010
50#define TI_PRE_COUNT 0x00000014 49#define TI_PRE_COUNT 0x00000014
51#define TI_ADDR_LIMIT 0x00000018 50#define TI_ADDR_LIMIT 0x00000018
52#define TI_RESTART_BLOCK 0x000001C
53 51
54#endif 52#endif
55 53
@@ -68,9 +66,6 @@ struct thread_info {
68 .cpu = 0, \ 66 .cpu = 0, \
69 .preempt_count = INIT_PREEMPT_COUNT, \ 67 .preempt_count = INIT_PREEMPT_COUNT, \
70 .addr_limit = KERNEL_DS, \ 68 .addr_limit = KERNEL_DS, \
71 .restart_block = { \
72 .fn = do_no_restart_syscall, \
73 }, \
74} 69}
75 70
76#define init_thread_info (init_thread_union.thread_info) 71#define init_thread_info (init_thread_union.thread_info)
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index 95408b8f130a..7736c6660a15 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -48,7 +48,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
48 unsigned int err = 0; 48 unsigned int err = 0;
49 49
50 /* Always make any pending restarted system calls return -EINTR */ 50 /* Always make any pending restarted system calls return -EINTR */
51 current_thread_info()->restart_block.fn = do_no_restart_syscall; 51 current->restart_block.fn = do_no_restart_syscall;
52 52
53#define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) 53#define COPY(x) err |= __get_user(regs->x, &sc->sc_##x)
54 COPY(r4); 54 COPY(r4);
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index e9c6a8014bd6..e3d4d4890104 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -200,6 +200,8 @@ good_area:
200 if (unlikely(fault & VM_FAULT_ERROR)) { 200 if (unlikely(fault & VM_FAULT_ERROR)) {
201 if (fault & VM_FAULT_OOM) 201 if (fault & VM_FAULT_OOM)
202 goto out_of_memory; 202 goto out_of_memory;
203 else if (fault & VM_FAULT_SIGSEGV)
204 goto bad_area;
203 else if (fault & VM_FAULT_SIGBUS) 205 else if (fault & VM_FAULT_SIGBUS)
204 goto do_sigbus; 206 goto do_sigbus;
205 BUG(); 207 BUG();