From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: [PATCH kvm-unit-tests v3 05/11] s390x: rename sclp_setup() to sclp_ascii_setup() Date: Tue, 13 Feb 2018 17:23:15 +0100 Message-ID: <20180213162321.20522-6-david@redhat.com> References: <20180213162321.20522-1-david@redhat.com> Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Huth , Cornelia Huck , Christian Borntraeger , David Hildenbrand To: kvm@vger.kernel.org Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934776AbeBMQXb (ORCPT ); Tue, 13 Feb 2018 11:23:31 -0500 In-Reply-To: <20180213162321.20522-1-david@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: We'll be introducing some other sclp related files including setup functions soon. Also allow to call sclp_service_call() from these (including reusing the buffer). Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- lib/s390x/io.c | 2 +- lib/s390x/sclp-ascii.c | 6 +++--- lib/s390x/sclp.h | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/s390x/io.c b/lib/s390x/io.c index 12f9d26..3121a78 100644 --- a/lib/s390x/io.c +++ b/lib/s390x/io.c @@ -42,7 +42,7 @@ void setup() { setup_args_progname(ipl_args); setup_facilities(); - sclp_setup(); + sclp_ascii_setup(); } void exit(int code) diff --git a/lib/s390x/sclp-ascii.c b/lib/s390x/sclp-ascii.c index dfb9e68..893ca17 100644 --- a/lib/s390x/sclp-ascii.c +++ b/lib/s390x/sclp-ascii.c @@ -13,10 +13,10 @@ #include #include "sclp.h" -static char _sccb[PAGE_SIZE] __attribute__((__aligned__(4096))); +char _sccb[PAGE_SIZE] __attribute__((__aligned__(4096))); /* Perform service call. Return 0 on success, non-zero otherwise. */ -static int sclp_service_call(unsigned int command, void *sccb) +int sclp_service_call(unsigned int command, void *sccb) { int cc; @@ -47,7 +47,7 @@ static void sclp_set_write_mask(void) sclp_service_call(SCLP_CMD_WRITE_EVENT_MASK, sccb); } -void sclp_setup(void) +void sclp_ascii_setup(void) { sclp_set_write_mask(); } diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h index a1d0a5e..d113cf8 100644 --- a/lib/s390x/sclp.h +++ b/lib/s390x/sclp.h @@ -207,7 +207,9 @@ typedef struct ReadEventData { uint32_t mask; } __attribute__((packed)) ReadEventData; -void sclp_setup(void); +void sclp_ascii_setup(void); void sclp_print(const char *str); +extern char _sccb[]; +int sclp_service_call(unsigned int command, void *sccb); #endif /* SCLP_H */ -- 2.14.3