* [patch 0/5] s390 patches for 2.6.22-rc2
@ 2007-05-21 10:51 Martin Schwidefsky
2007-05-21 10:51 ` [patch 1/5] cio: Update documentation Martin Schwidefsky
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390
5 patches for s390. Important are the two patches that wire up the
system calls utimesat, signald, timerfd and eventfd.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 1/5] cio: Update documentation.
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
@ 2007-05-21 10:51 ` Martin Schwidefsky
2007-05-21 11:53 ` Christoph Hellwig
2007-05-21 10:51 ` [patch 2/5] Wire up sys_utimensat Martin Schwidefsky
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky
[-- Attachment #1: 001-cio-docu.diff --]
[-- Type: text/plain, Size: 5627 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
- read_dev_chars()/read_conf_data() are deprecated. Don't document them, but
advise to issue the channel program from the driver itself.
- Remove some really obsolete and incorrect stuff.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
Documentation/s390/cds.txt | 82 ++-------------------------------------------
1 file changed, 4 insertions(+), 78 deletions(-)
Index: quilt-2.6/Documentation/s390/cds.txt
===================================================================
--- quilt-2.6.orig/Documentation/s390/cds.txt
+++ quilt-2.6/Documentation/s390/cds.txt
@@ -51,13 +51,8 @@ The major changes are:
* The interrupt handlers must be adapted to use a ccw_device as argument.
Moreover, they don't return a devstat, but an irb.
* Before initiating an io, the options must be set via ccw_device_set_options().
-
-read_dev_chars()
- read device characteristics
-
-read_conf_data()
-read_conf_data_lpm()
- read configuration data.
+* Instead of calling read_dev_chars()/read_conf_data(), the driver issues
+ the channel program and handles the interrupt itself.
ccw_device_get_ciw()
get commands from extended sense data.
@@ -130,11 +125,6 @@ present their hardware status by the sam
has to call every single device driver registered on this IRQ in order to
determine the device driver owning the device that raised the interrupt.
-In order not to introduce a new I/O concept to the common Linux code,
-Linux/390 preserves the IRQ concept and semantically maps the ESA/390
-subchannels to Linux as IRQs. This allows Linux/390 to support up to 64k
-different IRQs, uniquely representing a single device each.
-
Up to kernel 2.4, Linux/390 used to provide interfaces via the IRQ (subchannel).
For internal use of the common I/O layer, these are still there. However,
device drivers should use the new calling interface via the ccw_device only.
@@ -151,9 +141,8 @@ information during their initialization
support using the information saved in the struct ccw_device given to them.
This methods implies that Linux/390 doesn't require to probe for free (not
armed) interrupt request lines (IRQs) to drive its devices with. Where
-applicable, the device drivers can use the read_dev_chars() to retrieve device
-characteristics. This can be done without having to request device ownership
-previously.
+applicable, the device drivers can use issue the READ DEVICE CHARACTERISTICS
+ccw to retrieve device characteristics in its online routine.
In order to allow for easy I/O initiation the CDS layer provides a
ccw_device_start() interface that takes a device specific channel program (one
@@ -170,69 +159,6 @@ SUBCHANNEL (HSCH) command without having
also covered by ccw_device_halt().
-read_dev_chars() - Read Device Characteristics
-
-This routine returns the characteristics for the device specified.
-
-The function is meant to be called with the device already enabled; that is,
-at earliest during set_online() processing.
-
-The ccw_device must not be locked prior to calling read_dev_chars().
-
-The function may be called enabled or disabled.
-
-int read_dev_chars(struct ccw_device *cdev, void **buffer, int length );
-
-cdev - the ccw_device the information is requested for.
-buffer - pointer to a buffer pointer. The buffer pointer itself
- must contain a valid buffer area.
-length - length of the buffer provided.
-
-The read_dev_chars() function returns :
-
- 0 - successful completion
--ENODEV - cdev invalid
--EINVAL - an invalid parameter was detected, or the function was called early.
--EBUSY - an irrecoverable I/O error occurred or the device is not
- operational.
-
-
-read_conf_data(), read_conf_data_lpm() - Read Configuration Data
-
-Retrieve the device dependent configuration data. Please have a look at your
-device dependent I/O commands for the device specific layout of the node
-descriptor elements. read_conf_data_lpm() will retrieve the configuration data
-for a specific path.
-
-The function is meant to be called with the device already enabled; that is,
-at earliest during set_online() processing.
-
-The function may be called enabled or disabled, but the device must not be
-locked
-
-int read_conf_data(struct ccw_device, void **buffer, int *length);
-int read_conf_data_lpm(struct ccw_device, void **buffer, int *length, __u8 lpm);
-
-cdev - the ccw_device the data is requested for.
-buffer - Pointer to a buffer pointer. The read_conf_data() routine
- will allocate a buffer and initialize the buffer pointer
- accordingly. It's the device driver's responsibility to
- release the kernel memory if no longer needed.
-length - Length of the buffer allocated and retrieved.
-lpm - Logical path mask to be used for retrieving the data. If
- zero the data is retrieved on the next path available.
-
-The read_conf_data() function returns :
- 0 - Successful completion
--ENODEV - cdev invalid.
--EINVAL - An invalid parameter was detected, or the function was called early.
--EIO - An irrecoverable I/O error occurred or the device is
- not operational.
--ENOMEM - The read_conf_data() routine couldn't obtain storage.
--EOPNOTSUPP - The device doesn't support the read configuration
- data command.
-
-
get_ciw() - get command information word
This call enables a device driver to get information about supported commands
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 2/5] Wire up sys_utimensat.
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
2007-05-21 10:51 ` [patch 1/5] cio: Update documentation Martin Schwidefsky
@ 2007-05-21 10:51 ` Martin Schwidefsky
2007-05-21 10:51 ` [patch 3/5] Wire up signald, timerfd and eventfd syscalls Martin Schwidefsky
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 002-utimensat.diff --]
[-- Type: text/plain, Size: 2694 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Wire up sys_utimensat, reserve syscall number for sys_fallocate and
add a couple of syscalls to the ignore list to get rid of warings.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/compat_wrapper.S | 8 ++++++++
arch/s390/kernel/syscalls.S | 2 ++
include/asm-s390/unistd.h | 18 ++++++++++++++++--
3 files changed, 26 insertions(+), 2 deletions(-)
Index: quilt-2.6/arch/s390/kernel/compat_wrapper.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/compat_wrapper.S
+++ quilt-2.6/arch/s390/kernel/compat_wrapper.S
@@ -1682,3 +1682,11 @@ compat_sys_utimes_wrapper:
llgtr %r2,%r2 # char *
llgtr %r3,%r3 # struct compat_timeval *
jg compat_sys_utimes
+
+ .globl compat_sys_utimensat_wrapper
+compat_sys_utimensat_wrapper:
+ llgfr %r2,%r2 # unsigned int
+ llgtr %r3,%r3 # char *
+ llgtr %r4,%r4 # struct compat_timespec *
+ lgfr %r5,%r5 # int
+ jg compat_sys_utimensat
Index: quilt-2.6/arch/s390/kernel/syscalls.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/syscalls.S
+++ quilt-2.6/arch/s390/kernel/syscalls.S
@@ -322,3 +322,5 @@ NI_SYSCALL /* 310 sys_move_pages *
SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper)
SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
+NI_SYSCALL /* 314 sys_fallocate */
+SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
Index: quilt-2.6/include/asm-s390/unistd.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/unistd.h
+++ quilt-2.6/include/asm-s390/unistd.h
@@ -251,8 +251,9 @@
#define __NR_getcpu 311
#define __NR_epoll_pwait 312
#define __NR_utimes 313
-
-#define NR_syscalls 314
+/* Number 314 is reserved for new sys_fallocate */
+#define __NR_utimensat 315
+#define NR_syscalls 316
/*
* There are some system calls that are not present on 64 bit, some
@@ -346,6 +347,19 @@
#ifdef __KERNEL__
+#ifndef CONFIG_64BIT
+#define __IGNORE_select
+#else
+#define __IGNORE_time
+#endif
+
+/* Ignore NUMA system calls. Not wired up on s390. */
+#define __IGNORE_mbind
+#define __IGNORE_get_mempolicy
+#define __IGNORE_set_mempolicy
+#define __IGNORE_migrate_pages
+#define __IGNORE_move_pages
+
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
#define __ARCH_WANT_SYS_ALARM
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 3/5] Wire up signald, timerfd and eventfd syscalls.
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
2007-05-21 10:51 ` [patch 1/5] cio: Update documentation Martin Schwidefsky
2007-05-21 10:51 ` [patch 2/5] Wire up sys_utimensat Martin Schwidefsky
@ 2007-05-21 10:51 ` Martin Schwidefsky
2007-05-21 10:51 ` [patch 4/5] Make use of kretprobe_assert Martin Schwidefsky
2007-05-21 10:51 ` [patch 5/5] More verbose show_mem() like other architectures Martin Schwidefsky
4 siblings, 0 replies; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 003-eventfd.diff --]
[-- Type: text/plain, Size: 2474 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/compat_wrapper.S | 20 ++++++++++++++++++++
arch/s390/kernel/syscalls.S | 3 +++
include/asm-s390/unistd.h | 5 ++++-
3 files changed, 27 insertions(+), 1 deletion(-)
Index: quilt-2.6/arch/s390/kernel/compat_wrapper.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/compat_wrapper.S
+++ quilt-2.6/arch/s390/kernel/compat_wrapper.S
@@ -1690,3 +1690,23 @@ compat_sys_utimensat_wrapper:
llgtr %r4,%r4 # struct compat_timespec *
lgfr %r5,%r5 # int
jg compat_sys_utimensat
+
+ .globl compat_sys_signalfd_wrapper
+compat_sys_signalfd_wrapper:
+ lgfr %r2,%r2 # int
+ llgtr %r3,%r3 # compat_sigset_t *
+ llgfr %r4,%r4 # compat_size_t
+ jg compat_sys_signalfd
+
+ .globl compat_sys_timerfd_wrapper
+compat_sys_timerfd_wrapper:
+ lgfr %r2,%r2 # int
+ lgfr %r3,%r3 # int
+ lgfr %r4,%r4 # int
+ llgtr %r5,%r5 # struct compat_itimerspec *
+ jg compat_sys_timerfd
+
+ .globl sys_eventfd_wrapper
+sys_eventfd_wrapper:
+ llgfr %r2,%r2 # unsigned int
+ jg sys_eventfd
Index: quilt-2.6/arch/s390/kernel/syscalls.S
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/syscalls.S
+++ quilt-2.6/arch/s390/kernel/syscalls.S
@@ -324,3 +324,6 @@ SYSCALL(sys_epoll_pwait,sys_epoll_pwait,
SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper)
NI_SYSCALL /* 314 sys_fallocate */
SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */
+SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper)
+SYSCALL(sys_timerfd,sys_timerfd,compat_sys_timerfd_wrapper)
+SYSCALL(sys_eventfd,sys_eventfd,sys_eventfd_wrapper)
Index: quilt-2.6/include/asm-s390/unistd.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/unistd.h
+++ quilt-2.6/include/asm-s390/unistd.h
@@ -253,7 +253,10 @@
#define __NR_utimes 313
/* Number 314 is reserved for new sys_fallocate */
#define __NR_utimensat 315
-#define NR_syscalls 316
+#define __NR_signalfd 316
+#define __NR_timerfd 317
+#define __NR_eventfd 318
+#define NR_syscalls 319
/*
* There are some system calls that are not present on 64 bit, some
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 4/5] Make use of kretprobe_assert.
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
` (2 preceding siblings ...)
2007-05-21 10:51 ` [patch 3/5] Wire up signald, timerfd and eventfd syscalls Martin Schwidefsky
@ 2007-05-21 10:51 ` Martin Schwidefsky
2007-05-21 10:51 ` [patch 5/5] More verbose show_mem() like other architectures Martin Schwidefsky
4 siblings, 0 replies; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390
Cc: Ananth N Mavinakayanahalli, Maneesh Soni, Heiko Carstens,
Martin Schwidefsky
[-- Attachment #1: 004-kprobes.diff --]
[-- Type: text/plain, Size: 1038 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
s390 change for git commit 0f95b7fc839bc3272b1bf2325d8748a649bd3534.
That is print kprobes debug data before BUG().
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/kprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: quilt-2.6/arch/s390/kernel/kprobes.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/kprobes.c
+++ quilt-2.6/arch/s390/kernel/kprobes.c
@@ -413,7 +413,7 @@ static int __kprobes trampoline_probe_ha
break;
}
}
- BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address));
+ kretprobe_assert(ri, orig_ret_address, trampoline_address);
regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE;
reset_current_kprobe();
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [patch 5/5] More verbose show_mem() like other architectures.
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
` (3 preceding siblings ...)
2007-05-21 10:51 ` [patch 4/5] Make use of kretprobe_assert Martin Schwidefsky
@ 2007-05-21 10:51 ` Martin Schwidefsky
4 siblings, 0 replies; 8+ messages in thread
From: Martin Schwidefsky @ 2007-05-21 10:51 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 005-showmem.diff --]
[-- Type: text/plain, Size: 2280 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/mm/init.c | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
Index: quilt-2.6/arch/s390/mm/init.c
===================================================================
--- quilt-2.6.orig/arch/s390/mm/init.c
+++ quilt-2.6/arch/s390/mm/init.c
@@ -61,30 +61,38 @@ void diag10(unsigned long addr)
void show_mem(void)
{
- int i, total = 0, reserved = 0;
- int shared = 0, cached = 0;
+ int i, total = 0, reserved = 0;
+ int shared = 0, cached = 0;
struct page *page;
- printk("Mem-info:\n");
- show_free_areas();
- printk("Free swap: %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
- i = max_mapnr;
- while (i-- > 0) {
+ printk("Mem-info:\n");
+ show_free_areas();
+ printk("Free swap: %6ldkB\n", nr_swap_pages << (PAGE_SHIFT - 10));
+ i = max_mapnr;
+ while (i-- > 0) {
if (!pfn_valid(i))
continue;
page = pfn_to_page(i);
- total++;
+ total++;
if (PageReserved(page))
- reserved++;
+ reserved++;
else if (PageSwapCache(page))
- cached++;
+ cached++;
else if (page_count(page))
shared += page_count(page) - 1;
- }
- printk("%d pages of RAM\n",total);
- printk("%d reserved pages\n",reserved);
- printk("%d pages shared\n",shared);
- printk("%d pages swap cached\n",cached);
+ }
+ printk("%d pages of RAM\n", total);
+ printk("%d reserved pages\n", reserved);
+ printk("%d pages shared\n", shared);
+ printk("%d pages swap cached\n", cached);
+
+ printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY));
+ printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK));
+ printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED));
+ printk("%lu pages slab\n",
+ global_page_state(NR_SLAB_RECLAIMABLE) +
+ global_page_state(NR_SLAB_UNRECLAIMABLE));
+ printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE));
}
static void __init setup_ro_region(void)
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/5] cio: Update documentation.
2007-05-21 10:51 ` [patch 1/5] cio: Update documentation Martin Schwidefsky
@ 2007-05-21 11:53 ` Christoph Hellwig
2007-05-21 12:00 ` Cornelia Huck
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2007-05-21 11:53 UTC (permalink / raw)
To: Martin Schwidefsky; +Cc: linux-kernel, linux-s390, Cornelia Huck
On Mon, May 21, 2007 at 12:51:19PM +0200, Martin Schwidefsky wrote:
> From: Cornelia Huck <cornelia.huck@de.ibm.com>
>
> - read_dev_chars()/read_conf_data() are deprecated. Don't document them, but
> advise to issue the channel program from the driver itself.
What's the reason these function aren't just removed? They're just unused
bloat right now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/5] cio: Update documentation.
2007-05-21 11:53 ` Christoph Hellwig
@ 2007-05-21 12:00 ` Cornelia Huck
0 siblings, 0 replies; 8+ messages in thread
From: Cornelia Huck @ 2007-05-21 12:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Martin Schwidefsky, linux-kernel, linux-s390
On Mon, 21 May 2007 12:53:22 +0100,
Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, May 21, 2007 at 12:51:19PM +0200, Martin Schwidefsky wrote:
> > From: Cornelia Huck <cornelia.huck@de.ibm.com>
> >
> > - read_dev_chars()/read_conf_data() are deprecated. Don't document them, but
> > advise to issue the channel program from the driver itself.
>
> What's the reason these function aren't just removed? They're just unused
> bloat right now.
They had been a documented and exported interface for ages, and I
didn't feel like breaking external modules without some warning
beforehand.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-05-21 12:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 10:51 [patch 0/5] s390 patches for 2.6.22-rc2 Martin Schwidefsky
2007-05-21 10:51 ` [patch 1/5] cio: Update documentation Martin Schwidefsky
2007-05-21 11:53 ` Christoph Hellwig
2007-05-21 12:00 ` Cornelia Huck
2007-05-21 10:51 ` [patch 2/5] Wire up sys_utimensat Martin Schwidefsky
2007-05-21 10:51 ` [patch 3/5] Wire up signald, timerfd and eventfd syscalls Martin Schwidefsky
2007-05-21 10:51 ` [patch 4/5] Make use of kretprobe_assert Martin Schwidefsky
2007-05-21 10:51 ` [patch 5/5] More verbose show_mem() like other architectures Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox