diff options
-rw-r--r-- | Documentation/s390/cds.txt | 82 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 28 | ||||
-rw-r--r-- | arch/s390/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 5 | ||||
-rw-r--r-- | arch/s390/mm/init.c | 38 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 21 |
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 | |
55 | read_dev_chars() | 55 | the channel program and handles the interrupt itself. |
56 | read device characteristics | ||
57 | |||
58 | read_conf_data() | ||
59 | read_conf_data_lpm() | ||
60 | read configuration data. | ||
61 | 56 | ||
62 | ccw_device_get_ciw() | 57 | ccw_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 | |||
130 | has to call every single device driver registered on this IRQ in order to | 125 | has to call every single device driver registered on this IRQ in order to |
131 | determine the device driver owning the device that raised the interrupt. | 126 | determine the device driver owning the device that raised the interrupt. |
132 | 127 | ||
133 | In order not to introduce a new I/O concept to the common Linux code, | ||
134 | Linux/390 preserves the IRQ concept and semantically maps the ESA/390 | ||
135 | subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k | ||
136 | different IRQs, uniquely representing a single device each. | ||
137 | |||
138 | Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). | 128 | Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel). |
139 | For internal use of the common I/O layer, these are still there. However, | 129 | For internal use of the common I/O layer, these are still there. However, |
140 | device drivers should use the new calling interface via the ccw_device only. | 130 | device 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 | |||
151 | support using the information saved in the struct ccw_device given to them. | 141 | support using the information saved in the struct ccw_device given to them. |
152 | This methods implies that Linux/390 doesn't require to probe for free (not | 142 | This methods implies that Linux/390 doesn't require to probe for free (not |
153 | armed) interrupt request lines (IRQs) to drive its devices with. Where | 143 | armed) interrupt request lines (IRQs) to drive its devices with. Where |
154 | applicable, the device drivers can use the read_dev_chars() to retrieve device | 144 | applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS |
155 | characteristics. This can be done without having to request device ownership | 145 | ccw to retrieve device characteristics in its online routine. |
156 | previously. | ||
157 | 146 | ||
158 | In order to allow for easy I/O initiation the CDS layer provides a | 147 | In order to allow for easy I/O initiation the CDS layer provides a |
159 | ccw_device_start() interface that takes a device specific channel program (one | 148 | ccw_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 | |||
170 | also covered by ccw_device_halt(). | 159 | also covered by ccw_device_halt(). |
171 | 160 | ||
172 | 161 | ||
173 | read_dev_chars() - Read Device Characteristics | ||
174 | |||
175 | This routine returns the characteristics for the device specified. | ||
176 | |||
177 | The function is meant to be called with the device already enabled; that is, | ||
178 | at earliest during set_online() processing. | ||
179 | |||
180 | The ccw_device must not be locked prior to calling read_dev_chars(). | ||
181 | |||
182 | The function may be called enabled or disabled. | ||
183 | |||
184 | int read_dev_chars(struct ccw_device *cdev, void **buffer, int length ); | ||
185 | |||
186 | cdev - the ccw_device the information is requested for. | ||
187 | buffer - pointer to a buffer pointer. The buffer pointer itself | ||
188 | must contain a valid buffer area. | ||
189 | length - length of the buffer provided. | ||
190 | |||
191 | The 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 | |||
200 | read_conf_data(), read_conf_data_lpm() - Read Configuration Data | ||
201 | |||
202 | Retrieve the device dependent configuration data. Please have a look at your | ||
203 | device dependent I/O commands for the device specific layout of the node | ||
204 | descriptor elements. read_conf_data_lpm() will retrieve the configuration data | ||
205 | for a specific path. | ||
206 | |||
207 | The function is meant to be called with the device already enabled; that is, | ||
208 | at earliest during set_online() processing. | ||
209 | |||
210 | The function may be called enabled or disabled, but the device must not be | ||
211 | locked | ||
212 | |||
213 | int read_conf_data(struct ccw_device, void **buffer, int *length); | ||
214 | int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm); | ||
215 | |||
216 | cdev - the ccw_device the data is requested for. | ||
217 | buffer - 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. | ||
221 | length - Length of the buffer allocated and retrieved. | ||
222 | lpm - Logical path mask to be used for retrieving the data. If | ||
223 | zero the data is retrieved on the next path available. | ||
224 | |||
225 | The 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 | |||
236 | get_ciw() - get command information word | 162 | get_ciw() - get command information word |
237 | 163 | ||
238 | This call enables a device driver to get information about supported commands | 164 | This 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 | ||
1687 | compat_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 | ||
1695 | compat_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 | ||
1702 | compat_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 | ||
1710 | sys_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 */ | |||
322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) | 322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) |
323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) | 323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) |
324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) | 324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) |
325 | NI_SYSCALL /* 314 sys_fallocate */ | ||
326 | SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ | ||
327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) | ||
328 | SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper) | ||
329 | SYSCALL(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 | ||
62 | void show_mem(void) | 62 | void 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 | ||
90 | static void __init setup_ro_region(void) | 98 | static 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 |