From patchwork Fri Jan 12 14:34:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10161143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1EF2460327 for ; Fri, 12 Jan 2018 14:35:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D8BF28904 for ; Fri, 12 Jan 2018 14:35:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01E6028946; Fri, 12 Jan 2018 14:35:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3FC628904 for ; Fri, 12 Jan 2018 14:35:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934023AbeALOff (ORCPT ); Fri, 12 Jan 2018 09:35:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53186 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933940AbeALOff (ORCPT ); Fri, 12 Jan 2018 09:35:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 33C9978233; Fri, 12 Jan 2018 14:35:35 +0000 (UTC) Received: from t460s.redhat.com (unknown [10.36.118.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8B686562A; Fri, 12 Jan 2018 14:35:30 +0000 (UTC) From: David Hildenbrand To: kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Huth , Christian Borntraeger , Cornelia Huck , David Hildenbrand Subject: [PATCH kvm-unit-tests v2 05/11] s390x: rename sclp_setup() to sclp_ascii_setup() Date: Fri, 12 Jan 2018 15:34:11 +0100 Message-Id: <20180112143417.16743-6-david@redhat.com> In-Reply-To: <20180112143417.16743-1-david@redhat.com> References: <20180112143417.16743-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 12 Jan 2018 14:35:35 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 */