diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 13:27:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-01 13:27:10 -0400 |
commit | 9fe3b64be3dc8313e9fa87255f169c608d074cbd (patch) | |
tree | c2b44acdf73d0ee4cbb67cbb2722c6eeeafa1d60 /arch | |
parent | 8b6d8c592fa7b8bfb1218447a273314c13a67e8a (diff) | |
parent | ab4227cb2d936886069ef1056c02500d05beb15d (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] qeth: avoid use of include/asm-s390
[S390] dont use kthread for smp_rescan_cpus().
[S390] virtio console: fix section mismatch warning.
[S390] cio: Include linux/string.h in schid.h.
[S390] qdio: fix section mismatch bug.
[S390] stp: fix section mismatch warning.
[S390] Remove diag 0x260 call from memory detection.
[S390] qdio: make sure qdr is aligned to page size
[S390] Add support for memory hot-remove.
[S390] Wire up new syscalls.
[S390] cio: Memory allocation for idset changed.
[S390] qeth: preallocated qeth header for hiper socket
[S390] Optimize storage key operations for anon pages
[S390] nohz/sclp: disable timer on synchronous waits.
[S390] ipl: Reboot from alternate device does not work when booting from file
[S390] dasd: Add support for enhanced VM UID
[S390] Remove last P390 trace.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/Kconfig | 3 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 37 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 5 | ||||
-rw-r--r-- | arch/s390/kernel/mem_detect.c | 23 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/s390/lib/delay.c | 4 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 13 |
8 files changed, 65 insertions, 28 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 2ed88122be93..8d41908e2513 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -317,6 +317,9 @@ config ARCH_ENABLE_MEMORY_HOTPLUG | |||
317 | def_bool y | 317 | def_bool y |
318 | depends on SPARSEMEM | 318 | depends on SPARSEMEM |
319 | 319 | ||
320 | config ARCH_ENABLE_MEMORY_HOTREMOVE | ||
321 | def_bool y | ||
322 | |||
320 | source "mm/Kconfig" | 323 | source "mm/Kconfig" |
321 | 324 | ||
322 | comment "I/O subsystem configuration" | 325 | comment "I/O subsystem configuration" |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index d003a6e16afb..328a20e880b5 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1732,3 +1732,40 @@ compat_sys_timerfd_gettime_wrapper: | |||
1732 | lgfr %r2,%r2 # int | 1732 | lgfr %r2,%r2 # int |
1733 | llgtr %r3,%r3 # struct compat_itimerspec * | 1733 | llgtr %r3,%r3 # struct compat_itimerspec * |
1734 | jg compat_sys_timerfd_gettime | 1734 | jg compat_sys_timerfd_gettime |
1735 | |||
1736 | .globl compat_sys_signalfd4_wrapper | ||
1737 | compat_sys_signalfd4_wrapper: | ||
1738 | lgfr %r2,%r2 # int | ||
1739 | llgtr %r3,%r3 # compat_sigset_t * | ||
1740 | llgfr %r4,%r4 # compat_size_t | ||
1741 | lgfr %r5,%r5 # int | ||
1742 | jg compat_sys_signalfd4 | ||
1743 | |||
1744 | .globl sys_eventfd2_wrapper | ||
1745 | sys_eventfd2_wrapper: | ||
1746 | llgfr %r2,%r2 # unsigned int | ||
1747 | lgfr %r3,%r3 # int | ||
1748 | jg sys_eventfd2 | ||
1749 | |||
1750 | .globl sys_inotify_init1_wrapper | ||
1751 | sys_inotify_init1_wrapper: | ||
1752 | lgfr %r2,%r2 # int | ||
1753 | jg sys_inotify_init1 | ||
1754 | |||
1755 | .globl sys_pipe2_wrapper | ||
1756 | sys_pipe2_wrapper: | ||
1757 | llgtr %r2,%r2 # u32 * | ||
1758 | lgfr %r3,%r3 # int | ||
1759 | jg sys_pipe2 # branch to system call | ||
1760 | |||
1761 | .globl sys_dup3_wrapper | ||
1762 | sys_dup3_wrapper: | ||
1763 | llgfr %r2,%r2 # unsigned int | ||
1764 | llgfr %r3,%r3 # unsigned int | ||
1765 | lgfr %r4,%r4 # int | ||
1766 | jg sys_dup3 # branch to system call | ||
1767 | |||
1768 | .globl sys_epoll_create1_wrapper | ||
1769 | sys_epoll_create1_wrapper: | ||
1770 | lgfr %r2,%r2 # int | ||
1771 | jg sys_epoll_create1 # branch to system call | ||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index 54b2779b5e2f..2dcf590faba6 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -1705,7 +1705,10 @@ void __init setup_ipl(void) | |||
1705 | 1705 | ||
1706 | void __init ipl_update_parameters(void) | 1706 | void __init ipl_update_parameters(void) |
1707 | { | 1707 | { |
1708 | if (diag308(DIAG308_STORE, &ipl_block) == DIAG308_RC_OK) | 1708 | int rc; |
1709 | |||
1710 | rc = diag308(DIAG308_STORE, &ipl_block); | ||
1711 | if ((rc == DIAG308_RC_OK) || (rc == DIAG308_RC_NOCONFIG)) | ||
1709 | diag308_set_works = 1; | 1712 | diag308_set_works = 1; |
1710 | } | 1713 | } |
1711 | 1714 | ||
diff --git a/arch/s390/kernel/mem_detect.c b/arch/s390/kernel/mem_detect.c index 18ed7abe16c5..9872999c66d1 100644 --- a/arch/s390/kernel/mem_detect.c +++ b/arch/s390/kernel/mem_detect.c | |||
@@ -9,27 +9,6 @@ | |||
9 | #include <asm/sclp.h> | 9 | #include <asm/sclp.h> |
10 | #include <asm/setup.h> | 10 | #include <asm/setup.h> |
11 | 11 | ||
12 | static int memory_fast_detect(struct mem_chunk *chunk) | ||
13 | { | ||
14 | unsigned long val0 = 0; | ||
15 | unsigned long val1 = 0xc; | ||
16 | int rc = -EOPNOTSUPP; | ||
17 | |||
18 | if (ipl_flags & IPL_NSS_VALID) | ||
19 | return -EOPNOTSUPP; | ||
20 | asm volatile( | ||
21 | " diag %1,%2,0x260\n" | ||
22 | "0: lhi %0,0\n" | ||
23 | "1:\n" | ||
24 | EX_TABLE(0b,1b) | ||
25 | : "+d" (rc), "+d" (val0), "+d" (val1) : : "cc"); | ||
26 | |||
27 | if (rc || val0 != val1) | ||
28 | return -EOPNOTSUPP; | ||
29 | chunk->size = val0 + 1; | ||
30 | return 0; | ||
31 | } | ||
32 | |||
33 | static inline int tprot(unsigned long addr) | 12 | static inline int tprot(unsigned long addr) |
34 | { | 13 | { |
35 | int rc = -EFAULT; | 14 | int rc = -EFAULT; |
@@ -84,8 +63,6 @@ void detect_memory_layout(struct mem_chunk chunk[]) | |||
84 | unsigned long flags, cr0; | 63 | unsigned long flags, cr0; |
85 | 64 | ||
86 | memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk)); | 65 | memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk)); |
87 | if (memory_fast_detect(&chunk[0]) == 0) | ||
88 | return; | ||
89 | /* Disable IRQs, DAT and low address protection so tprot does the | 66 | /* Disable IRQs, DAT and low address protection so tprot does the |
90 | * right thing and we don't get scheduled away with low address | 67 | * right thing and we don't get scheduled away with low address |
91 | * protection disabled. | 68 | * protection disabled. |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index c87ec687d4c6..c66d35e55142 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -330,3 +330,9 @@ SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper) | |||
330 | SYSCALL(sys_timerfd_create,sys_timerfd_create,sys_timerfd_create_wrapper) | 330 | SYSCALL(sys_timerfd_create,sys_timerfd_create,sys_timerfd_create_wrapper) |
331 | SYSCALL(sys_timerfd_settime,sys_timerfd_settime,compat_sys_timerfd_settime_wrapper) /* 320 */ | 331 | SYSCALL(sys_timerfd_settime,sys_timerfd_settime,compat_sys_timerfd_settime_wrapper) /* 320 */ |
332 | SYSCALL(sys_timerfd_gettime,sys_timerfd_gettime,compat_sys_timerfd_gettime_wrapper) | 332 | SYSCALL(sys_timerfd_gettime,sys_timerfd_gettime,compat_sys_timerfd_gettime_wrapper) |
333 | SYSCALL(sys_signalfd4,sys_signalfd4,compat_sys_signalfd4_wrapper) | ||
334 | SYSCALL(sys_eventfd2,sys_eventfd2,sys_eventfd2_wrapper) | ||
335 | SYSCALL(sys_inotify_init1,sys_inotify_init1,sys_inotify_init1_wrapper) | ||
336 | SYSCALL(sys_pipe2,sys_pipe2,sys_pipe2_wrapper) /* 325 */ | ||
337 | SYSCALL(sys_dup3,sys_dup3,sys_dup3_wrapper) | ||
338 | SYSCALL(sys_epoll_create1,sys_epoll_create1,sys_epoll_create1_wrapper) | ||
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index ab70d9bd9261..ca114fe46ffb 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -1348,7 +1348,7 @@ early_param("stp", early_parse_stp); | |||
1348 | /* | 1348 | /* |
1349 | * Reset STP attachment. | 1349 | * Reset STP attachment. |
1350 | */ | 1350 | */ |
1351 | static void stp_reset(void) | 1351 | static void __init stp_reset(void) |
1352 | { | 1352 | { |
1353 | int rc; | 1353 | int rc; |
1354 | 1354 | ||
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index eae21a8ac72d..fc6ab6094df8 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -43,7 +43,7 @@ void __udelay(unsigned long usecs) | |||
43 | local_bh_disable(); | 43 | local_bh_disable(); |
44 | local_irq_save(flags); | 44 | local_irq_save(flags); |
45 | if (raw_irqs_disabled_flags(flags)) { | 45 | if (raw_irqs_disabled_flags(flags)) { |
46 | old_cc = S390_lowcore.clock_comparator; | 46 | old_cc = local_tick_disable(); |
47 | S390_lowcore.clock_comparator = -1ULL; | 47 | S390_lowcore.clock_comparator = -1ULL; |
48 | __ctl_store(cr0, 0, 0); | 48 | __ctl_store(cr0, 0, 0); |
49 | dummy = (cr0 & 0xffff00e0) | 0x00000800; | 49 | dummy = (cr0 & 0xffff00e0) | 0x00000800; |
@@ -65,7 +65,7 @@ void __udelay(unsigned long usecs) | |||
65 | 65 | ||
66 | if (raw_irqs_disabled_flags(flags)) { | 66 | if (raw_irqs_disabled_flags(flags)) { |
67 | __ctl_load(cr0, 0, 0); | 67 | __ctl_load(cr0, 0, 0); |
68 | S390_lowcore.clock_comparator = old_cc; | 68 | local_tick_enable(old_cc); |
69 | } | 69 | } |
70 | if (!irq_context) | 70 | if (!irq_context) |
71 | _local_bh_enable(); | 71 | _local_bh_enable(); |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 4993b0f594eb..1169130a97ef 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -179,7 +179,7 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
179 | int rc; | 179 | int rc; |
180 | 180 | ||
181 | pgdat = NODE_DATA(nid); | 181 | pgdat = NODE_DATA(nid); |
182 | zone = pgdat->node_zones + ZONE_NORMAL; | 182 | zone = pgdat->node_zones + ZONE_MOVABLE; |
183 | rc = vmem_add_mapping(start, size); | 183 | rc = vmem_add_mapping(start, size); |
184 | if (rc) | 184 | if (rc) |
185 | return rc; | 185 | return rc; |
@@ -189,3 +189,14 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
189 | return rc; | 189 | return rc; |
190 | } | 190 | } |
191 | #endif /* CONFIG_MEMORY_HOTPLUG */ | 191 | #endif /* CONFIG_MEMORY_HOTPLUG */ |
192 | |||
193 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
194 | int remove_memory(u64 start, u64 size) | ||
195 | { | ||
196 | unsigned long start_pfn, end_pfn; | ||
197 | |||
198 | start_pfn = PFN_DOWN(start); | ||
199 | end_pfn = start_pfn + PFN_DOWN(size); | ||
200 | return offline_pages(start_pfn, end_pfn, 120 * HZ); | ||
201 | } | ||
202 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||