From patchwork Wed Apr 28 19:33:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 428611 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp924476jao; Wed, 28 Apr 2021 12:38:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4UIjzZoY5/gi/mNY8d5DG62nFTzGVh0WZKtMWeSt63bDwM7ep+P56lDMTwX4pyZRFU1sg X-Received: by 2002:a67:ed0b:: with SMTP id l11mr27485992vsp.0.1619638681776; Wed, 28 Apr 2021 12:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619638681; cv=none; d=google.com; s=arc-20160816; b=w0az+UnVVKP5fiDiSb+JTAZ6/8Ff6oV/IPIoO57jMILgntfhW1IJFpSA8qeSTPZ6af FqrFqckaH3UbkoPr01dFN0by/K8FC/lj19MmApo/cD8s0MUx9yo/dt1RVkG8S/lxPQ3t 8pTi9lIiT3/ZSdYaa8lj14dRxOoMb9syeuxoiaz5h98YJEBje8ESTvq9veqeD4G9MGLS NIqBmZOdbxbPVmWrtPSF41XcUGg+D6xzepjR3Z+gnu4iQWhec7Qt2WlytyZTWIuiPwxn xkclyHB8rKykoeY2oXIl4c4B7WO5z5MO2RRVRDFCuBMCuEOubTJMvy3WL0Jtu1j661d0 g4+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MFMQ5QPUjvF/CC4yZGIdqNUY924Mg+oEIBltLfl4FzI=; b=tSaP8Wi5kps8MFDQdnkCZZYSA+IuMiz1o3EsUOCj7lZMc5TLGfMZ+d0yiJ/trjL9KT 4/naA1NSYdCN2anAxJN3t5gjT/kqej6aLEIs+nAeSVQs5JNWPOAR784Z68ENe9QHtiGV DYvK/YA78COp0MhjUZQ3LoRZU4YtZMn8LjTIXzM3eBdrLR/XMDAZhm5uElYWx+fnWuOJ Iq3QP5w/f0RAhSDiLmym7j6Vl7XUHU+PNOhj35xBW1BeFJH8Evhh/o2O1NL1JMYdntHb b/AEWexbfHn/dtmGGGJiFtjNgThTCXXD5LYsFDDMsEWLcqO4tyjWEV8vtD9nMayreOa9 FgHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JwPPJ78S; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v34si788499uad.190.2021.04.28.12.38.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Apr 2021 12:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JwPPJ78S; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbq0X-0000ak-5G for patch@linaro.org; Wed, 28 Apr 2021 15:38:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbpws-0005nm-Fq for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:14 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:40468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbpwp-0004aW-Uq for qemu-devel@nongnu.org; Wed, 28 Apr 2021 15:34:14 -0400 Received: by mail-pj1-x1029.google.com with SMTP id l10-20020a17090a850ab0290155b06f6267so3470944pjn.5 for ; Wed, 28 Apr 2021 12:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MFMQ5QPUjvF/CC4yZGIdqNUY924Mg+oEIBltLfl4FzI=; b=JwPPJ78SqI14p8RMm24HRmsss0d8BqOTcoAAhyiTaurzcxirk6/srcpKQejebuRYXP L3Ylwe5EKXdXN2YnH1MAA23sAmFXAYNVBl51UQLAc/P370AEMyVzouYJtXwmPuAivbB0 9rIJgJhTCRkxFmLZxmP/JOfh4PFzHws5T8WxK+UjnscPWlCT+tL6dHX4pgGuc4zRCRTn r7ijFmXDyll6qU+jQvD4uIN1XSY4xJ7Oi3500EKNViD7VXJYeEEODGbO7ckyD6G3Q7DR XHjnTGh68jsNHOFOvuaOLF2gSVc/qb2encax72uc/BCgqNeV1jcWHL4eDlQboYj/ng1s dTIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MFMQ5QPUjvF/CC4yZGIdqNUY924Mg+oEIBltLfl4FzI=; b=VNqeQFgWEHpmO2cxQjjR+DWQ7TyzKAebLsSCIy5cscLZvssssChpWNNAgrnUZ2Usqz /ByGc7QJoF0H6HgF5bgoiPqvdI/5PbHTmAn1FNM9GlXdtyCo8yW3wnlHENpS2VFox7+j JsPnm+7Mg+eGWLhPsr81YqucO5xU69q07oCnN25gnNS7BbNexCb1BTQiLMo6tzx3pU4o PjryBZw7nkjbrvQxEU3d5rJxh744KWtDv3FzG5QB11wdBQuTwBmY2xcsw+28Da3sIszW sBCFptGouf9eqChqRp23epNKnIa1d1rPcm76L+Ny7MdLFrUJNOJw2Ydj1GfJHcK381fN ER4w== X-Gm-Message-State: AOAM531K9hJavL0xfPI2RhgsN6oWUiiZqtd+UzYEnIeSQpeWoGMYYGCV ouYu45Tw+LgWjC0aJkZAhg3G220TXSK74Q== X-Received: by 2002:a17:902:bcc7:b029:ed:6f73:ffc4 with SMTP id o7-20020a170902bcc7b02900ed6f73ffc4mr5504700pls.1.1619638450688; Wed, 28 Apr 2021 12:34:10 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id h21sm403725pfo.211.2021.04.28.12.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 12:34:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 02/15] linux-user/s390x: Use uint16_t for signal retcode Date: Wed, 28 Apr 2021 12:33:55 -0700 Message-Id: <20210428193408.233706-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210428193408.233706-1-richard.henderson@linaro.org> References: <20210428193408.233706-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, qemu-s390x@nongnu.org, cohuck@redhat.com, laurent@vivier.eu, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Using the right type simplifies the frame setup. Signed-off-by: Richard Henderson --- linux-user/s390x/signal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.25.1 Reviewed-by: David Hildenbrand diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index 707fb603d7..fece8ab97b 100644 --- a/linux-user/s390x/signal.c +++ b/linux-user/s390x/signal.c @@ -25,7 +25,6 @@ #define __NUM_FPRS 16 #define __NUM_ACRS 16 -#define S390_SYSCALL_SIZE 2 #define __SIGNAL_FRAMESIZE 160 /* FIXME: 31-bit mode -> 96 */ #define _SIGCONTEXT_NSIG 64 @@ -62,7 +61,7 @@ typedef struct { target_sigcontext sc; target_sigregs sregs; int signo; - uint8_t retcode[S390_SYSCALL_SIZE]; + uint16_t retcode; } sigframe; struct target_ucontext { @@ -75,7 +74,7 @@ struct target_ucontext { typedef struct { uint8_t callee_used_stack[__SIGNAL_FRAMESIZE]; - uint8_t retcode[S390_SYSCALL_SIZE]; + uint16_t retcode; struct target_siginfo info; struct target_ucontext uc; } rt_sigframe; @@ -155,7 +154,7 @@ void setup_frame(int sig, struct target_sigaction *ka, env->regs[14] = (frame_addr + offsetof(sigframe, retcode)) | PSW_ADDR_AMODE; __put_user(S390_SYSCALL_OPCODE | TARGET_NR_sigreturn, - (uint16_t *)(frame->retcode)); + &frame->retcode); } /* Set up backchain. */ @@ -216,7 +215,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, env->regs[14] = (frame_addr + offsetof(typeof(*frame), retcode)) | PSW_ADDR_AMODE; __put_user(S390_SYSCALL_OPCODE | TARGET_NR_rt_sigreturn, - (uint16_t *)(frame->retcode)); + &frame->retcode); } /* Set up backchain. */