diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 13:02:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 13:02:14 -0400 |
commit | 9fd815b55f31be48dbb3dd23922587d247a4e497 (patch) | |
tree | 63814130acf3e472cc660ae71208c146f16dc5d6 /arch/s390 | |
parent | 31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 (diff) | |
parent | ed87b27e00d2ca240f62f3903583a2f1541fb9ef (diff) |
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (22 commits)
[S390] Update default configuration.
[S390] hibernate: Do real CPU swap at resume time
[S390] dasd: tolerate devices that have no feature codes
[S390] zcrypt: Do not add/remove devices in s/r callbacks
[S390] hibernate: make sure pfn_is_nosave handles lowcore pages
[S390] smp: introduce LC_ORDER and simplify lowcore handling
[S390] ptrace: use common code for simple peek/poke operations
[S390] fix disabled_wait inline assembly clobber list
[S390] Change kernel_page_present coding style.
[S390] hibernation: reset system after resume
[S390] hibernation: fix guest page hinting related crash
[S390] Get rid of init_module/delete_module compat functions.
[S390] Convert sys_execve to function with parameters.
[S390] Convert sys_clone to function with parameters.
[S390] qdio: change state of all primed input buffers
[S390] qdio: reduce per device debug messages
[S390] cio: introduce consistent subchannel scanning
[S390] cio: idset use actual number of ssids
[S390] cio: dont kfree vmalloced memory
[S390] cio: introduce css_settle
...
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/defconfig | 37 | ||||
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 9 | ||||
-rw-r--r-- | arch/s390/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/asm-offsets.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 83 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 27 | ||||
-rw-r--r-- | arch/s390/kernel/entry.h | 6 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 40 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 19 | ||||
-rw-r--r-- | arch/s390/kernel/sclp.S | 5 | ||||
-rw-r--r-- | arch/s390/kernel/smp.c | 50 | ||||
-rw-r--r-- | arch/s390/kernel/suspend.c | 24 | ||||
-rw-r--r-- | arch/s390/kernel/swsusp_asm64.S | 102 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 8 | ||||
-rw-r--r-- | arch/s390/mm/page-states.c | 52 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 17 |
17 files changed, 259 insertions, 233 deletions
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index 4e91a2573cc4..ab4464486b7a 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.30 | 3 | # Linux kernel version: 2.6.31 |
4 | # Mon Jun 22 11:08:16 2009 | 4 | # Tue Sep 22 17:43:13 2009 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -24,6 +24,7 @@ CONFIG_PGSTE=y | |||
24 | CONFIG_VIRT_CPU_ACCOUNTING=y | 24 | CONFIG_VIRT_CPU_ACCOUNTING=y |
25 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y | 25 | CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
26 | CONFIG_S390=y | 26 | CONFIG_S390=y |
27 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
28 | CONFIG_CONSTRUCTORS=y | 29 | CONFIG_CONSTRUCTORS=y |
29 | 30 | ||
@@ -48,11 +49,12 @@ CONFIG_AUDIT=y | |||
48 | # | 49 | # |
49 | # RCU Subsystem | 50 | # RCU Subsystem |
50 | # | 51 | # |
51 | CONFIG_CLASSIC_RCU=y | 52 | CONFIG_TREE_RCU=y |
52 | # CONFIG_TREE_RCU is not set | 53 | # CONFIG_TREE_PREEMPT_RCU is not set |
53 | # CONFIG_PREEMPT_RCU is not set | 54 | # CONFIG_RCU_TRACE is not set |
55 | CONFIG_RCU_FANOUT=64 | ||
56 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
54 | # CONFIG_TREE_RCU_TRACE is not set | 57 | # CONFIG_TREE_RCU_TRACE is not set |
55 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
56 | CONFIG_IKCONFIG=y | 58 | CONFIG_IKCONFIG=y |
57 | CONFIG_IKCONFIG_PROC=y | 59 | CONFIG_IKCONFIG_PROC=y |
58 | CONFIG_LOG_BUF_SHIFT=17 | 60 | CONFIG_LOG_BUF_SHIFT=17 |
@@ -103,11 +105,12 @@ CONFIG_TIMERFD=y | |||
103 | CONFIG_EVENTFD=y | 105 | CONFIG_EVENTFD=y |
104 | CONFIG_SHMEM=y | 106 | CONFIG_SHMEM=y |
105 | CONFIG_AIO=y | 107 | CONFIG_AIO=y |
106 | CONFIG_HAVE_PERF_COUNTERS=y | 108 | CONFIG_HAVE_PERF_EVENTS=y |
107 | 109 | ||
108 | # | 110 | # |
109 | # Performance Counters | 111 | # Kernel Performance Events And Counters |
110 | # | 112 | # |
113 | # CONFIG_PERF_EVENTS is not set | ||
111 | # CONFIG_PERF_COUNTERS is not set | 114 | # CONFIG_PERF_COUNTERS is not set |
112 | CONFIG_VM_EVENT_COUNTERS=y | 115 | CONFIG_VM_EVENT_COUNTERS=y |
113 | # CONFIG_STRIP_ASM_SYMS is not set | 116 | # CONFIG_STRIP_ASM_SYMS is not set |
@@ -116,7 +119,6 @@ CONFIG_SLAB=y | |||
116 | # CONFIG_SLUB is not set | 119 | # CONFIG_SLUB is not set |
117 | # CONFIG_SLOB is not set | 120 | # CONFIG_SLOB is not set |
118 | # CONFIG_PROFILING is not set | 121 | # CONFIG_PROFILING is not set |
119 | # CONFIG_MARKERS is not set | ||
120 | CONFIG_HAVE_OPROFILE=y | 122 | CONFIG_HAVE_OPROFILE=y |
121 | CONFIG_KPROBES=y | 123 | CONFIG_KPROBES=y |
122 | CONFIG_HAVE_SYSCALL_WRAPPERS=y | 124 | CONFIG_HAVE_SYSCALL_WRAPPERS=y |
@@ -176,6 +178,7 @@ CONFIG_NO_HZ=y | |||
176 | CONFIG_HIGH_RES_TIMERS=y | 178 | CONFIG_HIGH_RES_TIMERS=y |
177 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 179 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
178 | CONFIG_64BIT=y | 180 | CONFIG_64BIT=y |
181 | # CONFIG_KTIME_SCALAR is not set | ||
179 | CONFIG_SMP=y | 182 | CONFIG_SMP=y |
180 | CONFIG_NR_CPUS=32 | 183 | CONFIG_NR_CPUS=32 |
181 | CONFIG_HOTPLUG_CPU=y | 184 | CONFIG_HOTPLUG_CPU=y |
@@ -257,7 +260,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9 | |||
257 | CONFIG_PFAULT=y | 260 | CONFIG_PFAULT=y |
258 | # CONFIG_SHARED_KERNEL is not set | 261 | # CONFIG_SHARED_KERNEL is not set |
259 | # CONFIG_CMM is not set | 262 | # CONFIG_CMM is not set |
260 | # CONFIG_PAGE_STATES is not set | ||
261 | # CONFIG_APPLDATA_BASE is not set | 263 | # CONFIG_APPLDATA_BASE is not set |
262 | CONFIG_HZ_100=y | 264 | CONFIG_HZ_100=y |
263 | # CONFIG_HZ_250 is not set | 265 | # CONFIG_HZ_250 is not set |
@@ -280,6 +282,7 @@ CONFIG_PM_SLEEP_SMP=y | |||
280 | CONFIG_PM_SLEEP=y | 282 | CONFIG_PM_SLEEP=y |
281 | CONFIG_HIBERNATION=y | 283 | CONFIG_HIBERNATION=y |
282 | CONFIG_PM_STD_PARTITION="" | 284 | CONFIG_PM_STD_PARTITION="" |
285 | # CONFIG_PM_RUNTIME is not set | ||
283 | CONFIG_NET=y | 286 | CONFIG_NET=y |
284 | 287 | ||
285 | # | 288 | # |
@@ -394,6 +397,7 @@ CONFIG_IP_SCTP=m | |||
394 | # CONFIG_SCTP_HMAC_NONE is not set | 397 | # CONFIG_SCTP_HMAC_NONE is not set |
395 | # CONFIG_SCTP_HMAC_SHA1 is not set | 398 | # CONFIG_SCTP_HMAC_SHA1 is not set |
396 | CONFIG_SCTP_HMAC_MD5=y | 399 | CONFIG_SCTP_HMAC_MD5=y |
400 | # CONFIG_RDS is not set | ||
397 | # CONFIG_TIPC is not set | 401 | # CONFIG_TIPC is not set |
398 | # CONFIG_ATM is not set | 402 | # CONFIG_ATM is not set |
399 | # CONFIG_BRIDGE is not set | 403 | # CONFIG_BRIDGE is not set |
@@ -487,6 +491,7 @@ CONFIG_CCW=y | |||
487 | # Generic Driver Options | 491 | # Generic Driver Options |
488 | # | 492 | # |
489 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | 493 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" |
494 | # CONFIG_DEVTMPFS is not set | ||
490 | CONFIG_STANDALONE=y | 495 | CONFIG_STANDALONE=y |
491 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 496 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
492 | CONFIG_FW_LOADER=y | 497 | CONFIG_FW_LOADER=y |
@@ -501,6 +506,7 @@ CONFIG_BLK_DEV=y | |||
501 | CONFIG_BLK_DEV_LOOP=m | 506 | CONFIG_BLK_DEV_LOOP=m |
502 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 507 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
503 | CONFIG_BLK_DEV_NBD=m | 508 | CONFIG_BLK_DEV_NBD=m |
509 | # CONFIG_BLK_DEV_OSD is not set | ||
504 | CONFIG_BLK_DEV_RAM=y | 510 | CONFIG_BLK_DEV_RAM=y |
505 | CONFIG_BLK_DEV_RAM_COUNT=16 | 511 | CONFIG_BLK_DEV_RAM_COUNT=16 |
506 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 512 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
@@ -594,8 +600,11 @@ CONFIG_BLK_DEV_DM=y | |||
594 | CONFIG_DM_CRYPT=y | 600 | CONFIG_DM_CRYPT=y |
595 | CONFIG_DM_SNAPSHOT=y | 601 | CONFIG_DM_SNAPSHOT=y |
596 | CONFIG_DM_MIRROR=y | 602 | CONFIG_DM_MIRROR=y |
603 | # CONFIG_DM_LOG_USERSPACE is not set | ||
597 | CONFIG_DM_ZERO=y | 604 | CONFIG_DM_ZERO=y |
598 | CONFIG_DM_MULTIPATH=m | 605 | CONFIG_DM_MULTIPATH=m |
606 | # CONFIG_DM_MULTIPATH_QL is not set | ||
607 | # CONFIG_DM_MULTIPATH_ST is not set | ||
599 | # CONFIG_DM_DELAY is not set | 608 | # CONFIG_DM_DELAY is not set |
600 | # CONFIG_DM_UEVENT is not set | 609 | # CONFIG_DM_UEVENT is not set |
601 | CONFIG_NETDEVICES=y | 610 | CONFIG_NETDEVICES=y |
@@ -615,7 +624,6 @@ CONFIG_NET_ETHERNET=y | |||
615 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | 624 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
616 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | 625 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
617 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | 626 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
618 | # CONFIG_KS8842 is not set | ||
619 | CONFIG_NETDEV_1000=y | 627 | CONFIG_NETDEV_1000=y |
620 | CONFIG_NETDEV_10000=y | 628 | CONFIG_NETDEV_10000=y |
621 | # CONFIG_TR is not set | 629 | # CONFIG_TR is not set |
@@ -678,6 +686,7 @@ CONFIG_SCLP_CONSOLE=y | |||
678 | CONFIG_SCLP_VT220_TTY=y | 686 | CONFIG_SCLP_VT220_TTY=y |
679 | CONFIG_SCLP_VT220_CONSOLE=y | 687 | CONFIG_SCLP_VT220_CONSOLE=y |
680 | CONFIG_SCLP_CPI=m | 688 | CONFIG_SCLP_CPI=m |
689 | CONFIG_SCLP_ASYNC=m | ||
681 | CONFIG_S390_TAPE=m | 690 | CONFIG_S390_TAPE=m |
682 | 691 | ||
683 | # | 692 | # |
@@ -737,6 +746,7 @@ CONFIG_FS_POSIX_ACL=y | |||
737 | # CONFIG_GFS2_FS is not set | 746 | # CONFIG_GFS2_FS is not set |
738 | # CONFIG_OCFS2_FS is not set | 747 | # CONFIG_OCFS2_FS is not set |
739 | # CONFIG_BTRFS_FS is not set | 748 | # CONFIG_BTRFS_FS is not set |
749 | # CONFIG_NILFS2_FS is not set | ||
740 | CONFIG_FILE_LOCKING=y | 750 | CONFIG_FILE_LOCKING=y |
741 | CONFIG_FSNOTIFY=y | 751 | CONFIG_FSNOTIFY=y |
742 | CONFIG_DNOTIFY=y | 752 | CONFIG_DNOTIFY=y |
@@ -798,7 +808,6 @@ CONFIG_MISC_FILESYSTEMS=y | |||
798 | # CONFIG_SYSV_FS is not set | 808 | # CONFIG_SYSV_FS is not set |
799 | # CONFIG_UFS_FS is not set | 809 | # CONFIG_UFS_FS is not set |
800 | # CONFIG_EXOFS_FS is not set | 810 | # CONFIG_EXOFS_FS is not set |
801 | # CONFIG_NILFS2_FS is not set | ||
802 | CONFIG_NETWORK_FILESYSTEMS=y | 811 | CONFIG_NETWORK_FILESYSTEMS=y |
803 | CONFIG_NFS_FS=y | 812 | CONFIG_NFS_FS=y |
804 | CONFIG_NFS_V3=y | 813 | CONFIG_NFS_V3=y |
@@ -885,11 +894,13 @@ CONFIG_DEBUG_MEMORY_INIT=y | |||
885 | # CONFIG_DEBUG_LIST is not set | 894 | # CONFIG_DEBUG_LIST is not set |
886 | # CONFIG_DEBUG_SG is not set | 895 | # CONFIG_DEBUG_SG is not set |
887 | # CONFIG_DEBUG_NOTIFIERS is not set | 896 | # CONFIG_DEBUG_NOTIFIERS is not set |
897 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
888 | # CONFIG_RCU_TORTURE_TEST is not set | 898 | # CONFIG_RCU_TORTURE_TEST is not set |
889 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 899 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
890 | # CONFIG_KPROBES_SANITY_TEST is not set | 900 | # CONFIG_KPROBES_SANITY_TEST is not set |
891 | # CONFIG_BACKTRACE_SELF_TEST is not set | 901 | # CONFIG_BACKTRACE_SELF_TEST is not set |
892 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | 902 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set |
903 | CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y | ||
893 | # CONFIG_LKDTM is not set | 904 | # CONFIG_LKDTM is not set |
894 | # CONFIG_FAULT_INJECTION is not set | 905 | # CONFIG_FAULT_INJECTION is not set |
895 | # CONFIG_LATENCYTOP is not set | 906 | # CONFIG_LATENCYTOP is not set |
@@ -979,11 +990,13 @@ CONFIG_CRYPTO_PCBC=m | |||
979 | # | 990 | # |
980 | CONFIG_CRYPTO_HMAC=m | 991 | CONFIG_CRYPTO_HMAC=m |
981 | # CONFIG_CRYPTO_XCBC is not set | 992 | # CONFIG_CRYPTO_XCBC is not set |
993 | CONFIG_CRYPTO_VMAC=m | ||
982 | 994 | ||
983 | # | 995 | # |
984 | # Digest | 996 | # Digest |
985 | # | 997 | # |
986 | CONFIG_CRYPTO_CRC32C=m | 998 | CONFIG_CRYPTO_CRC32C=m |
999 | CONFIG_CRYPTO_GHASH=m | ||
987 | # CONFIG_CRYPTO_MD4 is not set | 1000 | # CONFIG_CRYPTO_MD4 is not set |
988 | CONFIG_CRYPTO_MD5=m | 1001 | CONFIG_CRYPTO_MD5=m |
989 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1002 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index 6bc9426a6fbf..f2ef4b619ce1 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -86,6 +86,7 @@ | |||
86 | #define __LC_PGM_OLD_PSW 0x0150 | 86 | #define __LC_PGM_OLD_PSW 0x0150 |
87 | #define __LC_MCK_OLD_PSW 0x0160 | 87 | #define __LC_MCK_OLD_PSW 0x0160 |
88 | #define __LC_IO_OLD_PSW 0x0170 | 88 | #define __LC_IO_OLD_PSW 0x0170 |
89 | #define __LC_RESTART_PSW 0x01a0 | ||
89 | #define __LC_EXT_NEW_PSW 0x01b0 | 90 | #define __LC_EXT_NEW_PSW 0x01b0 |
90 | #define __LC_SVC_NEW_PSW 0x01c0 | 91 | #define __LC_SVC_NEW_PSW 0x01c0 |
91 | #define __LC_PGM_NEW_PSW 0x01d0 | 92 | #define __LC_PGM_NEW_PSW 0x01d0 |
@@ -189,6 +190,14 @@ union save_area { | |||
189 | #define SAVE_AREA_BASE SAVE_AREA_BASE_S390X | 190 | #define SAVE_AREA_BASE SAVE_AREA_BASE_S390X |
190 | #endif | 191 | #endif |
191 | 192 | ||
193 | #ifndef __s390x__ | ||
194 | #define LC_ORDER 0 | ||
195 | #else | ||
196 | #define LC_ORDER 1 | ||
197 | #endif | ||
198 | |||
199 | #define LC_PAGES (1UL << LC_ORDER) | ||
200 | |||
192 | struct _lowcore | 201 | struct _lowcore |
193 | { | 202 | { |
194 | #ifndef __s390x__ | 203 | #ifndef __s390x__ |
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index cf8eed3fa779..b42715458312 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h | |||
@@ -295,7 +295,7 @@ static inline void ATTRIB_NORET disabled_wait(unsigned long code) | |||
295 | " oi 0x384(1),0x10\n"/* fake protection bit */ | 295 | " oi 0x384(1),0x10\n"/* fake protection bit */ |
296 | " lpswe 0(%1)" | 296 | " lpswe 0(%1)" |
297 | : "=m" (ctl_buf) | 297 | : "=m" (ctl_buf) |
298 | : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0"); | 298 | : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0", "1"); |
299 | #endif /* __s390x__ */ | 299 | #endif /* __s390x__ */ |
300 | while (1); | 300 | while (1); |
301 | } | 301 | } |
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c index fa9905ce7d0b..63e46433e81d 100644 --- a/arch/s390/kernel/asm-offsets.c +++ b/arch/s390/kernel/asm-offsets.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/kbuild.h> | 8 | #include <linux/kbuild.h> |
9 | #include <asm/vdso.h> | 9 | #include <asm/vdso.h> |
10 | #include <asm/sigp.h> | ||
10 | 11 | ||
11 | int main(void) | 12 | int main(void) |
12 | { | 13 | { |
@@ -59,6 +60,10 @@ int main(void) | |||
59 | DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); | 60 | DEFINE(CLOCK_REALTIME, CLOCK_REALTIME); |
60 | DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); | 61 | DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC); |
61 | DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); | 62 | DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC); |
62 | 63 | /* constants for SIGP */ | |
64 | DEFINE(__SIGP_STOP, sigp_stop); | ||
65 | DEFINE(__SIGP_RESTART, sigp_restart); | ||
66 | DEFINE(__SIGP_SENSE, sigp_sense); | ||
67 | DEFINE(__SIGP_INITIAL_CPU_RESET, sigp_initial_cpu_reset); | ||
63 | return 0; | 68 | return 0; |
64 | } | 69 | } |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 9ab188d67a3d..5519cb745106 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -443,66 +443,28 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) | |||
443 | * sys32_execve() executes a new program after the asm stub has set | 443 | * sys32_execve() executes a new program after the asm stub has set |
444 | * things up for us. This should basically do what I want it to. | 444 | * things up for us. This should basically do what I want it to. |
445 | */ | 445 | */ |
446 | asmlinkage long sys32_execve(void) | 446 | asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv, |
447 | compat_uptr_t __user *envp) | ||
447 | { | 448 | { |
448 | struct pt_regs *regs = task_pt_regs(current); | 449 | struct pt_regs *regs = task_pt_regs(current); |
449 | char *filename; | 450 | char *filename; |
450 | unsigned long result; | 451 | long rc; |
451 | int rc; | 452 | |
452 | 453 | filename = getname(name); | |
453 | filename = getname(compat_ptr(regs->orig_gpr2)); | 454 | rc = PTR_ERR(filename); |
454 | if (IS_ERR(filename)) { | 455 | if (IS_ERR(filename)) |
455 | result = PTR_ERR(filename); | 456 | return rc; |
456 | goto out; | 457 | rc = compat_do_execve(filename, argv, envp, regs); |
457 | } | 458 | if (rc) |
458 | rc = compat_do_execve(filename, compat_ptr(regs->gprs[3]), | 459 | goto out; |
459 | compat_ptr(regs->gprs[4]), regs); | ||
460 | if (rc) { | ||
461 | result = rc; | ||
462 | goto out_putname; | ||
463 | } | ||
464 | current->thread.fp_regs.fpc=0; | 460 | current->thread.fp_regs.fpc=0; |
465 | asm volatile("sfpc %0,0" : : "d" (0)); | 461 | asm volatile("sfpc %0,0" : : "d" (0)); |
466 | result = regs->gprs[2]; | 462 | rc = regs->gprs[2]; |
467 | out_putname: | ||
468 | putname(filename); | ||
469 | out: | 463 | out: |
470 | return result; | 464 | putname(filename); |
471 | } | 465 | return rc; |
472 | |||
473 | |||
474 | #ifdef CONFIG_MODULES | ||
475 | |||
476 | asmlinkage long | ||
477 | sys32_init_module(void __user *umod, unsigned long len, | ||
478 | const char __user *uargs) | ||
479 | { | ||
480 | return sys_init_module(umod, len, uargs); | ||
481 | } | ||
482 | |||
483 | asmlinkage long | ||
484 | sys32_delete_module(const char __user *name_user, unsigned int flags) | ||
485 | { | ||
486 | return sys_delete_module(name_user, flags); | ||
487 | } | ||
488 | |||
489 | #else /* CONFIG_MODULES */ | ||
490 | |||
491 | asmlinkage long | ||
492 | sys32_init_module(void __user *umod, unsigned long len, | ||
493 | const char __user *uargs) | ||
494 | { | ||
495 | return -ENOSYS; | ||
496 | } | 466 | } |
497 | 467 | ||
498 | asmlinkage long | ||
499 | sys32_delete_module(const char __user *name_user, unsigned int flags) | ||
500 | { | ||
501 | return -ENOSYS; | ||
502 | } | ||
503 | |||
504 | #endif /* CONFIG_MODULES */ | ||
505 | |||
506 | asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, | 468 | asmlinkage long sys32_pread64(unsigned int fd, char __user *ubuf, |
507 | size_t count, u32 poshi, u32 poslo) | 469 | size_t count, u32 poshi, u32 poslo) |
508 | { | 470 | { |
@@ -801,23 +763,6 @@ asmlinkage long sys32_write(unsigned int fd, char __user * buf, size_t count) | |||
801 | return sys_write(fd, buf, count); | 763 | return sys_write(fd, buf, count); |
802 | } | 764 | } |
803 | 765 | ||
804 | asmlinkage long sys32_clone(void) | ||
805 | { | ||
806 | struct pt_regs *regs = task_pt_regs(current); | ||
807 | unsigned long clone_flags; | ||
808 | unsigned long newsp; | ||
809 | int __user *parent_tidptr, *child_tidptr; | ||
810 | |||
811 | clone_flags = regs->gprs[3] & 0xffffffffUL; | ||
812 | newsp = regs->orig_gpr2 & 0x7fffffffUL; | ||
813 | parent_tidptr = compat_ptr(regs->gprs[4]); | ||
814 | child_tidptr = compat_ptr(regs->gprs[5]); | ||
815 | if (!newsp) | ||
816 | newsp = regs->gprs[15]; | ||
817 | return do_fork(clone_flags, newsp, regs, 0, | ||
818 | parent_tidptr, child_tidptr); | ||
819 | } | ||
820 | |||
821 | /* | 766 | /* |
822 | * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64. | 767 | * 31 bit emulation wrapper functions for sys_fadvise64/fadvise64_64. |
823 | * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE} | 768 | * These need to rewrite the advise values for POSIX_FADV_{DONTNEED,NOREUSE} |
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index 836a28842900..c07f9ca05ade 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -198,7 +198,8 @@ long sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, | |||
198 | compat_sigset_t __user *oset, size_t sigsetsize); | 198 | compat_sigset_t __user *oset, size_t sigsetsize); |
199 | long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); | 199 | long sys32_rt_sigpending(compat_sigset_t __user *set, size_t sigsetsize); |
200 | long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); | 200 | long sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo); |
201 | long sys32_execve(void); | 201 | long sys32_execve(char __user *name, compat_uptr_t __user *argv, |
202 | compat_uptr_t __user *envp); | ||
202 | long sys32_init_module(void __user *umod, unsigned long len, | 203 | long sys32_init_module(void __user *umod, unsigned long len, |
203 | const char __user *uargs); | 204 | const char __user *uargs); |
204 | long sys32_delete_module(const char __user *name_user, unsigned int flags); | 205 | long sys32_delete_module(const char __user *name_user, unsigned int flags); |
@@ -222,7 +223,6 @@ unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg); | |||
222 | long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); | 223 | long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg); |
223 | long sys32_read(unsigned int fd, char __user * buf, size_t count); | 224 | long sys32_read(unsigned int fd, char __user * buf, size_t count); |
224 | long sys32_write(unsigned int fd, char __user * buf, size_t count); | 225 | long sys32_write(unsigned int fd, char __user * buf, size_t count); |
225 | long sys32_clone(void); | ||
226 | long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); | 226 | long sys32_fadvise64(int fd, loff_t offset, size_t len, int advise); |
227 | long sys32_fadvise64_64(struct fadvise64_64_args __user *args); | 227 | long sys32_fadvise64_64(struct fadvise64_64_args __user *args); |
228 | long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | 228 | long sys32_sigaction(int sig, const struct old_sigaction32 __user *act, |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 624790042d41..682fb69dba21 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -568,18 +568,18 @@ compat_sys_sigprocmask_wrapper: | |||
568 | llgtr %r4,%r4 # compat_old_sigset_t * | 568 | llgtr %r4,%r4 # compat_old_sigset_t * |
569 | jg compat_sys_sigprocmask # branch to system call | 569 | jg compat_sys_sigprocmask # branch to system call |
570 | 570 | ||
571 | .globl sys32_init_module_wrapper | 571 | .globl sys_init_module_wrapper |
572 | sys32_init_module_wrapper: | 572 | sys_init_module_wrapper: |
573 | llgtr %r2,%r2 # void * | 573 | llgtr %r2,%r2 # void * |
574 | llgfr %r3,%r3 # unsigned long | 574 | llgfr %r3,%r3 # unsigned long |
575 | llgtr %r4,%r4 # char * | 575 | llgtr %r4,%r4 # char * |
576 | jg sys32_init_module # branch to system call | 576 | jg sys_init_module # branch to system call |
577 | 577 | ||
578 | .globl sys32_delete_module_wrapper | 578 | .globl sys_delete_module_wrapper |
579 | sys32_delete_module_wrapper: | 579 | sys_delete_module_wrapper: |
580 | llgtr %r2,%r2 # const char * | 580 | llgtr %r2,%r2 # const char * |
581 | llgfr %r3,%r3 # unsigned int | 581 | llgfr %r3,%r3 # unsigned int |
582 | jg sys32_delete_module # branch to system call | 582 | jg sys_delete_module # branch to system call |
583 | 583 | ||
584 | .globl sys32_quotactl_wrapper | 584 | .globl sys32_quotactl_wrapper |
585 | sys32_quotactl_wrapper: | 585 | sys32_quotactl_wrapper: |
@@ -1840,3 +1840,18 @@ sys_perf_event_open_wrapper: | |||
1840 | lgfr %r5,%r5 # int | 1840 | lgfr %r5,%r5 # int |
1841 | llgfr %r6,%r6 # unsigned long | 1841 | llgfr %r6,%r6 # unsigned long |
1842 | jg sys_perf_event_open # branch to system call | 1842 | jg sys_perf_event_open # branch to system call |
1843 | |||
1844 | .globl sys_clone_wrapper | ||
1845 | sys_clone_wrapper: | ||
1846 | llgfr %r2,%r2 # unsigned long | ||
1847 | llgfr %r3,%r3 # unsigned long | ||
1848 | llgtr %r4,%r4 # int * | ||
1849 | llgtr %r5,%r5 # int * | ||
1850 | jg sys_clone # branch to system call | ||
1851 | |||
1852 | .globl sys32_execve_wrapper | ||
1853 | sys32_execve_wrapper: | ||
1854 | llgtr %r2,%r2 # char * | ||
1855 | llgtr %r3,%r3 # compat_uptr_t * | ||
1856 | llgtr %r4,%r4 # compat_uptr_t * | ||
1857 | jg sys32_execve # branch to system call | ||
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index 950c59c6688b..e1e5e767ab56 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h | |||
@@ -42,10 +42,12 @@ long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args); | |||
42 | long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, | 42 | long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, |
43 | u32 len_low); | 43 | u32 len_low); |
44 | long sys_fork(void); | 44 | long sys_fork(void); |
45 | long sys_clone(void); | 45 | long sys_clone(unsigned long newsp, unsigned long clone_flags, |
46 | int __user *parent_tidptr, int __user *child_tidptr); | ||
46 | long sys_vfork(void); | 47 | long sys_vfork(void); |
47 | void execve_tail(void); | 48 | void execve_tail(void); |
48 | long sys_execve(void); | 49 | long sys_execve(char __user *name, char __user * __user *argv, |
50 | char __user * __user *envp); | ||
49 | long sys_sigsuspend(int history0, int history1, old_sigset_t mask); | 51 | long sys_sigsuspend(int history0, int history1, old_sigset_t mask); |
50 | long sys_sigaction(int sig, const struct old_sigaction __user *act, | 52 | long sys_sigaction(int sig, const struct old_sigaction __user *act, |
51 | struct old_sigaction __user *oact); | 53 | struct old_sigaction __user *oact); |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 5a43f27eec13..59fe6ecc6ed3 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/elfcore.h> | 32 | #include <linux/elfcore.h> |
33 | #include <linux/kernel_stat.h> | 33 | #include <linux/kernel_stat.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/compat.h> | ||
35 | #include <asm/compat.h> | 36 | #include <asm/compat.h> |
36 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
37 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
@@ -230,17 +231,11 @@ SYSCALL_DEFINE0(fork) | |||
230 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); | 231 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); |
231 | } | 232 | } |
232 | 233 | ||
233 | SYSCALL_DEFINE0(clone) | 234 | SYSCALL_DEFINE4(clone, unsigned long, newsp, unsigned long, clone_flags, |
235 | int __user *, parent_tidptr, int __user *, child_tidptr) | ||
234 | { | 236 | { |
235 | struct pt_regs *regs = task_pt_regs(current); | 237 | struct pt_regs *regs = task_pt_regs(current); |
236 | unsigned long clone_flags; | ||
237 | unsigned long newsp; | ||
238 | int __user *parent_tidptr, *child_tidptr; | ||
239 | 238 | ||
240 | clone_flags = regs->gprs[3]; | ||
241 | newsp = regs->orig_gpr2; | ||
242 | parent_tidptr = (int __user *) regs->gprs[4]; | ||
243 | child_tidptr = (int __user *) regs->gprs[5]; | ||
244 | if (!newsp) | 239 | if (!newsp) |
245 | newsp = regs->gprs[15]; | 240 | newsp = regs->gprs[15]; |
246 | return do_fork(clone_flags, newsp, regs, 0, | 241 | return do_fork(clone_flags, newsp, regs, 0, |
@@ -274,30 +269,25 @@ asmlinkage void execve_tail(void) | |||
274 | /* | 269 | /* |
275 | * sys_execve() executes a new program. | 270 | * sys_execve() executes a new program. |
276 | */ | 271 | */ |
277 | SYSCALL_DEFINE0(execve) | 272 | SYSCALL_DEFINE3(execve, char __user *, name, char __user * __user *, argv, |
273 | char __user * __user *, envp) | ||
278 | { | 274 | { |
279 | struct pt_regs *regs = task_pt_regs(current); | 275 | struct pt_regs *regs = task_pt_regs(current); |
280 | char *filename; | 276 | char *filename; |
281 | unsigned long result; | 277 | long rc; |
282 | int rc; | ||
283 | 278 | ||
284 | filename = getname((char __user *) regs->orig_gpr2); | 279 | filename = getname(name); |
285 | if (IS_ERR(filename)) { | 280 | rc = PTR_ERR(filename); |
286 | result = PTR_ERR(filename); | 281 | if (IS_ERR(filename)) |
282 | return rc; | ||
283 | rc = do_execve(filename, argv, envp, regs); | ||
284 | if (rc) | ||
287 | goto out; | 285 | goto out; |
288 | } | ||
289 | rc = do_execve(filename, (char __user * __user *) regs->gprs[3], | ||
290 | (char __user * __user *) regs->gprs[4], regs); | ||
291 | if (rc) { | ||
292 | result = rc; | ||
293 | goto out_putname; | ||
294 | } | ||
295 | execve_tail(); | 286 | execve_tail(); |
296 | result = regs->gprs[2]; | 287 | rc = regs->gprs[2]; |
297 | out_putname: | ||
298 | putname(filename); | ||
299 | out: | 288 | out: |
300 | return result; | 289 | putname(filename); |
290 | return rc; | ||
301 | } | 291 | } |
302 | 292 | ||
303 | /* | 293 | /* |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index f3ddd7ac06c5..a8738676b26c 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -339,24 +339,10 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
339 | int copied, ret; | 339 | int copied, ret; |
340 | 340 | ||
341 | switch (request) { | 341 | switch (request) { |
342 | case PTRACE_PEEKTEXT: | ||
343 | case PTRACE_PEEKDATA: | ||
344 | /* Remove high order bit from address (only for 31 bit). */ | ||
345 | addr &= PSW_ADDR_INSN; | ||
346 | /* read word at location addr. */ | ||
347 | return generic_ptrace_peekdata(child, addr, data); | ||
348 | |||
349 | case PTRACE_PEEKUSR: | 342 | case PTRACE_PEEKUSR: |
350 | /* read the word at location addr in the USER area. */ | 343 | /* read the word at location addr in the USER area. */ |
351 | return peek_user(child, addr, data); | 344 | return peek_user(child, addr, data); |
352 | 345 | ||
353 | case PTRACE_POKETEXT: | ||
354 | case PTRACE_POKEDATA: | ||
355 | /* Remove high order bit from address (only for 31 bit). */ | ||
356 | addr &= PSW_ADDR_INSN; | ||
357 | /* write the word at location addr. */ | ||
358 | return generic_ptrace_pokedata(child, addr, data); | ||
359 | |||
360 | case PTRACE_POKEUSR: | 346 | case PTRACE_POKEUSR: |
361 | /* write the word at location addr in the USER area */ | 347 | /* write the word at location addr in the USER area */ |
362 | return poke_user(child, addr, data); | 348 | return poke_user(child, addr, data); |
@@ -386,8 +372,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
386 | copied += sizeof(unsigned long); | 372 | copied += sizeof(unsigned long); |
387 | } | 373 | } |
388 | return 0; | 374 | return 0; |
375 | default: | ||
376 | /* Removing high order bit from addr (only for 31 bit). */ | ||
377 | addr &= PSW_ADDR_INSN; | ||
378 | return ptrace_request(child, request, addr, data); | ||
389 | } | 379 | } |
390 | return ptrace_request(child, request, addr, data); | ||
391 | } | 380 | } |
392 | 381 | ||
393 | #ifdef CONFIG_COMPAT | 382 | #ifdef CONFIG_COMPAT |
diff --git a/arch/s390/kernel/sclp.S b/arch/s390/kernel/sclp.S index 20639dfe0c42..e27ca63076d1 100644 --- a/arch/s390/kernel/sclp.S +++ b/arch/s390/kernel/sclp.S | |||
@@ -24,8 +24,6 @@ LC_EXT_INT_CODE = 0x86 # addr of ext int code | |||
24 | # R3 = external interruption parameter if R2=0 | 24 | # R3 = external interruption parameter if R2=0 |
25 | # | 25 | # |
26 | 26 | ||
27 | .section ".init.text","ax" | ||
28 | |||
29 | _sclp_wait_int: | 27 | _sclp_wait_int: |
30 | stm %r6,%r15,24(%r15) # save registers | 28 | stm %r6,%r15,24(%r15) # save registers |
31 | basr %r13,0 # get base register | 29 | basr %r13,0 # get base register |
@@ -318,9 +316,8 @@ _sclp_print_early: | |||
318 | .long _sclp_work_area | 316 | .long _sclp_work_area |
319 | .Lascebc: | 317 | .Lascebc: |
320 | .long _ascebc | 318 | .long _ascebc |
321 | .previous | ||
322 | 319 | ||
323 | .section ".init.data","a" | 320 | .section .data,"aw",@progbits |
324 | .balign 4096 | 321 | .balign 4096 |
325 | _sclp_work_area: | 322 | _sclp_work_area: |
326 | .fill 4096 | 323 | .fill 4096 |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 56c16876b919..b4b6396e6cf0 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -475,10 +475,8 @@ static int __cpuinit smp_alloc_lowcore(int cpu) | |||
475 | { | 475 | { |
476 | unsigned long async_stack, panic_stack; | 476 | unsigned long async_stack, panic_stack; |
477 | struct _lowcore *lowcore; | 477 | struct _lowcore *lowcore; |
478 | int lc_order; | ||
479 | 478 | ||
480 | lc_order = sizeof(long) == 8 ? 1 : 0; | 479 | lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); |
481 | lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order); | ||
482 | if (!lowcore) | 480 | if (!lowcore) |
483 | return -ENOMEM; | 481 | return -ENOMEM; |
484 | async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); | 482 | async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); |
@@ -509,16 +507,14 @@ static int __cpuinit smp_alloc_lowcore(int cpu) | |||
509 | out: | 507 | out: |
510 | free_page(panic_stack); | 508 | free_page(panic_stack); |
511 | free_pages(async_stack, ASYNC_ORDER); | 509 | free_pages(async_stack, ASYNC_ORDER); |
512 | free_pages((unsigned long) lowcore, lc_order); | 510 | free_pages((unsigned long) lowcore, LC_ORDER); |
513 | return -ENOMEM; | 511 | return -ENOMEM; |
514 | } | 512 | } |
515 | 513 | ||
516 | static void smp_free_lowcore(int cpu) | 514 | static void smp_free_lowcore(int cpu) |
517 | { | 515 | { |
518 | struct _lowcore *lowcore; | 516 | struct _lowcore *lowcore; |
519 | int lc_order; | ||
520 | 517 | ||
521 | lc_order = sizeof(long) == 8 ? 1 : 0; | ||
522 | lowcore = lowcore_ptr[cpu]; | 518 | lowcore = lowcore_ptr[cpu]; |
523 | #ifndef CONFIG_64BIT | 519 | #ifndef CONFIG_64BIT |
524 | if (MACHINE_HAS_IEEE) | 520 | if (MACHINE_HAS_IEEE) |
@@ -528,7 +524,7 @@ static void smp_free_lowcore(int cpu) | |||
528 | #endif | 524 | #endif |
529 | free_page(lowcore->panic_stack - PAGE_SIZE); | 525 | free_page(lowcore->panic_stack - PAGE_SIZE); |
530 | free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER); | 526 | free_pages(lowcore->async_stack - ASYNC_SIZE, ASYNC_ORDER); |
531 | free_pages((unsigned long) lowcore, lc_order); | 527 | free_pages((unsigned long) lowcore, LC_ORDER); |
532 | lowcore_ptr[cpu] = NULL; | 528 | lowcore_ptr[cpu] = NULL; |
533 | } | 529 | } |
534 | 530 | ||
@@ -664,7 +660,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
664 | unsigned long async_stack, panic_stack; | 660 | unsigned long async_stack, panic_stack; |
665 | struct _lowcore *lowcore; | 661 | struct _lowcore *lowcore; |
666 | unsigned int cpu; | 662 | unsigned int cpu; |
667 | int lc_order; | ||
668 | 663 | ||
669 | smp_detect_cpus(); | 664 | smp_detect_cpus(); |
670 | 665 | ||
@@ -674,8 +669,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
674 | print_cpu_info(); | 669 | print_cpu_info(); |
675 | 670 | ||
676 | /* Reallocate current lowcore, but keep its contents. */ | 671 | /* Reallocate current lowcore, but keep its contents. */ |
677 | lc_order = sizeof(long) == 8 ? 1 : 0; | 672 | lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, LC_ORDER); |
678 | lowcore = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, lc_order); | ||
679 | panic_stack = __get_free_page(GFP_KERNEL); | 673 | panic_stack = __get_free_page(GFP_KERNEL); |
680 | async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); | 674 | async_stack = __get_free_pages(GFP_KERNEL, ASYNC_ORDER); |
681 | BUG_ON(!lowcore || !panic_stack || !async_stack); | 675 | BUG_ON(!lowcore || !panic_stack || !async_stack); |
@@ -1047,42 +1041,6 @@ out: | |||
1047 | static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, | 1041 | static SYSDEV_CLASS_ATTR(dispatching, 0644, dispatching_show, |
1048 | dispatching_store); | 1042 | dispatching_store); |
1049 | 1043 | ||
1050 | /* | ||
1051 | * If the resume kernel runs on another cpu than the suspended kernel, | ||
1052 | * we have to switch the cpu IDs in the logical map. | ||
1053 | */ | ||
1054 | void smp_switch_boot_cpu_in_resume(u32 resume_phys_cpu_id, | ||
1055 | struct _lowcore *suspend_lowcore) | ||
1056 | { | ||
1057 | int cpu, suspend_cpu_id, resume_cpu_id; | ||
1058 | u32 suspend_phys_cpu_id; | ||
1059 | |||
1060 | suspend_phys_cpu_id = __cpu_logical_map[suspend_lowcore->cpu_nr]; | ||
1061 | suspend_cpu_id = suspend_lowcore->cpu_nr; | ||
1062 | |||
1063 | for_each_present_cpu(cpu) { | ||
1064 | if (__cpu_logical_map[cpu] == resume_phys_cpu_id) { | ||
1065 | resume_cpu_id = cpu; | ||
1066 | goto found; | ||
1067 | } | ||
1068 | } | ||
1069 | panic("Could not find resume cpu in logical map.\n"); | ||
1070 | |||
1071 | found: | ||
1072 | printk("Resume cpu ID: %i/%i\n", resume_phys_cpu_id, resume_cpu_id); | ||
1073 | printk("Suspend cpu ID: %i/%i\n", suspend_phys_cpu_id, suspend_cpu_id); | ||
1074 | |||
1075 | __cpu_logical_map[resume_cpu_id] = suspend_phys_cpu_id; | ||
1076 | __cpu_logical_map[suspend_cpu_id] = resume_phys_cpu_id; | ||
1077 | |||
1078 | lowcore_ptr[suspend_cpu_id]->cpu_addr = resume_phys_cpu_id; | ||
1079 | } | ||
1080 | |||
1081 | u32 smp_get_phys_cpu_id(void) | ||
1082 | { | ||
1083 | return __cpu_logical_map[smp_processor_id()]; | ||
1084 | } | ||
1085 | |||
1086 | static int __init topology_init(void) | 1044 | static int __init topology_init(void) |
1087 | { | 1045 | { |
1088 | int cpu; | 1046 | int cpu; |
diff --git a/arch/s390/kernel/suspend.c b/arch/s390/kernel/suspend.c index 086bee970cae..cf9e5c6d5527 100644 --- a/arch/s390/kernel/suspend.c +++ b/arch/s390/kernel/suspend.c | |||
@@ -6,36 +6,26 @@ | |||
6 | * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com> | 6 | * Author(s): Hans-Joachim Picht <hans@linux.vnet.ibm.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/suspend.h> | ||
10 | #include <linux/reboot.h> | ||
11 | #include <linux/pfn.h> | 9 | #include <linux/pfn.h> |
12 | #include <linux/mm.h> | ||
13 | #include <asm/sections.h> | ||
14 | #include <asm/system.h> | 10 | #include <asm/system.h> |
15 | #include <asm/ipl.h> | ||
16 | 11 | ||
17 | /* | 12 | /* |
18 | * References to section boundaries | 13 | * References to section boundaries |
19 | */ | 14 | */ |
20 | extern const void __nosave_begin, __nosave_end; | 15 | extern const void __nosave_begin, __nosave_end; |
21 | 16 | ||
22 | /* | ||
23 | * check if given pfn is in the 'nosave' or in the read only NSS section | ||
24 | */ | ||
25 | int pfn_is_nosave(unsigned long pfn) | 17 | int pfn_is_nosave(unsigned long pfn) |
26 | { | 18 | { |
27 | unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT; | 19 | unsigned long nosave_begin_pfn = PFN_DOWN(__pa(&__nosave_begin)); |
28 | unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) | 20 | unsigned long nosave_end_pfn = PFN_DOWN(__pa(&__nosave_end)); |
29 | >> PAGE_SHIFT; | ||
30 | unsigned long eshared_pfn = PFN_DOWN(__pa(&_eshared)) - 1; | ||
31 | unsigned long stext_pfn = PFN_DOWN(__pa(&_stext)); | ||
32 | 21 | ||
22 | /* Always save lowcore pages (LC protection might be enabled). */ | ||
23 | if (pfn <= LC_PAGES) | ||
24 | return 0; | ||
33 | if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn) | 25 | if (pfn >= nosave_begin_pfn && pfn < nosave_end_pfn) |
34 | return 1; | 26 | return 1; |
35 | if (pfn >= stext_pfn && pfn <= eshared_pfn) { | 27 | /* Skip memory holes and read-only pages (NSS, DCSS, ...). */ |
36 | if (ipl_info.type == IPL_TYPE_NSS) | 28 | if (tprot(PFN_PHYS(pfn))) |
37 | return 1; | ||
38 | } else if ((tprot(pfn * PAGE_SIZE) && pfn > 0)) | ||
39 | return 1; | 29 | return 1; |
40 | return 0; | 30 | return 0; |
41 | } | 31 | } |
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S index 7cd6b096f0d1..fe927d0bc20b 100644 --- a/arch/s390/kernel/swsusp_asm64.S +++ b/arch/s390/kernel/swsusp_asm64.S | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/ptrace.h> | 11 | #include <asm/ptrace.h> |
12 | #include <asm/thread_info.h> | ||
12 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
13 | 14 | ||
14 | /* | 15 | /* |
@@ -41,6 +42,9 @@ swsusp_arch_suspend: | |||
41 | /* Get pointer to save area */ | 42 | /* Get pointer to save area */ |
42 | lghi %r1,0x1000 | 43 | lghi %r1,0x1000 |
43 | 44 | ||
45 | /* Save CPU address */ | ||
46 | stap __LC_CPU_ADDRESS(%r1) | ||
47 | |||
44 | /* Store registers */ | 48 | /* Store registers */ |
45 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ | 49 | mvc 0x318(4,%r1),__SF_EMPTY(%r15) /* move prefix to lowcore */ |
46 | stfpc 0x31c(%r1) /* store fpu control */ | 50 | stfpc 0x31c(%r1) /* store fpu control */ |
@@ -102,11 +106,10 @@ swsusp_arch_resume: | |||
102 | aghi %r15,-STACK_FRAME_OVERHEAD | 106 | aghi %r15,-STACK_FRAME_OVERHEAD |
103 | stg %r1,__SF_BACKCHAIN(%r15) | 107 | stg %r1,__SF_BACKCHAIN(%r15) |
104 | 108 | ||
105 | #ifdef CONFIG_SMP | 109 | /* Make all free pages stable */ |
106 | /* Save boot cpu number */ | 110 | lghi %r2,1 |
107 | brasl %r14,smp_get_phys_cpu_id | 111 | brasl %r14,arch_set_page_states |
108 | lgr %r10,%r2 | 112 | |
109 | #endif | ||
110 | /* Deactivate DAT */ | 113 | /* Deactivate DAT */ |
111 | stnsm __SF_EMPTY(%r15),0xfb | 114 | stnsm __SF_EMPTY(%r15),0xfb |
112 | 115 | ||
@@ -133,6 +136,69 @@ swsusp_arch_resume: | |||
133 | 2: | 136 | 2: |
134 | ptlb /* flush tlb */ | 137 | ptlb /* flush tlb */ |
135 | 138 | ||
139 | /* Reset System */ | ||
140 | larl %r1,restart_entry | ||
141 | larl %r2,.Lrestart_diag308_psw | ||
142 | og %r1,0(%r2) | ||
143 | stg %r1,0(%r0) | ||
144 | larl %r1,.Lnew_pgm_check_psw | ||
145 | epsw %r2,%r3 | ||
146 | stm %r2,%r3,0(%r1) | ||
147 | mvc __LC_PGM_NEW_PSW(16,%r0),0(%r1) | ||
148 | lghi %r0,0 | ||
149 | diag %r0,%r0,0x308 | ||
150 | restart_entry: | ||
151 | lhi %r1,1 | ||
152 | sigp %r1,%r0,0x12 | ||
153 | sam64 | ||
154 | larl %r1,.Lnew_pgm_check_psw | ||
155 | lpswe 0(%r1) | ||
156 | pgm_check_entry: | ||
157 | |||
158 | /* Switch to original suspend CPU */ | ||
159 | larl %r1,.Lresume_cpu /* Resume CPU address: r2 */ | ||
160 | stap 0(%r1) | ||
161 | llgh %r2,0(%r1) | ||
162 | lghi %r3,0x1000 | ||
163 | llgh %r1,__LC_CPU_ADDRESS(%r3) /* Suspend CPU address: r1 */ | ||
164 | cgr %r1,%r2 | ||
165 | je restore_registers /* r1 = r2 -> nothing to do */ | ||
166 | larl %r4,.Lrestart_suspend_psw /* Set new restart PSW */ | ||
167 | mvc __LC_RESTART_PSW(16,%r0),0(%r4) | ||
168 | 3: | ||
169 | sigp %r9,%r1,__SIGP_INITIAL_CPU_RESET | ||
170 | brc 8,4f /* accepted */ | ||
171 | brc 2,3b /* busy, try again */ | ||
172 | |||
173 | /* Suspend CPU not available -> panic */ | ||
174 | larl %r15,init_thread_union | ||
175 | ahi %r15,1<<(PAGE_SHIFT+THREAD_ORDER) | ||
176 | larl %r2,.Lpanic_string | ||
177 | larl %r3,_sclp_print_early | ||
178 | lghi %r1,0 | ||
179 | sam31 | ||
180 | sigp %r1,%r0,0x12 | ||
181 | basr %r14,%r3 | ||
182 | larl %r3,.Ldisabled_wait_31 | ||
183 | lpsw 0(%r3) | ||
184 | 4: | ||
185 | /* Switch to suspend CPU */ | ||
186 | sigp %r9,%r1,__SIGP_RESTART /* start suspend CPU */ | ||
187 | brc 2,4b /* busy, try again */ | ||
188 | 5: | ||
189 | sigp %r9,%r2,__SIGP_STOP /* stop resume (current) CPU */ | ||
190 | 6: j 6b | ||
191 | |||
192 | restart_suspend: | ||
193 | larl %r1,.Lresume_cpu | ||
194 | llgh %r2,0(%r1) | ||
195 | 7: | ||
196 | sigp %r9,%r2,__SIGP_SENSE /* Wait for resume CPU */ | ||
197 | brc 2,7b /* busy, try again */ | ||
198 | tmll %r9,0x40 /* Test if resume CPU is stopped */ | ||
199 | jz 7b | ||
200 | |||
201 | restore_registers: | ||
136 | /* Restore registers */ | 202 | /* Restore registers */ |
137 | lghi %r13,0x1000 /* %r1 = pointer to save arae */ | 203 | lghi %r13,0x1000 /* %r1 = pointer to save arae */ |
138 | 204 | ||
@@ -166,19 +232,33 @@ swsusp_arch_resume: | |||
166 | /* Pointer to save area */ | 232 | /* Pointer to save area */ |
167 | lghi %r13,0x1000 | 233 | lghi %r13,0x1000 |
168 | 234 | ||
169 | #ifdef CONFIG_SMP | ||
170 | /* Switch CPUs */ | ||
171 | lgr %r2,%r10 /* get cpu id */ | ||
172 | llgf %r3,0x318(%r13) | ||
173 | brasl %r14,smp_switch_boot_cpu_in_resume | ||
174 | #endif | ||
175 | /* Restore prefix register */ | 235 | /* Restore prefix register */ |
176 | spx 0x318(%r13) | 236 | spx 0x318(%r13) |
177 | 237 | ||
178 | /* Activate DAT */ | 238 | /* Activate DAT */ |
179 | stosm __SF_EMPTY(%r15),0x04 | 239 | stosm __SF_EMPTY(%r15),0x04 |
180 | 240 | ||
241 | /* Make all free pages unstable */ | ||
242 | lghi %r2,0 | ||
243 | brasl %r14,arch_set_page_states | ||
244 | |||
181 | /* Return 0 */ | 245 | /* Return 0 */ |
182 | lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) | 246 | lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) |
183 | lghi %r2,0 | 247 | lghi %r2,0 |
184 | br %r14 | 248 | br %r14 |
249 | |||
250 | .section .data.nosave,"aw",@progbits | ||
251 | .align 8 | ||
252 | .Ldisabled_wait_31: | ||
253 | .long 0x000a0000,0x00000000 | ||
254 | .Lpanic_string: | ||
255 | .asciz "Resume not possible because suspend CPU is no longer available" | ||
256 | .align 8 | ||
257 | .Lrestart_diag308_psw: | ||
258 | .long 0x00080000,0x80000000 | ||
259 | .Lrestart_suspend_psw: | ||
260 | .quad 0x0000000180000000,restart_suspend | ||
261 | .Lnew_pgm_check_psw: | ||
262 | .quad 0,pgm_check_entry | ||
263 | .Lresume_cpu: | ||
264 | .byte 0,0 | ||
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 0b5083681e77..30eca070d426 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -19,7 +19,7 @@ SYSCALL(sys_restart_syscall,sys_restart_syscall,sys_restart_syscall) | |||
19 | SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper) | 19 | SYSCALL(sys_creat,sys_creat,sys32_creat_wrapper) |
20 | SYSCALL(sys_link,sys_link,sys32_link_wrapper) | 20 | SYSCALL(sys_link,sys_link,sys32_link_wrapper) |
21 | SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */ | 21 | SYSCALL(sys_unlink,sys_unlink,sys32_unlink_wrapper) /* 10 */ |
22 | SYSCALL(sys_execve,sys_execve,sys32_execve) | 22 | SYSCALL(sys_execve,sys_execve,sys32_execve_wrapper) |
23 | SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper) | 23 | SYSCALL(sys_chdir,sys_chdir,sys32_chdir_wrapper) |
24 | SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */ | 24 | SYSCALL(sys_time,sys_ni_syscall,sys32_time_wrapper) /* old time syscall */ |
25 | SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper) | 25 | SYSCALL(sys_mknod,sys_mknod,sys32_mknod_wrapper) |
@@ -128,7 +128,7 @@ SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) | |||
128 | SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) | 128 | SYSCALL(sys_ipc,sys_ipc,sys32_ipc_wrapper) |
129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | 129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) |
130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) | 130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) |
131 | SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ | 131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ |
132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) | 132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) |
133 | SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) | 133 | SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) |
134 | NI_SYSCALL /* modify_ldt for i386 */ | 134 | NI_SYSCALL /* modify_ldt for i386 */ |
@@ -136,8 +136,8 @@ SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) | |||
136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ | 136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ |
137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) | 137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask_wrapper) |
138 | NI_SYSCALL /* old "create module" */ | 138 | NI_SYSCALL /* old "create module" */ |
139 | SYSCALL(sys_init_module,sys_init_module,sys32_init_module_wrapper) | 139 | SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper) |
140 | SYSCALL(sys_delete_module,sys_delete_module,sys32_delete_module_wrapper) | 140 | SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper) |
141 | NI_SYSCALL /* 130: old get_kernel_syms */ | 141 | NI_SYSCALL /* 130: old get_kernel_syms */ |
142 | SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) | 142 | SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) |
143 | SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) | 143 | SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) |
diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c index f92ec203ad92..098923ae458f 100644 --- a/arch/s390/mm/page-states.c +++ b/arch/s390/mm/page-states.c | |||
@@ -50,28 +50,64 @@ void __init cmma_init(void) | |||
50 | cmma_flag = 0; | 50 | cmma_flag = 0; |
51 | } | 51 | } |
52 | 52 | ||
53 | void arch_free_page(struct page *page, int order) | 53 | static inline void set_page_unstable(struct page *page, int order) |
54 | { | 54 | { |
55 | int i, rc; | 55 | int i, rc; |
56 | 56 | ||
57 | if (!cmma_flag) | ||
58 | return; | ||
59 | for (i = 0; i < (1 << order); i++) | 57 | for (i = 0; i < (1 << order); i++) |
60 | asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" | 58 | asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" |
61 | : "=&d" (rc) | 59 | : "=&d" (rc) |
62 | : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), | 60 | : "a" (page_to_phys(page + i)), |
63 | "i" (ESSA_SET_UNUSED)); | 61 | "i" (ESSA_SET_UNUSED)); |
64 | } | 62 | } |
65 | 63 | ||
66 | void arch_alloc_page(struct page *page, int order) | 64 | void arch_free_page(struct page *page, int order) |
67 | { | 65 | { |
68 | int i, rc; | ||
69 | |||
70 | if (!cmma_flag) | 66 | if (!cmma_flag) |
71 | return; | 67 | return; |
68 | set_page_unstable(page, order); | ||
69 | } | ||
70 | |||
71 | static inline void set_page_stable(struct page *page, int order) | ||
72 | { | ||
73 | int i, rc; | ||
74 | |||
72 | for (i = 0; i < (1 << order); i++) | 75 | for (i = 0; i < (1 << order); i++) |
73 | asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" | 76 | asm volatile(".insn rrf,0xb9ab0000,%0,%1,%2,0" |
74 | : "=&d" (rc) | 77 | : "=&d" (rc) |
75 | : "a" ((page_to_pfn(page) + i) << PAGE_SHIFT), | 78 | : "a" (page_to_phys(page + i)), |
76 | "i" (ESSA_SET_STABLE)); | 79 | "i" (ESSA_SET_STABLE)); |
77 | } | 80 | } |
81 | |||
82 | void arch_alloc_page(struct page *page, int order) | ||
83 | { | ||
84 | if (!cmma_flag) | ||
85 | return; | ||
86 | set_page_stable(page, order); | ||
87 | } | ||
88 | |||
89 | void arch_set_page_states(int make_stable) | ||
90 | { | ||
91 | unsigned long flags, order, t; | ||
92 | struct list_head *l; | ||
93 | struct page *page; | ||
94 | struct zone *zone; | ||
95 | |||
96 | if (!cmma_flag) | ||
97 | return; | ||
98 | if (make_stable) | ||
99 | drain_local_pages(NULL); | ||
100 | for_each_populated_zone(zone) { | ||
101 | spin_lock_irqsave(&zone->lock, flags); | ||
102 | for_each_migratetype_order(order, t) { | ||
103 | list_for_each(l, &zone->free_area[order].free_list[t]) { | ||
104 | page = list_entry(l, struct page, lru); | ||
105 | if (make_stable) | ||
106 | set_page_stable(page, order); | ||
107 | else | ||
108 | set_page_unstable(page, order); | ||
109 | } | ||
110 | } | ||
111 | spin_unlock_irqrestore(&zone->lock, flags); | ||
112 | } | ||
113 | } | ||
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index c70215247071..c60bfb309ce6 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -314,21 +314,18 @@ int s390_enable_sie(void) | |||
314 | } | 314 | } |
315 | EXPORT_SYMBOL_GPL(s390_enable_sie); | 315 | EXPORT_SYMBOL_GPL(s390_enable_sie); |
316 | 316 | ||
317 | #ifdef CONFIG_DEBUG_PAGEALLOC | 317 | #if defined(CONFIG_DEBUG_PAGEALLOC) && defined(CONFIG_HIBERNATION) |
318 | #ifdef CONFIG_HIBERNATION | ||
319 | bool kernel_page_present(struct page *page) | 318 | bool kernel_page_present(struct page *page) |
320 | { | 319 | { |
321 | unsigned long addr; | 320 | unsigned long addr; |
322 | int cc; | 321 | int cc; |
323 | 322 | ||
324 | addr = page_to_phys(page); | 323 | addr = page_to_phys(page); |
325 | asm("lra %1,0(%1)\n" | 324 | asm volatile( |
326 | "ipm %0\n" | 325 | " lra %1,0(%1)\n" |
327 | "srl %0,28" | 326 | " ipm %0\n" |
328 | :"=d"(cc),"+a"(addr)::"cc"); | 327 | " srl %0,28" |
328 | : "=d" (cc), "+a" (addr) : : "cc"); | ||
329 | return cc == 0; | 329 | return cc == 0; |
330 | } | 330 | } |
331 | 331 | #endif /* CONFIG_HIBERNATION && CONFIG_DEBUG_PAGEALLOC */ | |
332 | #endif /* CONFIG_HIBERNATION */ | ||
333 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | ||
334 | |||