All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] s390 patches for v2.6.31-rc7
@ 2009-08-23 19:37 Martin Schwidefsky
  2009-08-23 20:15 ` Bastian Blank
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Schwidefsky @ 2009-08-23 19:37 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-s390, Heiko Carstens

Hi Linus,

please pull from 'for-linus' branch of

	git://git390.marist.edu/pub/scm/linux-2.6.git for-linus

to receive the following updates:

Hendrik Brueckner (1):
      [S390] set preferred console based on conmode

Julia Lawall (1):
      [S390] drivers/s390: put NULL test before dereference

Sebastian Ott (1):
      [S390] cio: fix double free after failed device initialization

 arch/s390/kernel/setup.c  |   25 ++++++++++++++++++-------
 drivers/s390/block/dasd.c |    2 +-
 drivers/s390/cio/device.c |    4 +---
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 9717717..cbb897b 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -154,6 +154,20 @@ static int __init condev_setup(char *str)
 
 __setup("condev=", condev_setup);
 
+static void __init set_preferred_console(void)
+{
+	if (MACHINE_IS_KVM) {
+		add_preferred_console("hvc", 0, NULL);
+		s390_virtio_console_init();
+		return;
+	}
+
+	if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP)
+		add_preferred_console("ttyS", 0, NULL);
+	if (CONSOLE_IS_3270)
+		add_preferred_console("tty3270", 0, NULL);
+}
+
 static int __init conmode_setup(char *str)
 {
 #if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
@@ -168,6 +182,7 @@ static int __init conmode_setup(char *str)
 	if (strncmp(str, "3270", 5) == 0)
 		SET_CONSOLE_3270;
 #endif
+	set_preferred_console();
         return 1;
 }
 
@@ -780,9 +795,6 @@ static void __init setup_hwcaps(void)
 void __init
 setup_arch(char **cmdline_p)
 {
-	/* set up preferred console */
-	add_preferred_console("ttyS", 0, NULL);
-
         /*
          * print what head.S has found out about the machine
          */
@@ -802,11 +814,9 @@ setup_arch(char **cmdline_p)
 	if (MACHINE_IS_VM)
 		pr_info("Linux is running as a z/VM "
 			"guest operating system in 64-bit mode\n");
-	else if (MACHINE_IS_KVM) {
+	else if (MACHINE_IS_KVM)
 		pr_info("Linux is running under KVM in 64-bit mode\n");
-		add_preferred_console("hvc", 0, NULL);
-		s390_virtio_console_init();
-	} else
+	else
 		pr_info("Linux is running natively in 64-bit mode\n");
 #endif /* CONFIG_64BIT */
 
@@ -851,6 +861,7 @@ setup_arch(char **cmdline_p)
 
         /* Setup default console */
 	conmode_default();
+	set_preferred_console();
 
 	/* Setup zfcpdump support */
 	setup_zfcpdump(console_devno);
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 7498366..3f62dd5 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2135,9 +2135,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 	struct dasd_device *base;
 
 	block = bdev->bd_disk->private_data;
-	base = block->base;
 	if (!block)
 		return -ENODEV;
+	base = block->base;
 
 	if (!base->discipline ||
 	    !base->discipline->fill_geometry)
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 3c57c1a..d593bc7 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -772,10 +772,8 @@ static struct ccw_device * io_subchannel_create_ccwdev(struct subchannel *sch)
 	cdev = io_subchannel_allocate_dev(sch);
 	if (!IS_ERR(cdev)) {
 		ret = io_subchannel_initialize_dev(sch, cdev);
-		if (ret) {
-			kfree(cdev);
+		if (ret)
 			cdev = ERR_PTR(ret);
-		}
 	}
 	return cdev;
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] s390 patches for v2.6.31-rc7
  2009-08-23 19:37 [GIT PULL] s390 patches for v2.6.31-rc7 Martin Schwidefsky
@ 2009-08-23 20:15 ` Bastian Blank
  2009-08-24 13:53   ` Hendrik Brueckner
  0 siblings, 1 reply; 3+ messages in thread
From: Bastian Blank @ 2009-08-23 20:15 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: linux-kernel, linux-s390, Heiko Carstens

On Sun, Aug 23, 2009 at 09:37:14PM +0200, Martin Schwidefsky wrote:
> +static void __init set_preferred_console(void)
> +{
> +	if (MACHINE_IS_KVM) {
> +		add_preferred_console("hvc", 0, NULL);
> +		s390_virtio_console_init();
> +		return;
> +	}

Why this early return instead of else if as all options are mutually
exclusive? Also why do you init the virtio console here instead of an
console_initcall?

Bastian

-- 
Four thousand throats may be cut in one night by a running man.
		-- Klingon Soldier, "Day of the Dove", stardate unknown

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GIT PULL] s390 patches for v2.6.31-rc7
  2009-08-23 20:15 ` Bastian Blank
@ 2009-08-24 13:53   ` Hendrik Brueckner
  0 siblings, 0 replies; 3+ messages in thread
From: Hendrik Brueckner @ 2009-08-24 13:53 UTC (permalink / raw)
  To: Bastian Blank
  Cc: Martin Schwidefsky, linux-kernel, linux-s390, Heiko Carstens

Bastian,

thanks for your feedback.

On Sun, Aug 23, 2009 at 10:15:26PM +0200, Bastian Blank wrote:
> On Sun, Aug 23, 2009 at 09:37:14PM +0200, Martin Schwidefsky wrote:
> > +static void __init set_preferred_console(void)
> > +{
> > +	if (MACHINE_IS_KVM) {
> > +		add_preferred_console("hvc", 0, NULL);
> > +		s390_virtio_console_init();
> > +		return;
> > +	}
> 
> Why this early return instead of else if as all options are mutually
> exclusive? Also why do you init the virtio console here instead of an
> console_initcall?
This is a bug fix to set the respective preferred console device for
conmode=3270. To make as few changes as possible for -rc7, the console
initialization for kvm has been moved to the new function.

You are right that s390_virtio_console_init() should be called from a 
console_initcall().  I started working on another patch to solve this
issue for the next kernel release.

Best regards,
  Hendrik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-24 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-23 19:37 [GIT PULL] s390 patches for v2.6.31-rc7 Martin Schwidefsky
2009-08-23 20:15 ` Bastian Blank
2009-08-24 13:53   ` Hendrik Brueckner

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.