public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/6] latest bug fixes for s390.
@ 2008-07-31 12:30 Martin Schwidefsky
  2008-07-31 12:30 ` [patch 1/6] Remove diag 0x260 call from memory detection Martin Schwidefsky
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390

Greetings,
just a couple of additional bug fixes for 2.6.27-rc1. The only
one which is remotely interesting is the diag 0x260 removal.
The memory detection code stops using it anymore because there
are situations where the value you get from it just isn't usable.
I'll add them to git390 for the next please pull.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 1/6] Remove diag 0x260 call from memory detection.
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  2008-07-31 12:30 ` [patch 2/6] stp: fix section mismatch warning Martin Schwidefsky
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 100-rm-diag260.diff --]
[-- Type: text/plain, Size: 1571 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

The result of the diag 0x260 call is not always what one would expect.
So just remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/kernel/mem_detect.c |   23 -----------------------
 1 file changed, 23 deletions(-)

Index: quilt-2.6/arch/s390/kernel/mem_detect.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/mem_detect.c
+++ quilt-2.6/arch/s390/kernel/mem_detect.c
@@ -9,27 +9,6 @@
 #include <asm/sclp.h>
 #include <asm/setup.h>
 
-static int memory_fast_detect(struct mem_chunk *chunk)
-{
-	unsigned long val0 = 0;
-	unsigned long val1 = 0xc;
-	int rc = -EOPNOTSUPP;
-
-	if (ipl_flags & IPL_NSS_VALID)
-		return -EOPNOTSUPP;
-	asm volatile(
-		"	diag	%1,%2,0x260\n"
-		"0:	lhi	%0,0\n"
-		"1:\n"
-		EX_TABLE(0b,1b)
-		: "+d" (rc), "+d" (val0), "+d" (val1) : : "cc");
-
-	if (rc || val0 != val1)
-		return -EOPNOTSUPP;
-	chunk->size = val0 + 1;
-	return 0;
-}
-
 static inline int tprot(unsigned long addr)
 {
 	int rc = -EFAULT;
@@ -84,8 +63,6 @@ void detect_memory_layout(struct mem_chu
 	unsigned long flags, cr0;
 
 	memset(chunk, 0, MEMORY_CHUNKS * sizeof(struct mem_chunk));
-	if (memory_fast_detect(&chunk[0]) == 0)
-		return;
 	/* Disable IRQs, DAT and low address protection so tprot does the
 	 * right thing and we don't get scheduled away with low address
 	 * protection disabled.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 2/6] stp: fix section mismatch warning.
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
  2008-07-31 12:30 ` [patch 1/6] Remove diag 0x260 call from memory detection Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  2008-07-31 12:30 ` [patch 3/6] qdio: fix section mismatch bug Martin Schwidefsky
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 101-stp-section.diff --]
[-- Type: text/plain, Size: 1398 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Fix these two (false positive) warnings by adding an __init annoation:

WARNING: vmlinux.o(.text+0x7e6a): Section mismatch in reference from the function stp_reset() to the function .init.text:__alloc_bootmem()
The function stp_reset() references
the function __init __alloc_bootmem().
This is often because stp_reset lacks a __init
annotation or the annotation of __alloc_bootmem is wrong.

WARNING: vmlinux.o(.text+0x7ece): Section mismatch in reference from the function stp_reset() to the function .init.text:free_bootmem()
The function stp_reset() references
the function __init free_bootmem().
This is often because stp_reset lacks a __init
annotation or the annotation of free_bootmem is wrong.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 arch/s390/kernel/time.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: quilt-2.6/arch/s390/kernel/time.c
===================================================================
--- quilt-2.6.orig/arch/s390/kernel/time.c
+++ quilt-2.6/arch/s390/kernel/time.c
@@ -1348,7 +1348,7 @@ early_param("stp", early_parse_stp);
 /*
  * Reset STP attachment.
  */
-static void stp_reset(void)
+static void __init stp_reset(void)
 {
 	int rc;
 

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 3/6] qdio: fix section mismatch bug.
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
  2008-07-31 12:30 ` [patch 1/6] Remove diag 0x260 call from memory detection Martin Schwidefsky
  2008-07-31 12:30 ` [patch 2/6] stp: fix section mismatch warning Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  2008-07-31 12:30 ` [patch 4/6] cio: Include linux/string.h in schid.h Martin Schwidefsky
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 102-qdio-section.diff --]
[-- Type: text/plain, Size: 2235 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Fix the two section mismatch warnings below.
This fixes two real bugs since the code which has __exit annotations
may already be gone when it is called.

WARNING: vmlinux.o(.init.text+0x1cc4a): Section mismatch in reference from the function init_QDIO() to the function .exit.text:qdio_setup_exit()
The function __init init_QDIO() references
a function __exit qdio_setup_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
qdio_setup_exit() so it may be used outside an exit section.

WARNING: vmlinux.o(.init.text+0x1cc7a): Section mismatch in reference from the function init_QDIO() to the function .exit.text:qdio_remove_perf_stats()
The function __init init_QDIO() references
a function __exit qdio_remove_perf_stats().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
qdio_remove_perf_stats() so it may be used outside an exit section.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/cio/qdio_perf.c  |    2 +-
 drivers/s390/cio/qdio_setup.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: quilt-2.6/drivers/s390/cio/qdio_perf.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/qdio_perf.c
+++ quilt-2.6/drivers/s390/cio/qdio_perf.c
@@ -142,7 +142,7 @@ int __init qdio_setup_perf_stats(void)
 	return 0;
 }
 
-void __exit qdio_remove_perf_stats(void)
+void qdio_remove_perf_stats(void)
 {
 #ifdef CONFIG_PROC_FS
 	remove_proc_entry("qdio_perf", NULL);
Index: quilt-2.6/drivers/s390/cio/qdio_setup.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/qdio_setup.c
+++ quilt-2.6/drivers/s390/cio/qdio_setup.c
@@ -515,7 +515,7 @@ int __init qdio_setup_init(void)
 	return 0;
 }
 
-void __exit qdio_setup_exit(void)
+void qdio_setup_exit(void)
 {
 	kmem_cache_destroy(qdio_q_cache);
 }

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 4/6] cio: Include linux/string.h in schid.h.
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
                   ` (2 preceding siblings ...)
  2008-07-31 12:30 ` [patch 3/6] qdio: fix section mismatch bug Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  2008-07-31 12:30 ` [patch 5/6] virtio console: fix section mismatch warning Martin Schwidefsky
  2008-07-31 12:30 ` [patch 6/6] dont use kthread for smp_rescan_cpus() Martin Schwidefsky
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: Cornelia Huck, Martin Schwidefsky

[-- Attachment #1: 103-cio-string.diff --]
[-- Type: text/plain, Size: 774 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

schid.h needs string.h for memset and memcmp.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 include/asm-s390/schid.h |    1 +
 1 file changed, 1 insertion(+)

Index: quilt-2.6/include/asm-s390/schid.h
===================================================================
--- quilt-2.6.orig/include/asm-s390/schid.h
+++ quilt-2.6/include/asm-s390/schid.h
@@ -11,6 +11,7 @@ struct subchannel_id {
 } __attribute__ ((packed, aligned(4)));
 
 #ifdef __KERNEL__
+#include <linux/string.h>
 
 /* Helper function for sane state of pre-allocated subchannel_id. */
 static inline void

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 5/6] virtio console: fix section mismatch warning.
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
                   ` (3 preceding siblings ...)
  2008-07-31 12:30 ` [patch 4/6] cio: Include linux/string.h in schid.h Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  2008-07-31 12:30 ` [patch 6/6] dont use kthread for smp_rescan_cpus() Martin Schwidefsky
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390
  Cc: Christian Borntraeger, Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 104-virtio-console.diff --]
[-- Type: text/plain, Size: 1603 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Fix these two false positive warnings:

WARNING: vmlinux.o(.text+0x2e1cc4): Section mismatch in reference from the function s390_virtio_console_init() to the function .init.text:early_put_chars()
The function s390_virtio_console_init() references
the function __init early_put_chars().
This is often because s390_virtio_console_init lacks a __init 
annotation or the annotation of early_put_chars is wrong.

WARNING: vmlinux.o(.text+0x2e1cd0): Section mismatch in reference from the function s390_virtio_console_init() to the function .init.text:virtio_cons_early_init()
The function s390_virtio_console_init() references
the function __init virtio_cons_early_init().
This is often because s390_virtio_console_init lacks a __init 
annotation or the annotation of virtio_cons_early_init is wrong.

Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/kvm/kvm_virtio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: quilt-2.6/drivers/s390/kvm/kvm_virtio.c
===================================================================
--- quilt-2.6.orig/drivers/s390/kvm/kvm_virtio.c
+++ quilt-2.6/drivers/s390/kvm/kvm_virtio.c
@@ -352,7 +352,7 @@ static __init int early_put_chars(u32 vt
 	return len;
 }
 
-void s390_virtio_console_init(void)
+void __init s390_virtio_console_init(void)
 {
 	virtio_cons_early_init(early_put_chars);
 }

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* [patch 6/6] dont use kthread for smp_rescan_cpus().
  2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
                   ` (4 preceding siblings ...)
  2008-07-31 12:30 ` [patch 5/6] virtio console: fix section mismatch warning Martin Schwidefsky
@ 2008-07-31 12:30 ` Martin Schwidefsky
  5 siblings, 0 replies; 7+ messages in thread
From: Martin Schwidefsky @ 2008-07-31 12:30 UTC (permalink / raw)
  To: linux-kernel, linux-s390; +Cc: Heiko Carstens, Martin Schwidefsky

[-- Attachment #1: 105-sclp-kthread-remove.diff --]
[-- Type: text/plain, Size: 1545 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Since git commit 3da1c84c00c7e5fa8348336bd8c342f9128b0f14
"workqueues: make get_online_cpus() useable for work->func()"
it is safe to call get_online_cpus() from workqueue context.
So remove the kthread workaround again.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/char/sclp_config.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Index: quilt-2.6/drivers/s390/char/sclp_config.c
===================================================================
--- quilt-2.6.orig/drivers/s390/char/sclp_config.c
+++ quilt-2.6/drivers/s390/char/sclp_config.c
@@ -8,7 +8,6 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/cpu.h>
-#include <linux/kthread.h>
 #include <linux/sysdev.h>
 #include <linux/workqueue.h>
 #include <asm/smp.h>
@@ -41,19 +40,9 @@ static void sclp_cpu_capability_notify(s
 	put_online_cpus();
 }
 
-static int sclp_cpu_kthread(void *data)
-{
-	smp_rescan_cpus();
-	return 0;
-}
-
 static void __ref sclp_cpu_change_notify(struct work_struct *work)
 {
-	/* Can't call smp_rescan_cpus() from  workqueue context since it may
-	 * deadlock in case of cpu hotplug. So we have to create a kernel
-	 * thread in order to call it.
-	 */
-	kthread_run(sclp_cpu_kthread, NULL, "cpu_rescan");
+	smp_rescan_cpus();
 }
 
 static void sclp_conf_receiver_fn(struct evbuf_header *evbuf)

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

end of thread, other threads:[~2008-07-31 12:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 12:30 [patch 0/6] latest bug fixes for s390 Martin Schwidefsky
2008-07-31 12:30 ` [patch 1/6] Remove diag 0x260 call from memory detection Martin Schwidefsky
2008-07-31 12:30 ` [patch 2/6] stp: fix section mismatch warning Martin Schwidefsky
2008-07-31 12:30 ` [patch 3/6] qdio: fix section mismatch bug Martin Schwidefsky
2008-07-31 12:30 ` [patch 4/6] cio: Include linux/string.h in schid.h Martin Schwidefsky
2008-07-31 12:30 ` [patch 5/6] virtio console: fix section mismatch warning Martin Schwidefsky
2008-07-31 12:30 ` [patch 6/6] dont use kthread for smp_rescan_cpus() Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox