From patchwork Mon Jan 21 10:45:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10773531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7B9D31575 for ; Mon, 21 Jan 2019 10:46:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C1D029E34 for ; Mon, 21 Jan 2019 10:46:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 606AA29E35; Mon, 21 Jan 2019 10:46:08 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 EE9AD29E31 for ; Mon, 21 Jan 2019 10:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727599AbfAUKqG (ORCPT ); Mon, 21 Jan 2019 05:46:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47662 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbfAUKqG (ORCPT ); Mon, 21 Jan 2019 05:46:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30280C0528AC; Mon, 21 Jan 2019 10:46:06 +0000 (UTC) Received: from thuth.com (ovpn-116-152.ams2.redhat.com [10.36.116.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id E408B68360; Mon, 21 Jan 2019 10:46:04 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, Paolo Bonzini , =?utf-8?b?UmFk?= =?utf-8?b?aW0gS3LEjW3DocWZ?= Cc: David Hildenbrand , Janosch Frank Subject: [kvm-unit-tests PULL 01/10] s390x: cleanup and add SCLP defines Date: Mon, 21 Jan 2019 11:45:46 +0100 Message-Id: <1548067555-15766-2-git-send-email-thuth@redhat.com> In-Reply-To: <1548067555-15766-1-git-send-email-thuth@redhat.com> References: <1548067555-15766-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 21 Jan 2019 10:46:06 +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 From: David Hildenbrand Reading the Linux kernel SCLP code, one might wonder what certain magic values mean and why we don't have to set them in our SCLP code. So let's define them for us. We might want to make use of them in the future. Add two new defines for values used in the linux kernel - SCLP_FC_SINGLE_INCREMENT_ASSIGN (used to speed up memory hotplug) - SCLP_FC_DUMP_INDICATOR (used to get more reasonable dumps) Also rename SCLP_VARIABLE_LENGTH_RESPONSE to SCLP_CM2_VARIABLE_LENGTH_RESPONSE, so it is clear where this is actually used. Move the defines to separate sections. Signed-off-by: David Hildenbrand Reviewed-by: Janosch Frank Signed-off-by: Thomas Huth --- lib/s390x/sclp.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h index 21d482b..629e9e2 100644 --- a/lib/s390x/sclp.h +++ b/lib/s390x/sclp.h @@ -68,14 +68,19 @@ #define SCLP_RC_EVENT_BUFFER_SYNTAX_ERROR 0x73f0 #define SCLP_RC_INVALID_MASK_LENGTH 0x74f0 -/* Service Call Control Block (SCCB) and its elements */ +/* SCLP control mask bits */ +#define SCLP_CM2_VARIABLE_LENGTH_RESPONSE 0x80 -#define SCCB_SIZE 4096 +/* SCLP function codes */ +#define SCLP_FC_NORMAL_WRITE 0 +#define SCLP_FC_SINGLE_INCREMENT_ASSIGN 0x40 +#define SCLP_FC_DUMP_INDICATOR 0x80 -#define SCLP_VARIABLE_LENGTH_RESPONSE 0x80 +/* SCLP event buffer flags */ #define SCLP_EVENT_BUFFER_ACCEPTED 0x80 -#define SCLP_FC_NORMAL_WRITE 0 +/* Service Call Control Block (SCCB) and its elements */ +#define SCCB_SIZE 4096 typedef struct SCCBHeader { uint16_t length;