* [patch 00/11] s390 patches for 2.6.26-rc2
@ 2008-05-15 14:57 Martin Schwidefsky
2008-05-15 14:57 ` [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID Martin Schwidefsky
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390
Hi folks,
the number of bug fixes has grown past 10 so I guess it's time for
another patch set to get them upstream. Nothing exiting, the shortlog:
Cornelia Huck (4):
[S390] Remove last traces of cio_msg=.
[S390] dasd: Use const in busid functions.
[S390] s390dbf: Use const char * for dbf name.
[S390] tape: Use ccw_dev_id to build cdev_id.
Heiko Carstens (3):
[S390] sparsemem vmemmap: initialize memmap.
[S390] smp: __smp_call_function_map vs cpu_online_map fix.
[S390] show_interrupts: prevent cpu hotplug when walking cpu_online_map.
Huang Weiyi (1):
[S390] blacklist.c: removed duplicated include
Marcin Slusarz (1):
[S390] vmlogrdr: module initialization function should return negative errors
Michael Ernst (1):
[S390] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID.
Stefan Weinhuber (1):
[S390] dasd: fix timeout handling in interrupt handler
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 02/11] Remove last traces of cio_msg= Martin Schwidefsky
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Michael Ernst, Martin Schwidefsky
[-- Attachment #1: 001-cio-reconn.diff --]
[-- Type: text/plain, Size: 1376 bytes --]
From: Michael Ernst <mernst@de.ibm.com>
CCW_CMD_SUSPEND_RECONN causes a system hang if the cable of a
reserved DASD is disconnected and connected again.
Signed-off-by: Michael Ernst <mernst@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/device_pgid.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
Index: quilt-2.6/drivers/s390/cio/device_pgid.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device_pgid.c
+++ quilt-2.6/drivers/s390/cio/device_pgid.c
@@ -243,16 +243,10 @@ __ccw_device_do_pgid(struct ccw_device *
/* Setup sense path group id channel program. */
cdev->private->pgid[0].inf.fc = func;
ccw = cdev->private->iccws;
- if (!cdev->private->flags.pgid_single) {
- cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH;
- ccw->cmd_code = CCW_CMD_SUSPEND_RECONN;
- ccw->cda = 0;
- ccw->count = 0;
- ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC;
- ccw++;
- } else
+ if (cdev->private->flags.pgid_single)
cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH;
-
+ else
+ cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH;
ccw->cmd_code = CCW_CMD_SET_PGID;
ccw->cda = (__u32) __pa (&cdev->private->pgid[0]);
ccw->count = sizeof (struct pgid);
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 02/11] Remove last traces of cio_msg=.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
2008-05-15 14:57 ` [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 03/11] sparsemem vmemmap: initialize memmap Martin Schwidefsky
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky
[-- Attachment #1: 002-cio-cio_msg.diff --]
[-- Type: text/plain, Size: 954 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
cio_msg= is gone, also remove it from kernel-parameters.txt.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
Documentation/kernel-parameters.txt | 3 ---
1 file changed, 3 deletions(-)
Index: quilt-2.6/Documentation/kernel-parameters.txt
===================================================================
--- quilt-2.6.orig/Documentation/kernel-parameters.txt
+++ quilt-2.6/Documentation/kernel-parameters.txt
@@ -398,9 +398,6 @@ and is between 256 and 4096 characters.
cio_ignore= [S390]
See Documentation/s390/CommonIO for details.
- cio_msg= [S390]
- See Documentation/s390/CommonIO for details.
-
clock= [BUGS=X86-32, HW] gettimeofday clocksource override.
[Deprecated]
Forces specified clocksource (if available) to be used
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 03/11] sparsemem vmemmap: initialize memmap.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
2008-05-15 14:57 ` [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID Martin Schwidefsky
2008-05-15 14:57 ` [patch 02/11] Remove last traces of cio_msg= Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 04/11] vmlogrdr: module initialization function should return negative errors Martin Schwidefsky
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390
Cc: Gerald Schaefer, Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 003-sparsemem-fix.diff --]
[-- Type: text/plain, Size: 2138 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Let's just use the generic vmmemmap_alloc_block() function which
always returns initialized memory.
Cc: Gerald Schaefer <gerald.schaefer@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/vmem.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
Index: quilt-2.6/arch/s390/mm/vmem.c
===================================================================
--- quilt-2.6.orig/arch/s390/mm/vmem.c
+++ quilt-2.6/arch/s390/mm/vmem.c
@@ -27,19 +27,12 @@ struct memory_segment {
static LIST_HEAD(mem_segs);
-static void __ref *vmem_alloc_pages(unsigned int order)
-{
- if (slab_is_available())
- return (void *)__get_free_pages(GFP_KERNEL, order);
- return alloc_bootmem_pages((1 << order) * PAGE_SIZE);
-}
-
-static inline pud_t *vmem_pud_alloc(void)
+static pud_t *vmem_pud_alloc(void)
{
pud_t *pud = NULL;
#ifdef CONFIG_64BIT
- pud = vmem_alloc_pages(2);
+ pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0);
if (!pud)
return NULL;
clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4);
@@ -47,12 +40,12 @@ static inline pud_t *vmem_pud_alloc(void
return pud;
}
-static inline pmd_t *vmem_pmd_alloc(void)
+static pmd_t *vmem_pmd_alloc(void)
{
pmd_t *pmd = NULL;
#ifdef CONFIG_64BIT
- pmd = vmem_alloc_pages(2);
+ pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0);
if (!pmd)
return NULL;
clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4);
@@ -60,7 +53,7 @@ static inline pmd_t *vmem_pmd_alloc(void
return pmd;
}
-static pte_t __init_refok *vmem_pte_alloc(void)
+static pte_t __ref *vmem_pte_alloc(void)
{
pte_t *pte;
@@ -214,7 +207,7 @@ int __meminit vmemmap_populate(struct pa
if (pte_none(*pt_dir)) {
unsigned long new_page;
- new_page =__pa(vmem_alloc_pages(0));
+ new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0));
if (!new_page)
goto out;
pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL);
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 04/11] vmlogrdr: module initialization function should return negative errors
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (2 preceding siblings ...)
2008-05-15 14:57 ` [patch 03/11] sparsemem vmemmap: initialize memmap Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 05/11] blacklist.c: removed duplicated include Martin Schwidefsky
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Marcin Slusarz, Martin Schwidefsky
[-- Attachment #1: 004-vmlogrdr-rc.diff --]
[-- Type: text/plain, Size: 824 bytes --]
From: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/char/vmlogrdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: quilt-2.6/drivers/s390/char/vmlogrdr.c
===================================================================
--- quilt-2.6.orig/drivers/s390/char/vmlogrdr.c
+++ quilt-2.6/drivers/s390/char/vmlogrdr.c
@@ -858,7 +858,7 @@ static int __init vmlogrdr_init(void)
for (i=0; i < MAXMINOR; ++i ) {
sys_ser[i].buffer = (char *) get_zeroed_page(GFP_KERNEL);
if (!sys_ser[i].buffer) {
- rc = ENOMEM;
+ rc = -ENOMEM;
break;
}
sys_ser[i].current_position = sys_ser[i].buffer;
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 05/11] blacklist.c: removed duplicated include
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (3 preceding siblings ...)
2008-05-15 14:57 ` [patch 04/11] vmlogrdr: module initialization function should return negative errors Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 06/11] dasd: Use const in busid functions Martin Schwidefsky
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Huang Weiyi, Martin Schwidefsky
[-- Attachment #1: 005-cio-include.diff --]
[-- Type: text/plain, Size: 717 bytes --]
From: Huang Weiyi <weiyi.huang@gmail.com>
Removed duplicated include <asm/cio.h>
in drivers/s390/cio/blacklist.c.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/cio/blacklist.c | 1 -
1 file changed, 1 deletion(-)
Index: quilt-2.6/drivers/s390/cio/blacklist.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/blacklist.c
+++ quilt-2.6/drivers/s390/cio/blacklist.c
@@ -19,7 +19,6 @@
#include <asm/cio.h>
#include <asm/uaccess.h>
-#include <asm/cio.h>
#include "blacklist.h"
#include "cio.h"
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 06/11] dasd: Use const in busid functions.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (4 preceding siblings ...)
2008-05-15 14:57 ` [patch 05/11] blacklist.c: removed duplicated include Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 07/11] s390dbf: Use const char * for dbf name Martin Schwidefsky
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky
[-- Attachment #1: 006-dasd-const.diff --]
[-- Type: text/plain, Size: 2298 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
We should use 'const char *' in the busid functions since the
strings are not modified anyway.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/block/dasd_devmap.c | 10 +++++-----
drivers/s390/block/dasd_int.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
Index: quilt-2.6/drivers/s390/block/dasd_devmap.c
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dasd_devmap.c
+++ quilt-2.6/drivers/s390/block/dasd_devmap.c
@@ -86,10 +86,10 @@ static DEFINE_SPINLOCK(dasd_devmap_lock)
static struct list_head dasd_hashlists[256];
int dasd_max_devindex;
-static struct dasd_devmap *dasd_add_busid(char *, int);
+static struct dasd_devmap *dasd_add_busid(const char *, int);
static inline int
-dasd_hash_busid(char *bus_id)
+dasd_hash_busid(const char *bus_id)
{
int hash, i;
@@ -394,7 +394,7 @@ dasd_parse(void)
* devices.
*/
static struct dasd_devmap *
-dasd_add_busid(char *bus_id, int features)
+dasd_add_busid(const char *bus_id, int features)
{
struct dasd_devmap *devmap, *new, *tmp;
int hash;
@@ -430,7 +430,7 @@ dasd_add_busid(char *bus_id, int feature
* Find devmap for device with given bus_id.
*/
static struct dasd_devmap *
-dasd_find_busid(char *bus_id)
+dasd_find_busid(const char *bus_id)
{
struct dasd_devmap *devmap, *tmp;
int hash;
@@ -452,7 +452,7 @@ dasd_find_busid(char *bus_id)
* Check if busid has been added to the list of dasd ranges.
*/
int
-dasd_busid_known(char *bus_id)
+dasd_busid_known(const char *bus_id)
{
return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0;
}
Index: quilt-2.6/drivers/s390/block/dasd_int.h
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dasd_int.h
+++ quilt-2.6/drivers/s390/block/dasd_int.h
@@ -598,7 +598,7 @@ struct dasd_device *dasd_device_from_cde
struct dasd_device *dasd_device_from_devindex(int);
int dasd_parse(void);
-int dasd_busid_known(char *);
+int dasd_busid_known(const char *);
/* externals in dasd_gendisk.c */
int dasd_gendisk_init(void);
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 07/11] s390dbf: Use const char * for dbf name.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (5 preceding siblings ...)
2008-05-15 14:57 ` [patch 06/11] dasd: Use const in busid functions Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 08/11] dasd: fix timeout handling in interrupt handler Martin Schwidefsky
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky
[-- Attachment #1: 007-cio-s390dbf.diff --]
[-- Type: text/plain, Size: 3351 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
We should use const char * for passing the name of the debug feature
around since it will not be changed.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/debug.c | 20 ++++++++++----------
include/asm-s390/debug.h | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
Index: quilt-2.6/arch/s390/kernel/debug.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/debug.c
+++ quilt-2.6/arch/s390/kernel/debug.c
@@ -71,7 +71,7 @@ static ssize_t debug_input(struct file *
size_t user_len, loff_t * offset);
static int debug_open(struct inode *inode, struct file *file);
static int debug_close(struct inode *inode, struct file *file);
-static debug_info_t* debug_info_create(char *name, int pages_per_area,
+static debug_info_t *debug_info_create(const char *name, int pages_per_area,
int nr_areas, int buf_size, mode_t mode);
static void debug_info_get(debug_info_t *);
static void debug_info_put(debug_info_t *);
@@ -234,8 +234,8 @@ fail_malloc_areas:
*/
static debug_info_t*
-debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size,
- int level, int mode)
+debug_info_alloc(const char *name, int pages_per_area, int nr_areas,
+ int buf_size, int level, int mode)
{
debug_info_t* rc;
@@ -326,8 +326,8 @@ debug_info_free(debug_info_t* db_info){
*/
static debug_info_t*
-debug_info_create(char *name, int pages_per_area, int nr_areas, int buf_size,
- mode_t mode)
+debug_info_create(const char *name, int pages_per_area, int nr_areas,
+ int buf_size, mode_t mode)
{
debug_info_t* rc;
@@ -684,9 +684,9 @@ debug_close(struct inode *inode, struct
* - Returns handle for debug area
*/
-debug_info_t *debug_register_mode(char *name, int pages_per_area, int nr_areas,
- int buf_size, mode_t mode, uid_t uid,
- gid_t gid)
+debug_info_t *debug_register_mode(const char *name, int pages_per_area,
+ int nr_areas, int buf_size, mode_t mode,
+ uid_t uid, gid_t gid)
{
debug_info_t *rc = NULL;
@@ -722,8 +722,8 @@ EXPORT_SYMBOL(debug_register_mode);
* - returns handle for debug area
*/
-debug_info_t *debug_register(char *name, int pages_per_area, int nr_areas,
- int buf_size)
+debug_info_t *debug_register(const char *name, int pages_per_area,
+ int nr_areas, int buf_size)
{
return debug_register_mode(name, pages_per_area, nr_areas, buf_size,
S_IRUSR | S_IWUSR, 0, 0);
Index: quilt-2.6/include/asm-s390/debug.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/debug.h
+++ quilt-2.6/include/asm-s390/debug.h
@@ -120,10 +120,10 @@ debug_entry_t* debug_exception_common(de
/* Debug Feature API: */
-debug_info_t* debug_register(char* name, int pages, int nr_areas,
+debug_info_t *debug_register(const char *name, int pages, int nr_areas,
int buf_size);
-debug_info_t *debug_register_mode(char *name, int pages, int nr_areas,
+debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas,
int buf_size, mode_t mode, uid_t uid,
gid_t gid);
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 08/11] dasd: fix timeout handling in interrupt handler
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (6 preceding siblings ...)
2008-05-15 14:57 ` [patch 07/11] s390dbf: Use const char * for dbf name Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 09/11] tape: Use ccw_dev_id to build cdev_id Martin Schwidefsky
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Stefan Weinhuber, Martin Schwidefsky
[-- Attachment #1: 008-dasd-timeout.diff --]
[-- Type: text/plain, Size: 1524 bytes --]
From: Stefan Weinhuber <wein@de.ibm.com>
When the dasd_int_handler is called with an error code instead of
an irb, the associated request should be restarted. This handling
was missing from the -ETIMEDOUT case. In fact it should be done in
any case.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/block/dasd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: quilt-2.6/drivers/s390/block/dasd.c
===================================================================
--- quilt-2.6.orig/drivers/s390/block/dasd.c
+++ quilt-2.6/drivers/s390/block/dasd.c
@@ -925,6 +925,8 @@ static void dasd_handle_killed_request(s
struct dasd_ccw_req *cqr;
struct dasd_device *device;
+ if (!intparm)
+ return;
cqr = (struct dasd_ccw_req *) intparm;
if (cqr->status != DASD_CQR_IN_IO) {
MESSAGE(KERN_DEBUG,
@@ -976,17 +978,16 @@ void dasd_int_handler(struct ccw_device
if (IS_ERR(irb)) {
switch (PTR_ERR(irb)) {
case -EIO:
- dasd_handle_killed_request(cdev, intparm);
break;
case -ETIMEDOUT:
printk(KERN_WARNING"%s(%s): request timed out\n",
__func__, cdev->dev.bus_id);
- //FIXME - dasd uses own timeout interface...
break;
default:
printk(KERN_WARNING"%s(%s): unknown error %ld\n",
__func__, cdev->dev.bus_id, PTR_ERR(irb));
}
+ dasd_handle_killed_request(cdev, intparm);
return;
}
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 09/11] tape: Use ccw_dev_id to build cdev_id.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (7 preceding siblings ...)
2008-05-15 14:57 ` [patch 08/11] dasd: fix timeout handling in interrupt handler Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 10/11] smp: __smp_call_function_map vs cpu_online_map fix Martin Schwidefsky
2008-05-15 14:57 ` [patch 11/11] show_interrupts: prevent cpu hotplug when walking cpu_online_map Martin Schwidefsky
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky
[-- Attachment #1: 009-tape-devid.diff --]
[-- Type: text/plain, Size: 1982 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To construct the integer containing the information from the bus_id,
it is easier to use the data from ccw_dev_id than to parse the bus_id.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/char/tape_core.c | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
Index: quilt-2.6/drivers/s390/char/tape_core.c
===================================================================
--- quilt-2.6.orig/drivers/s390/char/tape_core.c
+++ quilt-2.6/drivers/s390/char/tape_core.c
@@ -76,32 +76,9 @@ const char *tape_op_verbose[TO_SIZE] =
[TO_KEKL_QUERY] = "KLQ",[TO_RDC] = "RDC",
};
-static int
-busid_to_int(char *bus_id)
+static int devid_to_int(struct ccw_dev_id *dev_id)
{
- int dec;
- int d;
- char * s;
-
- for(s = bus_id, d = 0; *s != '\0' && *s != '.'; s++)
- d = (d * 10) + (*s - '0');
- dec = d;
- for(s++, d = 0; *s != '\0' && *s != '.'; s++)
- d = (d * 10) + (*s - '0');
- dec = (dec << 8) + d;
-
- for(s++; *s != '\0'; s++) {
- if (*s >= '0' && *s <= '9') {
- d = *s - '0';
- } else if (*s >= 'a' && *s <= 'f') {
- d = *s - 'a' + 10;
- } else {
- d = *s - 'A' + 10;
- }
- dec = (dec << 4) + d;
- }
-
- return dec;
+ return dev_id->devno + (dev_id->ssid << 16);
}
/*
@@ -551,6 +528,7 @@ tape_generic_probe(struct ccw_device *cd
{
struct tape_device *device;
int ret;
+ struct ccw_dev_id dev_id;
device = tape_alloc_device();
if (IS_ERR(device))
@@ -565,7 +543,8 @@ tape_generic_probe(struct ccw_device *cd
cdev->dev.driver_data = device;
cdev->handler = __tape_do_irq;
device->cdev = cdev;
- device->cdev_id = busid_to_int(cdev->dev.bus_id);
+ ccw_device_get_id(cdev, &dev_id);
+ device->cdev_id = devid_to_int(&dev_id);
PRINT_INFO("tape device %s found\n", cdev->dev.bus_id);
return ret;
}
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 10/11] smp: __smp_call_function_map vs cpu_online_map fix.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (8 preceding siblings ...)
2008-05-15 14:57 ` [patch 09/11] tape: Use ccw_dev_id to build cdev_id Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
2008-05-15 14:57 ` [patch 11/11] show_interrupts: prevent cpu hotplug when walking cpu_online_map Martin Schwidefsky
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 010-smp-call-lock.diff --]
[-- Type: text/plain, Size: 2754 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Both smp_call_function() and __smp_call_function_map() access
cpu_online_map. Both functions run with preemption disabled which
protects for cpus going offline. However new cpus can be added and
therefore the cpu_online_map can change unexpectedly.
So use the call_lock to protect against changes to the cpu_online_map
in start_secondary() and all smp_call_* functions.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/smp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
Index: quilt-2.6/arch/s390/kernel/smp.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/smp.c
+++ quilt-2.6/arch/s390/kernel/smp.c
@@ -139,7 +139,6 @@ static void __smp_call_function_map(void
if (wait)
data.finished = CPU_MASK_NONE;
- spin_lock(&call_lock);
call_data = &data;
for_each_cpu_mask(cpu, map)
@@ -151,7 +150,6 @@ static void __smp_call_function_map(void
if (wait)
while (!cpus_equal(map, data.finished))
cpu_relax();
- spin_unlock(&call_lock);
out:
if (local) {
local_irq_disable();
@@ -177,11 +175,11 @@ int smp_call_function(void (*func) (void
{
cpumask_t map;
- preempt_disable();
+ spin_lock(&call_lock);
map = cpu_online_map;
cpu_clear(smp_processor_id(), map);
__smp_call_function_map(func, info, nonatomic, wait, map);
- preempt_enable();
+ spin_unlock(&call_lock);
return 0;
}
EXPORT_SYMBOL(smp_call_function);
@@ -202,10 +200,10 @@ EXPORT_SYMBOL(smp_call_function);
int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
int nonatomic, int wait)
{
- preempt_disable();
+ spin_lock(&call_lock);
__smp_call_function_map(func, info, nonatomic, wait,
cpumask_of_cpu(cpu));
- preempt_enable();
+ spin_unlock(&call_lock);
return 0;
}
EXPORT_SYMBOL(smp_call_function_single);
@@ -228,10 +226,10 @@ EXPORT_SYMBOL(smp_call_function_single);
int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
int wait)
{
- preempt_disable();
+ spin_lock(&call_lock);
cpu_clear(smp_processor_id(), mask);
__smp_call_function_map(func, info, 0, wait, mask);
- preempt_enable();
+ spin_unlock(&call_lock);
return 0;
}
EXPORT_SYMBOL(smp_call_function_mask);
@@ -592,7 +590,9 @@ int __cpuinit start_secondary(void *cpuv
pfault_init();
/* Mark this cpu as online */
+ spin_lock(&call_lock);
cpu_set(smp_processor_id(), cpu_online_map);
+ spin_unlock(&call_lock);
/* Switch on interrupts */
local_irq_enable();
/* Print info about this processor */
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [patch 11/11] show_interrupts: prevent cpu hotplug when walking cpu_online_map.
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
` (9 preceding siblings ...)
2008-05-15 14:57 ` [patch 10/11] smp: __smp_call_function_map vs cpu_online_map fix Martin Schwidefsky
@ 2008-05-15 14:57 ` Martin Schwidefsky
10 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2008-05-15 14:57 UTC (permalink / raw)
To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky
[-- Attachment #1: 011-show-interrupts.diff --]
[-- Type: text/plain, Size: 1037 bytes --]
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Surround all the code withing show_interrupts() with
get/put_online_cpus() to prevent strange results wrt cpu hotplug.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
arch/s390/kernel/irq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: quilt-2.6/arch/s390/kernel/irq.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/irq.c
+++ quilt-2.6/arch/s390/kernel/irq.c
@@ -25,6 +25,7 @@ int show_interrupts(struct seq_file *p,
static const char *intrclass_names[] = { "EXT", "I/O", };
int i = *(loff_t *) v, j;
+ get_online_cpus();
if (i == 0) {
seq_puts(p, " ");
for_each_online_cpu(j)
@@ -43,7 +44,7 @@ int show_interrupts(struct seq_file *p,
seq_putc(p, '\n');
}
-
+ put_online_cpus();
return 0;
}
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-05-15 14:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15 14:57 [patch 00/11] s390 patches for 2.6.26-rc2 Martin Schwidefsky
2008-05-15 14:57 ` [patch 01/11] cio: Remove CCW_CMD_SUSPEND_RECONN in front of CCW_CMD_SET_PGID Martin Schwidefsky
2008-05-15 14:57 ` [patch 02/11] Remove last traces of cio_msg= Martin Schwidefsky
2008-05-15 14:57 ` [patch 03/11] sparsemem vmemmap: initialize memmap Martin Schwidefsky
2008-05-15 14:57 ` [patch 04/11] vmlogrdr: module initialization function should return negative errors Martin Schwidefsky
2008-05-15 14:57 ` [patch 05/11] blacklist.c: removed duplicated include Martin Schwidefsky
2008-05-15 14:57 ` [patch 06/11] dasd: Use const in busid functions Martin Schwidefsky
2008-05-15 14:57 ` [patch 07/11] s390dbf: Use const char * for dbf name Martin Schwidefsky
2008-05-15 14:57 ` [patch 08/11] dasd: fix timeout handling in interrupt handler Martin Schwidefsky
2008-05-15 14:57 ` [patch 09/11] tape: Use ccw_dev_id to build cdev_id Martin Schwidefsky
2008-05-15 14:57 ` [patch 10/11] smp: __smp_call_function_map vs cpu_online_map fix Martin Schwidefsky
2008-05-15 14:57 ` [patch 11/11] show_interrupts: prevent cpu hotplug when walking cpu_online_map Martin Schwidefsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.