[kvm-unit-tests,v2,5/6] s390x: wire up sclp console output
diff mbox

Message ID 20170518113427.18387-6-david@redhat.com
State New
Headers show

Commit Message

David Hildenbrand May 18, 2017, 11:34 a.m. UTC
Now the basics should be working and therefore the self test should
pass.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 lib/s390x/io.c   | 5 +++--
 lib/s390x/sclp.h | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

Comments

Thomas Huth May 19, 2017, 9:33 a.m. UTC | #1
On 18.05.2017 13:34, David Hildenbrand wrote:
> Now the basics should be working and therefore the self test should
> pass.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  lib/s390x/io.c   | 5 +++--
>  lib/s390x/sclp.h | 3 +++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/s390x/io.c b/lib/s390x/io.c
> index a652124..067ecf7 100644
> --- a/lib/s390x/io.c
> +++ b/lib/s390x/io.c
> @@ -12,6 +12,7 @@
>   */
>  #include <libcflat.h>
>  #include <asm/spinlock.h>
> +#include "sclp.h"
>  
>  extern void setup_args_progname(const char *args);
>  extern char ipl_args[];
> @@ -21,8 +22,7 @@ static struct spinlock lock;
>  void puts(const char *s)
>  {
>  	spin_lock(&lock);
> -	/* FIXME */
> -	(void)s;
> +	sclp_print(s);
>  	spin_unlock(&lock);
>  }
>  
> @@ -39,6 +39,7 @@ static void sigp_stop()
>  void setup()
>  {
>  	setup_args_progname(ipl_args);
> +	sclp_setup();
>  }
>  
>  void exit(int code)
> diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
> index c48cc21..3f4c138 100644
> --- a/lib/s390x/sclp.h
> +++ b/lib/s390x/sclp.h
> @@ -102,4 +102,7 @@ typedef struct ReadEventData {
>      uint32_t mask;
>  } __attribute__((packed)) ReadEventData;
>  
> +void sclp_setup(void);
> +void sclp_print(const char *str);
> +
>  #endif /* SCLP_H */

Reviewed-by: Thomas Huth <thuth@redhat.com>

Patch
diff mbox

diff --git a/lib/s390x/io.c b/lib/s390x/io.c
index a652124..067ecf7 100644
--- a/lib/s390x/io.c
+++ b/lib/s390x/io.c
@@ -12,6 +12,7 @@ 
  */
 #include <libcflat.h>
 #include <asm/spinlock.h>
+#include "sclp.h"
 
 extern void setup_args_progname(const char *args);
 extern char ipl_args[];
@@ -21,8 +22,7 @@  static struct spinlock lock;
 void puts(const char *s)
 {
 	spin_lock(&lock);
-	/* FIXME */
-	(void)s;
+	sclp_print(s);
 	spin_unlock(&lock);
 }
 
@@ -39,6 +39,7 @@  static void sigp_stop()
 void setup()
 {
 	setup_args_progname(ipl_args);
+	sclp_setup();
 }
 
 void exit(int code)
diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
index c48cc21..3f4c138 100644
--- a/lib/s390x/sclp.h
+++ b/lib/s390x/sclp.h
@@ -102,4 +102,7 @@  typedef struct ReadEventData {
     uint32_t mask;
 } __attribute__((packed)) ReadEventData;
 
+void sclp_setup(void);
+void sclp_print(const char *str);
+
 #endif /* SCLP_H */