diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 2 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7343/irq.c | 3 | ||||
-rw-r--r-- | arch/sh/boards/mach-se/7722/irq.c | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 30 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_64.h | 9 | ||||
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 4 | ||||
-rw-r--r-- | arch/sh/kernel/asm-offsets.c | 1 | ||||
-rw-r--r-- | arch/sh/kernel/signal_32.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/signal_64.c | 4 | ||||
-rw-r--r-- | arch/sh/mm/fault.c | 2 | ||||
-rw-r--r-- | arch/sh/mm/gup.c | 6 | ||||
-rw-r--r-- | arch/sh/mm/hugetlbpage.c | 12 |
13 files changed, 15 insertions, 67 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 0f09f5285d5e..eb4ef274ae9b 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | config SUPERH | 1 | config SUPERH |
2 | def_bool y | 2 | def_bool y |
3 | select ARCH_MIGHT_HAVE_PC_PARPORT | 3 | select ARCH_MIGHT_HAVE_PC_PARPORT |
4 | select EXPERT | 4 | select HAVE_PATA_PLATFORM |
5 | select CLKDEV_LOOKUP | 5 | select CLKDEV_LOOKUP |
6 | select HAVE_IDE if HAS_IOPORT_MAP | 6 | select HAVE_IDE if HAS_IOPORT_MAP |
7 | select HAVE_MEMBLOCK | 7 | select HAVE_MEMBLOCK |
diff --git a/arch/sh/boards/mach-se/7343/irq.c b/arch/sh/boards/mach-se/7343/irq.c index 7646bf0486c2..1087dba9b015 100644 --- a/arch/sh/boards/mach-se/7343/irq.c +++ b/arch/sh/boards/mach-se/7343/irq.c | |||
@@ -14,9 +14,6 @@ | |||
14 | #define DRV_NAME "SE7343-FPGA" | 14 | #define DRV_NAME "SE7343-FPGA" |
15 | #define pr_fmt(fmt) DRV_NAME ": " fmt | 15 | #define pr_fmt(fmt) DRV_NAME ": " fmt |
16 | 16 | ||
17 | #define irq_reg_readl ioread16 | ||
18 | #define irq_reg_writel iowrite16 | ||
19 | |||
20 | #include <linux/init.h> | 17 | #include <linux/init.h> |
21 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
22 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index f5e2af1bf040..00e699232621 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c | |||
@@ -11,9 +11,6 @@ | |||
11 | #define DRV_NAME "SE7722-FPGA" | 11 | #define DRV_NAME "SE7722-FPGA" |
12 | #define pr_fmt(fmt) DRV_NAME ": " fmt | 12 | #define pr_fmt(fmt) DRV_NAME ": " fmt |
13 | 13 | ||
14 | #define irq_reg_readl ioread16 | ||
15 | #define irq_reg_writel iowrite16 | ||
16 | |||
17 | #include <linux/init.h> | 14 | #include <linux/init.h> |
18 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
19 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index cf434c64408d..89c513a982fc 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -62,7 +62,7 @@ static inline unsigned long long neff_sign_extend(unsigned long val) | |||
62 | /* Entries per level */ | 62 | /* Entries per level */ |
63 | #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) | 63 | #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) |
64 | 64 | ||
65 | #define FIRST_USER_ADDRESS 0 | 65 | #define FIRST_USER_ADDRESS 0UL |
66 | 66 | ||
67 | #define PHYS_ADDR_MASK29 0x1fffffff | 67 | #define PHYS_ADDR_MASK29 0x1fffffff |
68 | #define PHYS_ADDR_MASK32 0xffffffff | 68 | #define PHYS_ADDR_MASK32 0xffffffff |
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index 0bce3d81569e..c646e563abce 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -26,8 +26,6 @@ | |||
26 | * and timing control which (together with bit 0) are moved into the | 26 | * and timing control which (together with bit 0) are moved into the |
27 | * old-style PTEA on the parts that support it. | 27 | * old-style PTEA on the parts that support it. |
28 | * | 28 | * |
29 | * XXX: Leave the _PAGE_FILE and _PAGE_WT overhaul for a rainy day. | ||
30 | * | ||
31 | * SH-X2 MMUs and extended PTEs | 29 | * SH-X2 MMUs and extended PTEs |
32 | * | 30 | * |
33 | * SH-X2 supports an extended mode TLB with split data arrays due to the | 31 | * SH-X2 supports an extended mode TLB with split data arrays due to the |
@@ -51,7 +49,6 @@ | |||
51 | #define _PAGE_PRESENT 0x100 /* V-bit : page is valid */ | 49 | #define _PAGE_PRESENT 0x100 /* V-bit : page is valid */ |
52 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ | 50 | #define _PAGE_PROTNONE 0x200 /* software: if not present */ |
53 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ | 51 | #define _PAGE_ACCESSED 0x400 /* software: page referenced */ |
54 | #define _PAGE_FILE _PAGE_WT /* software: pagecache or swap? */ | ||
55 | #define _PAGE_SPECIAL 0x800 /* software: special page */ | 52 | #define _PAGE_SPECIAL 0x800 /* software: special page */ |
56 | 53 | ||
57 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) | 54 | #define _PAGE_SZ_MASK (_PAGE_SZ0 | _PAGE_SZ1) |
@@ -105,14 +102,13 @@ static inline unsigned long copy_ptea_attributes(unsigned long x) | |||
105 | /* Mask which drops unused bits from the PTEL value */ | 102 | /* Mask which drops unused bits from the PTEL value */ |
106 | #if defined(CONFIG_CPU_SH3) | 103 | #if defined(CONFIG_CPU_SH3) |
107 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \ | 104 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED| \ |
108 | _PAGE_FILE | _PAGE_SZ1 | \ | 105 | _PAGE_SZ1 | _PAGE_HW_SHARED) |
109 | _PAGE_HW_SHARED) | ||
110 | #elif defined(CONFIG_X2TLB) | 106 | #elif defined(CONFIG_X2TLB) |
111 | /* Get rid of the legacy PR/SZ bits when using extended mode */ | 107 | /* Get rid of the legacy PR/SZ bits when using extended mode */ |
112 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | \ | 108 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | \ |
113 | _PAGE_FILE | _PAGE_PR_MASK | _PAGE_SZ_MASK) | 109 | _PAGE_PR_MASK | _PAGE_SZ_MASK) |
114 | #else | 110 | #else |
115 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED | _PAGE_FILE) | 111 | #define _PAGE_CLEAR_FLAGS (_PAGE_PROTNONE | _PAGE_ACCESSED) |
116 | #endif | 112 | #endif |
117 | 113 | ||
118 | #define _PAGE_FLAGS_HARDWARE_MASK (phys_addr_mask() & ~(_PAGE_CLEAR_FLAGS)) | 114 | #define _PAGE_FLAGS_HARDWARE_MASK (phys_addr_mask() & ~(_PAGE_CLEAR_FLAGS)) |
@@ -343,7 +339,6 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
343 | #define pte_not_present(pte) (!((pte).pte_low & _PAGE_PRESENT)) | 339 | #define pte_not_present(pte) (!((pte).pte_low & _PAGE_PRESENT)) |
344 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) | 340 | #define pte_dirty(pte) ((pte).pte_low & _PAGE_DIRTY) |
345 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) | 341 | #define pte_young(pte) ((pte).pte_low & _PAGE_ACCESSED) |
346 | #define pte_file(pte) ((pte).pte_low & _PAGE_FILE) | ||
347 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) | 342 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) |
348 | 343 | ||
349 | #ifdef CONFIG_X2TLB | 344 | #ifdef CONFIG_X2TLB |
@@ -445,7 +440,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
445 | * Encode and de-code a swap entry | 440 | * Encode and de-code a swap entry |
446 | * | 441 | * |
447 | * Constraints: | 442 | * Constraints: |
448 | * _PAGE_FILE at bit 0 | ||
449 | * _PAGE_PRESENT at bit 8 | 443 | * _PAGE_PRESENT at bit 8 |
450 | * _PAGE_PROTNONE at bit 9 | 444 | * _PAGE_PROTNONE at bit 9 |
451 | * | 445 | * |
@@ -453,9 +447,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
453 | * swap offset into bits 10:30. For the 64-bit PTE case, we keep the | 447 | * swap offset into bits 10:30. For the 64-bit PTE case, we keep the |
454 | * preserved bits in the low 32-bits and use the upper 32 as the swap | 448 | * preserved bits in the low 32-bits and use the upper 32 as the swap |
455 | * offset (along with a 5-bit type), following the same approach as x86 | 449 | * offset (along with a 5-bit type), following the same approach as x86 |
456 | * PAE. This keeps the logic quite simple, and allows for a full 32 | 450 | * PAE. This keeps the logic quite simple. |
457 | * PTE_FILE_MAX_BITS, as opposed to the 29-bits we're constrained with | ||
458 | * in the pte_low case. | ||
459 | * | 451 | * |
460 | * As is evident by the Alpha code, if we ever get a 64-bit unsigned | 452 | * As is evident by the Alpha code, if we ever get a 64-bit unsigned |
461 | * long (swp_entry_t) to match up with the 64-bit PTEs, this all becomes | 453 | * long (swp_entry_t) to match up with the 64-bit PTEs, this all becomes |
@@ -471,13 +463,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
471 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) | 463 | #define __pte_to_swp_entry(pte) ((swp_entry_t){ (pte).pte_high }) |
472 | #define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) | 464 | #define __swp_entry_to_pte(x) ((pte_t){ 0, (x).val }) |
473 | 465 | ||
474 | /* | ||
475 | * Encode and decode a nonlinear file mapping entry | ||
476 | */ | ||
477 | #define pte_to_pgoff(pte) ((pte).pte_high) | ||
478 | #define pgoff_to_pte(off) ((pte_t) { _PAGE_FILE, (off) }) | ||
479 | |||
480 | #define PTE_FILE_MAX_BITS 32 | ||
481 | #else | 466 | #else |
482 | #define __swp_type(x) ((x).val & 0xff) | 467 | #define __swp_type(x) ((x).val & 0xff) |
483 | #define __swp_offset(x) ((x).val >> 10) | 468 | #define __swp_offset(x) ((x).val >> 10) |
@@ -485,13 +470,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
485 | 470 | ||
486 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 }) | 471 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) >> 1 }) |
487 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 1 }) | 472 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val << 1 }) |
488 | |||
489 | /* | ||
490 | * Encode and decode a nonlinear file mapping entry | ||
491 | */ | ||
492 | #define PTE_FILE_MAX_BITS 29 | ||
493 | #define pte_to_pgoff(pte) (pte_val(pte) >> 1) | ||
494 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 1) | _PAGE_FILE }) | ||
495 | #endif | 473 | #endif |
496 | 474 | ||
497 | #endif /* __ASSEMBLY__ */ | 475 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/sh/include/asm/pgtable_64.h b/arch/sh/include/asm/pgtable_64.h index dda8c82601b9..07424968df62 100644 --- a/arch/sh/include/asm/pgtable_64.h +++ b/arch/sh/include/asm/pgtable_64.h | |||
@@ -107,7 +107,6 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) | |||
107 | #define _PAGE_DEVICE 0x001 /* CB0: if uncacheable, 1->device (i.e. no write-combining or reordering at bus level) */ | 107 | #define _PAGE_DEVICE 0x001 /* CB0: if uncacheable, 1->device (i.e. no write-combining or reordering at bus level) */ |
108 | #define _PAGE_CACHABLE 0x002 /* CB1: uncachable/cachable */ | 108 | #define _PAGE_CACHABLE 0x002 /* CB1: uncachable/cachable */ |
109 | #define _PAGE_PRESENT 0x004 /* software: page referenced */ | 109 | #define _PAGE_PRESENT 0x004 /* software: page referenced */ |
110 | #define _PAGE_FILE 0x004 /* software: only when !present */ | ||
111 | #define _PAGE_SIZE0 0x008 /* SZ0-bit : size of page */ | 110 | #define _PAGE_SIZE0 0x008 /* SZ0-bit : size of page */ |
112 | #define _PAGE_SIZE1 0x010 /* SZ1-bit : size of page */ | 111 | #define _PAGE_SIZE1 0x010 /* SZ1-bit : size of page */ |
113 | #define _PAGE_SHARED 0x020 /* software: reflects PTEH's SH */ | 112 | #define _PAGE_SHARED 0x020 /* software: reflects PTEH's SH */ |
@@ -129,7 +128,7 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) | |||
129 | #define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ | 128 | #define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ |
130 | #define _PAGE_SPECIAL _PAGE_EXT(0x002) | 129 | #define _PAGE_SPECIAL _PAGE_EXT(0x002) |
131 | 130 | ||
132 | #define _PAGE_CLEAR_FLAGS (_PAGE_PRESENT | _PAGE_FILE | _PAGE_SHARED | \ | 131 | #define _PAGE_CLEAR_FLAGS (_PAGE_PRESENT | _PAGE_SHARED | \ |
133 | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_WIRED) | 132 | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_WIRED) |
134 | 133 | ||
135 | /* Mask which drops software flags */ | 134 | /* Mask which drops software flags */ |
@@ -260,7 +259,6 @@ static __inline__ void set_pte(pte_t *pteptr, pte_t pteval) | |||
260 | */ | 259 | */ |
261 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 260 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
262 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 261 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
263 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | ||
264 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } | 262 | static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; } |
265 | static inline int pte_special(pte_t pte){ return pte_val(pte) & _PAGE_SPECIAL; } | 263 | static inline int pte_special(pte_t pte){ return pte_val(pte) & _PAGE_SPECIAL; } |
266 | 264 | ||
@@ -304,11 +302,6 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
304 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | 302 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
305 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | 303 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
306 | 304 | ||
307 | /* Encode and decode a nonlinear file mapping entry */ | ||
308 | #define PTE_FILE_MAX_BITS 29 | ||
309 | #define pte_to_pgoff(pte) (pte_val(pte)) | ||
310 | #define pgoff_to_pte(off) ((pte_t) { (off) | _PAGE_FILE }) | ||
311 | |||
312 | #endif /* !__ASSEMBLY__ */ | 305 | #endif /* !__ASSEMBLY__ */ |
313 | 306 | ||
314 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 307 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index ad27ffa65e2e..657c03919627 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -33,7 +33,6 @@ struct thread_info { | |||
33 | __u32 cpu; | 33 | __u32 cpu; |
34 | int preempt_count; /* 0 => preemptable, <0 => BUG */ | 34 | int preempt_count; /* 0 => preemptable, <0 => BUG */ |
35 | mm_segment_t addr_limit; /* thread address space */ | 35 | mm_segment_t addr_limit; /* thread address space */ |
36 | struct restart_block restart_block; | ||
37 | unsigned long previous_sp; /* sp of previous stack in case | 36 | unsigned long previous_sp; /* sp of previous stack in case |
38 | of nested IRQ stacks */ | 37 | of nested IRQ stacks */ |
39 | __u8 supervisor_stack[0]; | 38 | __u8 supervisor_stack[0]; |
@@ -63,9 +62,6 @@ struct thread_info { | |||
63 | .cpu = 0, \ | 62 | .cpu = 0, \ |
64 | .preempt_count = INIT_PREEMPT_COUNT, \ | 63 | .preempt_count = INIT_PREEMPT_COUNT, \ |
65 | .addr_limit = KERNEL_DS, \ | 64 | .addr_limit = KERNEL_DS, \ |
66 | .restart_block = { \ | ||
67 | .fn = do_no_restart_syscall, \ | ||
68 | }, \ | ||
69 | } | 65 | } |
70 | 66 | ||
71 | #define init_thread_info (init_thread_union.thread_info) | 67 | #define init_thread_info (init_thread_union.thread_info) |
diff --git a/arch/sh/kernel/asm-offsets.c b/arch/sh/kernel/asm-offsets.c index 08a2be775b6c..542225fedb11 100644 --- a/arch/sh/kernel/asm-offsets.c +++ b/arch/sh/kernel/asm-offsets.c | |||
@@ -25,7 +25,6 @@ int main(void) | |||
25 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); | 25 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
26 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); | 26 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); |
27 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); | 27 | DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count)); |
28 | DEFINE(TI_RESTART_BLOCK,offsetof(struct thread_info, restart_block)); | ||
29 | DEFINE(TI_SIZE, sizeof(struct thread_info)); | 28 | DEFINE(TI_SIZE, sizeof(struct thread_info)); |
30 | 29 | ||
31 | #ifdef CONFIG_HIBERNATION | 30 | #ifdef CONFIG_HIBERNATION |
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c index 2f002b24fb92..0b34f2a704fe 100644 --- a/arch/sh/kernel/signal_32.c +++ b/arch/sh/kernel/signal_32.c | |||
@@ -156,7 +156,7 @@ asmlinkage int sys_sigreturn(void) | |||
156 | int r0; | 156 | int r0; |
157 | 157 | ||
158 | /* Always make any pending restarted system calls return -EINTR */ | 158 | /* Always make any pending restarted system calls return -EINTR */ |
159 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 159 | current->restart_block.fn = do_no_restart_syscall; |
160 | 160 | ||
161 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 161 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
162 | goto badframe; | 162 | goto badframe; |
@@ -186,7 +186,7 @@ asmlinkage int sys_rt_sigreturn(void) | |||
186 | int r0; | 186 | int r0; |
187 | 187 | ||
188 | /* Always make any pending restarted system calls return -EINTR */ | 188 | /* Always make any pending restarted system calls return -EINTR */ |
189 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 189 | current->restart_block.fn = do_no_restart_syscall; |
190 | 190 | ||
191 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 191 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
192 | goto badframe; | 192 | goto badframe; |
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c index 897abe7b871e..71993c6a7d94 100644 --- a/arch/sh/kernel/signal_64.c +++ b/arch/sh/kernel/signal_64.c | |||
@@ -260,7 +260,7 @@ asmlinkage int sys_sigreturn(unsigned long r2, unsigned long r3, | |||
260 | long long ret; | 260 | long long ret; |
261 | 261 | ||
262 | /* Always make any pending restarted system calls return -EINTR */ | 262 | /* Always make any pending restarted system calls return -EINTR */ |
263 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 263 | current->restart_block.fn = do_no_restart_syscall; |
264 | 264 | ||
265 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 265 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
266 | goto badframe; | 266 | goto badframe; |
@@ -294,7 +294,7 @@ asmlinkage int sys_rt_sigreturn(unsigned long r2, unsigned long r3, | |||
294 | long long ret; | 294 | long long ret; |
295 | 295 | ||
296 | /* Always make any pending restarted system calls return -EINTR */ | 296 | /* Always make any pending restarted system calls return -EINTR */ |
297 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 297 | current->restart_block.fn = do_no_restart_syscall; |
298 | 298 | ||
299 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) | 299 | if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) |
300 | goto badframe; | 300 | goto badframe; |
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 541dc6101508..a58fec9b55e0 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -353,6 +353,8 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code, | |||
353 | } else { | 353 | } else { |
354 | if (fault & VM_FAULT_SIGBUS) | 354 | if (fault & VM_FAULT_SIGBUS) |
355 | do_sigbus(regs, error_code, address); | 355 | do_sigbus(regs, error_code, address); |
356 | else if (fault & VM_FAULT_SIGSEGV) | ||
357 | bad_area(regs, error_code, address); | ||
356 | else | 358 | else |
357 | BUG(); | 359 | BUG(); |
358 | } | 360 | } |
diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e113bb429e8e..e7af6a65baab 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c | |||
@@ -257,10 +257,8 @@ slow_irqon: | |||
257 | start += nr << PAGE_SHIFT; | 257 | start += nr << PAGE_SHIFT; |
258 | pages += nr; | 258 | pages += nr; |
259 | 259 | ||
260 | down_read(&mm->mmap_sem); | 260 | ret = get_user_pages_unlocked(current, mm, start, |
261 | ret = get_user_pages(current, mm, start, | 261 | (end - start) >> PAGE_SHIFT, write, 0, pages); |
262 | (end - start) >> PAGE_SHIFT, write, 0, pages, NULL); | ||
263 | up_read(&mm->mmap_sem); | ||
264 | 262 | ||
265 | /* Have to be a bit careful with return values */ | 263 | /* Have to be a bit careful with return values */ |
266 | if (nr > 0) { | 264 | if (nr > 0) { |
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index d7762349ea48..534bc978af8a 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -67,12 +67,6 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | |||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
69 | 69 | ||
70 | struct page *follow_huge_addr(struct mm_struct *mm, | ||
71 | unsigned long address, int write) | ||
72 | { | ||
73 | return ERR_PTR(-EINVAL); | ||
74 | } | ||
75 | |||
76 | int pmd_huge(pmd_t pmd) | 70 | int pmd_huge(pmd_t pmd) |
77 | { | 71 | { |
78 | return 0; | 72 | return 0; |
@@ -82,9 +76,3 @@ int pud_huge(pud_t pud) | |||
82 | { | 76 | { |
83 | return 0; | 77 | return 0; |
84 | } | 78 | } |
85 | |||
86 | struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, | ||
87 | pmd_t *pmd, int write) | ||
88 | { | ||
89 | return NULL; | ||
90 | } | ||