diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/Kconfig | 6 | ||||
-rw-r--r-- | arch/sh/boards/board-edosk7760.c | 2 | ||||
-rw-r--r-- | arch/sh/boot/romimage/mmcif-sh7724.c | 9 | ||||
-rw-r--r-- | arch/sh/include/asm/bitops.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/sizes.h | 63 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_32.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_64.h | 3 | ||||
-rw-r--r-- | arch/sh/kernel/crash_dump.c | 22 | ||||
-rw-r--r-- | arch/sh/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/syscalls_32.S | 1 | ||||
-rw-r--r-- | arch/sh/kernel/syscalls_64.S | 1 | ||||
-rw-r--r-- | arch/sh/kernel/vsyscall/vsyscall.c | 6 | ||||
-rw-r--r-- | arch/sh/mm/pmb.c | 43 |
15 files changed, 51 insertions, 129 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 2d264fa84959..9af3c8d0776b 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -23,8 +23,7 @@ config SUPERH | |||
23 | select HAVE_SPARSE_IRQ | 23 | select HAVE_SPARSE_IRQ |
24 | select RTC_LIB | 24 | select RTC_LIB |
25 | select GENERIC_ATOMIC64 | 25 | select GENERIC_ATOMIC64 |
26 | # Support the deprecated APIs until MFD and GPIOLIB catch up. | 26 | select GENERIC_HARDIRQS_NO_DEPRECATED |
27 | select GENERIC_HARDIRQS_NO_DEPRECATED if !MFD_SUPPORT && !GPIOLIB | ||
28 | select GENERIC_IRQ_SHOW | 27 | select GENERIC_IRQ_SHOW |
29 | help | 28 | help |
30 | The SuperH is a RISC processor targeted for use in embedded systems | 29 | The SuperH is a RISC processor targeted for use in embedded systems |
@@ -75,6 +74,9 @@ config GENERIC_CSUM | |||
75 | config GENERIC_FIND_NEXT_BIT | 74 | config GENERIC_FIND_NEXT_BIT |
76 | def_bool y | 75 | def_bool y |
77 | 76 | ||
77 | config GENERIC_FIND_BIT_LE | ||
78 | def_bool y | ||
79 | |||
78 | config GENERIC_HWEIGHT | 80 | config GENERIC_HWEIGHT |
79 | def_bool y | 81 | def_bool y |
80 | 82 | ||
diff --git a/arch/sh/boards/board-edosk7760.c b/arch/sh/boards/board-edosk7760.c index f47ac82da876..e9656a2cc4cc 100644 --- a/arch/sh/boards/board-edosk7760.c +++ b/arch/sh/boards/board-edosk7760.c | |||
@@ -56,7 +56,7 @@ static struct mtd_partition edosk7760_nor_flash_partitions[] = { | |||
56 | }, { | 56 | }, { |
57 | .name = "fs", | 57 | .name = "fs", |
58 | .offset = MTDPART_OFS_APPEND, | 58 | .offset = MTDPART_OFS_APPEND, |
59 | .size = SZ_26M, | 59 | .size = (26 << 20), |
60 | }, { | 60 | }, { |
61 | .name = "other", | 61 | .name = "other", |
62 | .offset = MTDPART_OFS_APPEND, | 62 | .offset = MTDPART_OFS_APPEND, |
diff --git a/arch/sh/boot/romimage/mmcif-sh7724.c b/arch/sh/boot/romimage/mmcif-sh7724.c index c84e7831018d..16b122510c84 100644 --- a/arch/sh/boot/romimage/mmcif-sh7724.c +++ b/arch/sh/boot/romimage/mmcif-sh7724.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/mmc/sh_mmcif.h> | 11 | #include <linux/mmc/sh_mmcif.h> |
12 | #include <linux/mmc/boot.h> | ||
12 | #include <mach/romimage.h> | 13 | #include <mach/romimage.h> |
13 | 14 | ||
14 | #define MMCIF_BASE (void __iomem *)0xa4ca0000 | 15 | #define MMCIF_BASE (void __iomem *)0xa4ca0000 |
@@ -29,7 +30,7 @@ | |||
29 | */ | 30 | */ |
30 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | 31 | asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) |
31 | { | 32 | { |
32 | mmcif_update_progress(MMCIF_PROGRESS_ENTER); | 33 | mmcif_update_progress(MMC_PROGRESS_ENTER); |
33 | 34 | ||
34 | /* enable clock to the MMCIF hardware block */ | 35 | /* enable clock to the MMCIF hardware block */ |
35 | __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); | 36 | __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); |
@@ -52,12 +53,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | |||
52 | /* high drive capability for MMC pins */ | 53 | /* high drive capability for MMC pins */ |
53 | __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); | 54 | __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); |
54 | 55 | ||
55 | mmcif_update_progress(MMCIF_PROGRESS_INIT); | 56 | mmcif_update_progress(MMC_PROGRESS_INIT); |
56 | 57 | ||
57 | /* setup MMCIF hardware */ | 58 | /* setup MMCIF hardware */ |
58 | sh_mmcif_boot_init(MMCIF_BASE); | 59 | sh_mmcif_boot_init(MMCIF_BASE); |
59 | 60 | ||
60 | mmcif_update_progress(MMCIF_PROGRESS_LOAD); | 61 | mmcif_update_progress(MMC_PROGRESS_LOAD); |
61 | 62 | ||
62 | /* load kernel via MMCIF interface */ | 63 | /* load kernel via MMCIF interface */ |
63 | sh_mmcif_boot_do_read(MMCIF_BASE, 512, | 64 | sh_mmcif_boot_do_read(MMCIF_BASE, 512, |
@@ -67,5 +68,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) | |||
67 | /* disable clock to the MMCIF hardware block */ | 68 | /* disable clock to the MMCIF hardware block */ |
68 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); | 69 | __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); |
69 | 70 | ||
70 | mmcif_update_progress(MMCIF_PROGRESS_DONE); | 71 | mmcif_update_progress(MMC_PROGRESS_DONE); |
71 | } | 72 | } |
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h index 98511e4d28cb..90fa3e48b4d6 100644 --- a/arch/sh/include/asm/bitops.h +++ b/arch/sh/include/asm/bitops.h | |||
@@ -94,9 +94,8 @@ static inline unsigned long ffz(unsigned long word) | |||
94 | #include <asm-generic/bitops/hweight.h> | 94 | #include <asm-generic/bitops/hweight.h> |
95 | #include <asm-generic/bitops/lock.h> | 95 | #include <asm-generic/bitops/lock.h> |
96 | #include <asm-generic/bitops/sched.h> | 96 | #include <asm-generic/bitops/sched.h> |
97 | #include <asm-generic/bitops/ext2-non-atomic.h> | 97 | #include <asm-generic/bitops/le.h> |
98 | #include <asm-generic/bitops/ext2-atomic.h> | 98 | #include <asm-generic/bitops/ext2-atomic.h> |
99 | #include <asm-generic/bitops/minix.h> | ||
100 | #include <asm-generic/bitops/fls.h> | 99 | #include <asm-generic/bitops/fls.h> |
101 | #include <asm-generic/bitops/__fls.h> | 100 | #include <asm-generic/bitops/__fls.h> |
102 | #include <asm-generic/bitops/fls64.h> | 101 | #include <asm-generic/bitops/fls64.h> |
diff --git a/arch/sh/include/asm/sizes.h b/arch/sh/include/asm/sizes.h index 0b9fe2d5c36d..dd248c2e1085 100644 --- a/arch/sh/include/asm/sizes.h +++ b/arch/sh/include/asm/sizes.h | |||
@@ -1,62 +1 @@ | |||
1 | /* | #include <asm-generic/sizes.h> | |
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | /* DO NOT EDIT!! - this file automatically generated | ||
17 | * from .s file by awk -f s2h.awk | ||
18 | */ | ||
19 | /* Size definitions | ||
20 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
21 | */ | ||
22 | |||
23 | #ifndef __sizes_h | ||
24 | #define __sizes_h 1 | ||
25 | |||
26 | /* handy sizes */ | ||
27 | #define SZ_16 0x00000010 | ||
28 | #define SZ_32 0x00000020 | ||
29 | #define SZ_64 0x00000040 | ||
30 | #define SZ_128 0x00000080 | ||
31 | #define SZ_256 0x00000100 | ||
32 | #define SZ_512 0x00000200 | ||
33 | |||
34 | #define SZ_1K 0x00000400 | ||
35 | #define SZ_2K 0x00000800 | ||
36 | #define SZ_4K 0x00001000 | ||
37 | #define SZ_8K 0x00002000 | ||
38 | #define SZ_16K 0x00004000 | ||
39 | #define SZ_32K 0x00008000 | ||
40 | #define SZ_64K 0x00010000 | ||
41 | #define SZ_128K 0x00020000 | ||
42 | #define SZ_256K 0x00040000 | ||
43 | #define SZ_512K 0x00080000 | ||
44 | |||
45 | #define SZ_1M 0x00100000 | ||
46 | #define SZ_2M 0x00200000 | ||
47 | #define SZ_4M 0x00400000 | ||
48 | #define SZ_8M 0x00800000 | ||
49 | #define SZ_16M 0x01000000 | ||
50 | #define SZ_26M 0x01a00000 | ||
51 | #define SZ_32M 0x02000000 | ||
52 | #define SZ_64M 0x04000000 | ||
53 | #define SZ_128M 0x08000000 | ||
54 | #define SZ_256M 0x10000000 | ||
55 | #define SZ_512M 0x20000000 | ||
56 | |||
57 | #define SZ_1G 0x40000000 | ||
58 | #define SZ_2G 0x80000000 | ||
59 | |||
60 | #endif | ||
61 | |||
62 | /* END */ | ||
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index b5a74e88028d..ca7765e5f967 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
@@ -372,8 +372,9 @@ | |||
372 | #define __NR_name_to_handle_at 359 | 372 | #define __NR_name_to_handle_at 359 |
373 | #define __NR_open_by_handle_at 360 | 373 | #define __NR_open_by_handle_at 360 |
374 | #define __NR_clock_adjtime 361 | 374 | #define __NR_clock_adjtime 361 |
375 | #define __NR_syncfs 362 | ||
375 | 376 | ||
376 | #define NR_syscalls 362 | 377 | #define NR_syscalls 363 |
377 | 378 | ||
378 | #ifdef __KERNEL__ | 379 | #ifdef __KERNEL__ |
379 | 380 | ||
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index 953da4a52199..a694009bb816 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
@@ -393,10 +393,11 @@ | |||
393 | #define __NR_name_to_handle_at 370 | 393 | #define __NR_name_to_handle_at 370 |
394 | #define __NR_open_by_handle_at 371 | 394 | #define __NR_open_by_handle_at 371 |
395 | #define __NR_clock_adjtime 372 | 395 | #define __NR_clock_adjtime 372 |
396 | #define __NR_syncfs 373 | ||
396 | 397 | ||
397 | #ifdef __KERNEL__ | 398 | #ifdef __KERNEL__ |
398 | 399 | ||
399 | #define NR_syscalls 373 | 400 | #define NR_syscalls 374 |
400 | 401 | ||
401 | #define __ARCH_WANT_IPC_PARSE_VERSION | 402 | #define __ARCH_WANT_IPC_PARSE_VERSION |
402 | #define __ARCH_WANT_OLD_READDIR | 403 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c index 37c97d444576..569e7b171c01 100644 --- a/arch/sh/kernel/crash_dump.c +++ b/arch/sh/kernel/crash_dump.c | |||
@@ -9,28 +9,6 @@ | |||
9 | #include <linux/io.h> | 9 | #include <linux/io.h> |
10 | #include <asm/uaccess.h> | 10 | #include <asm/uaccess.h> |
11 | 11 | ||
12 | /* Stores the physical address of elf header of crash image. */ | ||
13 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
14 | |||
15 | /* | ||
16 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
17 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
18 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
19 | * | ||
20 | * elfcorehdr= specifies the location of elf core header | ||
21 | * stored by the crashed kernel. | ||
22 | */ | ||
23 | static int __init parse_elfcorehdr(char *arg) | ||
24 | { | ||
25 | if (!arg) | ||
26 | return -EINVAL; | ||
27 | |||
28 | elfcorehdr_addr = memparse(arg, &arg); | ||
29 | |||
30 | return 0; | ||
31 | } | ||
32 | early_param("elfcorehdr", parse_elfcorehdr); | ||
33 | |||
34 | /** | 12 | /** |
35 | * copy_oldmem_page - copy one page from "oldmem" | 13 | * copy_oldmem_page - copy one page from "oldmem" |
36 | * @pfn: page frame number to be copied | 14 | * @pfn: page frame number to be copied |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index f39ad57296b7..325f98b1736d 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -32,7 +32,7 @@ void free_thread_xstate(struct task_struct *tsk) | |||
32 | #if THREAD_SHIFT < PAGE_SHIFT | 32 | #if THREAD_SHIFT < PAGE_SHIFT |
33 | static struct kmem_cache *thread_info_cache; | 33 | static struct kmem_cache *thread_info_cache; |
34 | 34 | ||
35 | struct thread_info *alloc_thread_info(struct task_struct *tsk, int node) | 35 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) |
36 | { | 36 | { |
37 | struct thread_info *ti; | 37 | struct thread_info *ti; |
38 | #ifdef CONFIG_DEBUG_STACK_USAGE | 38 | #ifdef CONFIG_DEBUG_STACK_USAGE |
@@ -57,7 +57,7 @@ void thread_info_cache_init(void) | |||
57 | THREAD_SIZE, SLAB_PANIC, NULL); | 57 | THREAD_SIZE, SLAB_PANIC, NULL); |
58 | } | 58 | } |
59 | #else | 59 | #else |
60 | struct thread_info *alloc_thread_info(struct task_struct *tsk) | 60 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) |
61 | { | 61 | { |
62 | #ifdef CONFIG_DEBUG_STACK_USAGE | 62 | #ifdef CONFIG_DEBUG_STACK_USAGE |
63 | gfp_t mask = GFP_KERNEL | __GFP_ZERO; | 63 | gfp_t mask = GFP_KERNEL | __GFP_ZERO; |
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 90a15d29feeb..2130ca674e9b 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -101,6 +101,8 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr) | |||
101 | 101 | ||
102 | attr = bp->attr; | 102 | attr = bp->attr; |
103 | attr.bp_addr = addr; | 103 | attr.bp_addr = addr; |
104 | /* reenable breakpoint */ | ||
105 | attr.disabled = false; | ||
104 | err = modify_user_hw_breakpoint(bp, &attr); | 106 | err = modify_user_hw_breakpoint(bp, &attr); |
105 | if (unlikely(err)) | 107 | if (unlikely(err)) |
106 | return err; | 108 | return err; |
@@ -392,6 +394,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
392 | tmp = 0; | 394 | tmp = 0; |
393 | } else { | 395 | } else { |
394 | unsigned long index; | 396 | unsigned long index; |
397 | ret = init_fpu(child); | ||
398 | if (ret) | ||
399 | break; | ||
395 | index = addr - offsetof(struct user, fpu); | 400 | index = addr - offsetof(struct user, fpu); |
396 | tmp = ((unsigned long *)child->thread.xstate) | 401 | tmp = ((unsigned long *)child->thread.xstate) |
397 | [index >> 2]; | 402 | [index >> 2]; |
@@ -423,6 +428,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
423 | else if (addr >= offsetof(struct user, fpu) && | 428 | else if (addr >= offsetof(struct user, fpu) && |
424 | addr < offsetof(struct user, u_fpvalid)) { | 429 | addr < offsetof(struct user, u_fpvalid)) { |
425 | unsigned long index; | 430 | unsigned long index; |
431 | ret = init_fpu(child); | ||
432 | if (ret) | ||
433 | break; | ||
426 | index = addr - offsetof(struct user, fpu); | 434 | index = addr - offsetof(struct user, fpu); |
427 | set_stopped_child_used_math(child); | 435 | set_stopped_child_used_math(child); |
428 | ((unsigned long *)child->thread.xstate) | 436 | ((unsigned long *)child->thread.xstate) |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 4436eacddb15..c8f97649f354 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -403,6 +403,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
403 | else if ((addr >= offsetof(struct user, fpu)) && | 403 | else if ((addr >= offsetof(struct user, fpu)) && |
404 | (addr < offsetof(struct user, u_fpvalid))) { | 404 | (addr < offsetof(struct user, u_fpvalid))) { |
405 | unsigned long index; | 405 | unsigned long index; |
406 | ret = init_fpu(child); | ||
407 | if (ret) | ||
408 | break; | ||
406 | index = addr - offsetof(struct user, fpu); | 409 | index = addr - offsetof(struct user, fpu); |
407 | tmp = get_fpu_long(child, index); | 410 | tmp = get_fpu_long(child, index); |
408 | } else if (addr == offsetof(struct user, u_fpvalid)) { | 411 | } else if (addr == offsetof(struct user, u_fpvalid)) { |
@@ -442,6 +445,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
442 | else if ((addr >= offsetof(struct user, fpu)) && | 445 | else if ((addr >= offsetof(struct user, fpu)) && |
443 | (addr < offsetof(struct user, u_fpvalid))) { | 446 | (addr < offsetof(struct user, u_fpvalid))) { |
444 | unsigned long index; | 447 | unsigned long index; |
448 | ret = init_fpu(child); | ||
449 | if (ret) | ||
450 | break; | ||
445 | index = addr - offsetof(struct user, fpu); | 451 | index = addr - offsetof(struct user, fpu); |
446 | ret = put_fpu_long(child, index, data); | 452 | ret = put_fpu_long(child, index, data); |
447 | } | 453 | } |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 768fb33fdd35..030966a9305c 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -379,3 +379,4 @@ ENTRY(sys_call_table) | |||
379 | .long sys_name_to_handle_at | 379 | .long sys_name_to_handle_at |
380 | .long sys_open_by_handle_at /* 360 */ | 380 | .long sys_open_by_handle_at /* 360 */ |
381 | .long sys_clock_adjtime | 381 | .long sys_clock_adjtime |
382 | .long sys_syncfs | ||
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 44e7b00c8067..ca0a6142ab63 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -399,3 +399,4 @@ sys_call_table: | |||
399 | .long sys_name_to_handle_at /* 370 */ | 399 | .long sys_name_to_handle_at /* 370 */ |
400 | .long sys_open_by_handle_at | 400 | .long sys_open_by_handle_at |
401 | .long sys_clock_adjtime | 401 | .long sys_clock_adjtime |
402 | .long sys_syncfs | ||
diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index 242117cbad67..1d6d51a1ce79 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c | |||
@@ -94,17 +94,17 @@ const char *arch_vma_name(struct vm_area_struct *vma) | |||
94 | return NULL; | 94 | return NULL; |
95 | } | 95 | } |
96 | 96 | ||
97 | struct vm_area_struct *get_gate_vma(struct task_struct *task) | 97 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
98 | { | 98 | { |
99 | return NULL; | 99 | return NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | int in_gate_area(struct task_struct *task, unsigned long address) | 102 | int in_gate_area(struct mm_struct *mm, unsigned long address) |
103 | { | 103 | { |
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | int in_gate_area_no_task(unsigned long address) | 107 | int in_gate_area_no_mm(unsigned long address) |
108 | { | 108 | { |
109 | return 0; | 109 | return 0; |
110 | } | 110 | } |
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index b20b1b3eee4b..fad52f1f6812 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Privileged Space Mapping Buffer (PMB) Support. | 4 | * Privileged Space Mapping Buffer (PMB) Support. |
5 | * | 5 | * |
6 | * Copyright (C) 2005 - 2010 Paul Mundt | 6 | * Copyright (C) 2005 - 2011 Paul Mundt |
7 | * Copyright (C) 2010 Matt Fleming | 7 | * Copyright (C) 2010 Matt Fleming |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/sysdev.h> | 15 | #include <linux/syscore_ops.h> |
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/bitops.h> | 18 | #include <linux/bitops.h> |
@@ -874,46 +874,31 @@ static int __init pmb_debugfs_init(void) | |||
874 | subsys_initcall(pmb_debugfs_init); | 874 | subsys_initcall(pmb_debugfs_init); |
875 | 875 | ||
876 | #ifdef CONFIG_PM | 876 | #ifdef CONFIG_PM |
877 | static int pmb_sysdev_suspend(struct sys_device *dev, pm_message_t state) | 877 | static void pmb_syscore_resume(void) |
878 | { | 878 | { |
879 | static pm_message_t prev_state; | 879 | struct pmb_entry *pmbe; |
880 | int i; | 880 | int i; |
881 | 881 | ||
882 | /* Restore the PMB after a resume from hibernation */ | 882 | read_lock(&pmb_rwlock); |
883 | if (state.event == PM_EVENT_ON && | ||
884 | prev_state.event == PM_EVENT_FREEZE) { | ||
885 | struct pmb_entry *pmbe; | ||
886 | |||
887 | read_lock(&pmb_rwlock); | ||
888 | 883 | ||
889 | for (i = 0; i < ARRAY_SIZE(pmb_entry_list); i++) { | 884 | for (i = 0; i < ARRAY_SIZE(pmb_entry_list); i++) { |
890 | if (test_bit(i, pmb_map)) { | 885 | if (test_bit(i, pmb_map)) { |
891 | pmbe = &pmb_entry_list[i]; | 886 | pmbe = &pmb_entry_list[i]; |
892 | set_pmb_entry(pmbe); | 887 | set_pmb_entry(pmbe); |
893 | } | ||
894 | } | 888 | } |
895 | |||
896 | read_unlock(&pmb_rwlock); | ||
897 | } | 889 | } |
898 | 890 | ||
899 | prev_state = state; | 891 | read_unlock(&pmb_rwlock); |
900 | |||
901 | return 0; | ||
902 | } | ||
903 | |||
904 | static int pmb_sysdev_resume(struct sys_device *dev) | ||
905 | { | ||
906 | return pmb_sysdev_suspend(dev, PMSG_ON); | ||
907 | } | 892 | } |
908 | 893 | ||
909 | static struct sysdev_driver pmb_sysdev_driver = { | 894 | static struct syscore_ops pmb_syscore_ops = { |
910 | .suspend = pmb_sysdev_suspend, | 895 | .resume = pmb_syscore_resume, |
911 | .resume = pmb_sysdev_resume, | ||
912 | }; | 896 | }; |
913 | 897 | ||
914 | static int __init pmb_sysdev_init(void) | 898 | static int __init pmb_sysdev_init(void) |
915 | { | 899 | { |
916 | return sysdev_driver_register(&cpu_sysdev_class, &pmb_sysdev_driver); | 900 | register_syscore_ops(&pmb_syscore_ops); |
901 | return 0; | ||
917 | } | 902 | } |
918 | subsys_initcall(pmb_sysdev_init); | 903 | subsys_initcall(pmb_sysdev_init); |
919 | #endif | 904 | #endif |