aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/s390/cds.txt82
-rw-r--r--arch/s390/kernel/compat_wrapper.S28
-rw-r--r--arch/s390/kernel/kprobes.c2
-rw-r--r--arch/s390/kernel/syscalls.S5
-rw-r--r--arch/s390/mm/init.c38
-rw-r--r--include/asm-s390/unistd.h21
6 files changed, 80 insertions, 96 deletions
diff --git a/Documentation/s390/cds.txt b/Documentation/s390/cds.txt
index 05a2b4f7e38f..58919d6a593a 100644
--- a/Documentation/s390/cds.txt
+++ b/Documentation/s390/cds.txt
@@ -51,13 +51,8 @@ The major changes are:
51* The interrupt handlers must be adapted to use a ccw_device as argument. 51* The interrupt handlers must be adapted to use a ccw_device as argument.
52 Moreover, they don't return a devstat, but an irb. 52 Moreover, they don't return a devstat, but an irb.
53* Before initiating an io, the options must be set via ccw_device_set_options(). 53* Before initiating an io, the options must be set via ccw_device_set_options().
54 54* Instead of calling read_dev_chars()/read_conf_data(), the driver issues
55read_dev_chars() 55 the channel program and handles the interrupt itself.
56 read device characteristics
57
58read_conf_data()
59read_conf_data_lpm()
60 read configuration data.
61 56
62ccw_device_get_ciw() 57ccw_device_get_ciw()
63 get commands from extended sense data. 58 get commands from extended sense data.
@@ -130,11 +125,6 @@ present their hardware status by the same (shared) IRQ, the operating system
130has to call every single device driver registered on this IRQ in order to 125has to call every single device driver registered on this IRQ in order to
131determine the device driver owning the device that raised the interrupt. 126determine the device driver owning the device that raised the interrupt.
132 127
133In order not to introduce a new I/O concept to the common Linux code,
134Linux/390 preserves the IRQ concept and semantically maps the ESA/390
135subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k
136different IRQs, uniquely representing a single device each.
137
138Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). 128Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel).
139For internal use of the common I/O layer, these are still there. However, 129For internal use of the common I/O layer, these are still there. However,
140device drivers should use the new calling interface via the ccw_device only. 130device drivers should use the new calling interface via the ccw_device only.
@@ -151,9 +141,8 @@ information during their initialization step to recognize the devices they
151support using the information saved in the struct ccw_device given to them. 141support using the information saved in the struct ccw_device given to them.
152This methods implies that Linux/390 doesn't require to probe for free (not 142This methods implies that Linux/390 doesn't require to probe for free (not
153armed) interrupt request lines (IRQs) to drive its devices with. Where 143armed) interrupt request lines (IRQs) to drive its devices with. Where
154applicable, the device drivers can use the read_dev_chars() to retrieve device 144applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS
155characteristics. This can be done without having to request device ownership 145ccw to retrieve device characteristics in its online routine.
156previously.
157 146
158In order to allow for easy I/O initiation the CDS layer provides a 147In order to allow for easy I/O initiation the CDS layer provides a
159ccw_device_start() interface that takes a device specific channel program (one 148ccw_device_start() interface that takes a device specific channel program (one
@@ -170,69 +159,6 @@ SUBCHANNEL (HSCH) command without having pending I/O requests. This function is
170also covered by ccw_device_halt(). 159also covered by ccw_device_halt().
171 160
172 161
173read_dev_chars() - Read Device Characteristics
174
175This routine returns the characteristics for the device specified.
176
177The function is meant to be called with the device already enabled; that is,
178at earliest during set_online() processing.
179
180The ccw_device must not be locked prior to calling read_dev_chars().
181
182The function may be called enabled or disabled.
183
184int read_dev_chars(struct ccw_device *cdev, void **buffer, int length );
185
186cdev - the ccw_device the information is requested for.
187buffer - pointer to a buffer pointer. The buffer pointer itself
188 must contain a valid buffer area.
189length - length of the buffer provided.
190
191The read_dev_chars() function returns :
192
193 0 - successful completion
194-ENODEV - cdev invalid
195-EINVAL - an invalid parameter was detected, or the function was called early.
196-EBUSY - an irrecoverable I/O error occurred or the device is not
197 operational.
198
199
200read_conf_data(), read_conf_data_lpm() - Read Configuration Data
201
202Retrieve the device dependent configuration data. Please have a look at your
203device dependent I/O commands for the device specific layout of the node
204descriptor elements. read_conf_data_lpm() will retrieve the configuration data
205for a specific path.
206
207The function is meant to be called with the device already enabled; that is,
208at earliest during set_online() processing.
209
210The function may be called enabled or disabled, but the device must not be
211locked
212
213int read_conf_data(struct ccw_device, void **buffer, int *length);
214int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm);
215
216cdev - the ccw_device the data is requested for.
217buffer - Pointer to a buffer pointer. The read_conf_data() routine
218 will allocate a buffer and initialize the buffer pointer
219 accordingly. It's the device driver's responsibility to
220 release the kernel memory if no longer needed.
221length - Length of the buffer allocated and retrieved.
222lpm - Logical path mask to be used for retrieving the data. If
223 zero the data is retrieved on the next path available.
224
225The read_conf_data() function returns :
226 0 - Successful completion
227-ENODEV - cdev invalid.
228-EINVAL - An invalid parameter was detected, or the function was called early.
229-EIO - An irrecoverable I/O error occurred or the device is
230 not operational.
231-ENOMEM - The read_conf_data() routine couldn't obtain storage.
232-EOPNOTSUPP - The device doesn't support the read configuration
233 data command.
234
235
236get_ciw() - get command information word 162get_ciw() - get command information word
237 163
238This call enables a device driver to get information about supported commands 164This call enables a device driver to get information about supported commands
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 32a69a18a796..acc415457b45 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1682,3 +1682,31 @@ compat_sys_utimes_wrapper:
1682 llgtr %r2,%r2 # char * 1682 llgtr %r2,%r2 # char *
1683 llgtr %r3,%r3 # struct compat_timeval * 1683 llgtr %r3,%r3 # struct compat_timeval *
1684 jg compat_sys_utimes 1684 jg compat_sys_utimes
1685
1686 .globl compat_sys_utimensat_wrapper
1687compat_sys_utimensat_wrapper:
1688 llgfr %r2,%r2 # unsigned int
1689 llgtr %r3,%r3 # char *
1690 llgtr %r4,%r4 # struct compat_timespec *
1691 lgfr %r5,%r5 # int
1692 jg compat_sys_utimensat
1693
1694 .globl compat_sys_signalfd_wrapper
1695compat_sys_signalfd_wrapper:
1696 lgfr %r2,%r2 # int
1697 llgtr %r3,%r3 # compat_sigset_t *
1698 llgfr %r4,%r4 # compat_size_t
1699 jg compat_sys_signalfd
1700
1701 .globl compat_sys_timerfd_wrapper
1702compat_sys_timerfd_wrapper:
1703 lgfr %r2,%r2 # int
1704 lgfr %r3,%r3 # int
1705 lgfr %r4,%r4 # int
1706 llgtr %r5,%r5 # struct compat_itimerspec *
1707 jg compat_sys_timerfd
1708
1709 .globl sys_eventfd_wrapper
1710sys_eventfd_wrapper:
1711 llgfr %r2,%r2 # unsigned int
1712 jg sys_eventfd
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index e39333ae0fcf..358d2bbbc481 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -413,7 +413,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p,
413 break; 413 break;
414 } 414 }
415 } 415 }
416 BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); 416 kretprobe_assert(ri, orig_ret_address, trampoline_address);
417 regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE; 417 regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE;
418 418
419 reset_current_kprobe(); 419 reset_current_kprobe();
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index cd8d321cd0c2..738feb4a0aad 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -322,3 +322,8 @@ NI_SYSCALL /* 310 sys_move_pages */
322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) 322SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) 323SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) 324SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
325NI_SYSCALL /* 314 sys_fallocate */
326SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
327SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
328SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper)
329SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper)
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 916b72a8cde8..9098531a2671 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -61,30 +61,38 @@ void diag10(unsigned long addr)
61 61
62void show_mem(void) 62void show_mem(void)
63{ 63{
64 int i, total = 0, reserved = 0; 64 int i, total = 0, reserved = 0;
65 int shared = 0, cached = 0; 65 int shared = 0, cached = 0;
66 struct page *page; 66 struct page *page;
67 67
68 printk("Mem-info:\n"); 68 printk("Mem-info:\n");
69 show_free_areas(); 69 show_free_areas();
70 printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); 70 printk("Free swap: %6ldkB\n", nr_swap_pages << (PAGE_SHIFT - 10));
71 i = max_mapnr; 71 i = max_mapnr;
72 while (i-- > 0) { 72 while (i-- > 0) {
73 if (!pfn_valid(i)) 73 if (!pfn_valid(i))
74 continue; 74 continue;
75 page = pfn_to_page(i); 75 page = pfn_to_page(i);
76 total++; 76 total++;
77 if (PageReserved(page)) 77 if (PageReserved(page))
78 reserved++; 78 reserved++;
79 else if (PageSwapCache(page)) 79 else if (PageSwapCache(page))
80 cached++; 80 cached++;
81 else if (page_count(page)) 81 else if (page_count(page))
82 shared += page_count(page) - 1; 82 shared += page_count(page) - 1;
83 } 83 }
84 printk("%d pages of RAM\n",total); 84 printk("%d pages of RAM\n", total);
85 printk("%d reserved pages\n",reserved); 85 printk("%d reserved pages\n", reserved);
86 printk("%d pages shared\n",shared); 86 printk("%d pages shared\n", shared);
87 printk("%d pages swap cached\n",cached); 87 printk("%d pages swap cached\n", cached);
88
89 printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY));
90 printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK));
91 printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED));
92 printk("%lu pages slab\n",
93 global_page_state(NR_SLAB_RECLAIMABLE) +
94 global_page_state(NR_SLAB_UNRECLAIMABLE));
95 printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE));
88} 96}
89 97
90static void __init setup_ro_region(void) 98static void __init setup_ro_region(void)
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 5c6f00d62df8..790c1c557417 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -251,8 +251,12 @@
251#define __NR_getcpu 311 251#define __NR_getcpu 311
252#define __NR_epoll_pwait 312 252#define __NR_epoll_pwait 312
253#define __NR_utimes 313 253#define __NR_utimes 313
254 254/* Number 314 is reserved for new sys_fallocate */
255#define NR_syscalls 314 255#define __NR_utimensat 315
256#define __NR_signalfd 316
257#define __NR_timerfd 317
258#define __NR_eventfd 318
259#define NR_syscalls 319
256 260
257/* 261/*
258 * There are some system calls that are not present on 64 bit, some 262 * There are some system calls that are not present on 64 bit, some
@@ -346,6 +350,19 @@
346 350
347#ifdef __KERNEL__ 351#ifdef __KERNEL__
348 352
353#ifndef CONFIG_64BIT
354#define __IGNORE_select
355#else
356#define __IGNORE_time
357#endif
358
359/* Ignore NUMA system calls. Not wired up on s390. */
360#define __IGNORE_mbind
361#define __IGNORE_get_mempolicy
362#define __IGNORE_set_mempolicy
363#define __IGNORE_migrate_pages
364#define __IGNORE_move_pages
365
349#define __ARCH_WANT_IPC_PARSE_VERSION 366#define __ARCH_WANT_IPC_PARSE_VERSION
350#define __ARCH_WANT_OLD_READDIR 367#define __ARCH_WANT_OLD_READDIR
351#define __ARCH_WANT_SYS_ALARM 368#define __ARCH_WANT_SYS_ALARM