From patchwork Mon May 17 18:13:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 440199 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1346529jac; Mon, 17 May 2021 11:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww6n/rBnqEpmi+8G3/8AvoWU2LHnD5568mUUDI2FfWuW19N4flmEDjIJsHqWzCg28NNGKX X-Received: by 2002:a05:6e02:1147:: with SMTP id o7mr951255ill.20.1621277033780; Mon, 17 May 2021 11:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621277033; cv=none; d=google.com; s=arc-20160816; b=mpqWvHL3YCEwh7eXl5MzVv61EBsw5zgFMz7EguXnjgwp2hgvrp+sKe1EL7TPztn4Xf nEyn45XZSO8YqHAd8A9jCuidPpjM4IrnyVkVJ9Oj0V9OTlqz/1EAllxyMLxofMlJpehb s40ZQSqb34fu9MAftx2E1TPiCXWHXIycSWnDei51OfMgIBsrfDfMzKsyFmxL7bQOPDCU ZIUH54vwnmUqyRp2vAYP9fuxW/EwujLObKzb+250LdfEJDmIz884rgboZ2iNjTUR/qAu hxheXZFnMnfb0ravyWS/DcweL7iItgmU3ipGpzvjtqup7lBaymXGhZeDdDWBK1cu+AMn o+TQ== 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; bh=mOFjYe8TSRqUICWmZ48l3PKrMuY06Mmde7iB6GF5KLM=; b=dvPKdhtuArpNp64UCg81JlKmmj83XHCy5q5S3kL36BU8duQ6qHvm1Fq1YSjmwNHg5j LakeT41T0+vmYtpEOcByWOCaV843Zr+3W8qpdoNdPdmRGpS7m1H+13M9L1ntrRim/IyT 20Rcib7H+/K0pVrgGpjYcC/FY//Q6gr15ooUJUHSAVCS1nvlm1bdsBKK3sZR3Kn4XdqW VkEuhAQ645oGcAmLw9DxWu7lj/OW11qVsnBUF7xmn5siBbey0hf3laZdqRZcfW+L3glS 37KmTrg/iwgyIaqG2mPBaONUAiFKSm5xygtQ+FKlWBKkEy0lAxV1mDMTtJIq+jba0VPT tnmw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v1si26649276iof.80.2021.05.17.11.43.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 11:43:53 -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; 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" Received: from localhost ([::1]:36084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liiDZ-00028l-8t for patch@linaro.org; Mon, 17 May 2021 14:43:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lihlf-0006iM-CR for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:03 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:36535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lihlP-0004Sx-Oy for qemu-devel@nongnu.org; Mon, 17 May 2021 14:15:02 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MfZDK-1lFxaF2OLo-00fwvm; Mon, 17 May 2021 20:14:43 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 34/59] linux-user/s390x: Use uint16_t for signal retcode Date: Mon, 17 May 2021 20:13:59 +0200 Message-Id: <20210517181424.8093-35-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517181424.8093-1-laurent@vivier.eu> References: <20210517181424.8093-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:saUIS/JUgEHcFxd7F61bY8GcQSMpxPeW5wJd3MjqdesNbpHTUu5 sI1VsDUHQVJ2wzfCYhbsUYUWGa5Jw/OEaeGHVpyum9TvoHO/dN4prWt+TfRIiGPCiPKyssb rGRnPq0XuFuW/SO6DEq0WuIEBFwqaApg5wzs3XC5uH33ELd0CJeA7D99JPRapDsyD9l/+Vc yFL8kx4TjQc3+/15Kgsqw== X-UI-Out-Filterresults: notjunk:1; V03:K0:V5tGAiR2vBU=:MiaCXCbqWhcPESQBMH+/uA BRa7JR2CIpIDK4g6RdCIZX6YxZIJi6t2kmvOHI0etmNhbi1LWoEiYlGkfEiGAQlPJwodbXP0Q ZK8jlufYvv+MxYwUKeHLbFyzw/hUBmFIrOM3SCZO0lyCW2nhobaBKnrf7ejCd1Q6Cg6C5on/B ApoLQvW6UIRpBLCdSFilRqzSHQLHlnBowCpUqgtMha0FjVoPKpW+XtTpyacDmrw/o2K8+K/Ev G7b70+esBbfNuCxNbipkj5W8jlF6FbEdKMoHL4gXhMWDsK9J/9XeM69aPiB21nuDUQiQ6jSq3 +siq88z4gcYFjACMa6DjLR4Ceqgc1h43l+pq5zjUgr9BN/DAGHoSBLT+E9YCtGyNJd/CVG6yb n6MPnpceqCfUhuYK54b0tdG/ZYCBemef6yMZfq9sYxbsED/ZHlAMQ533WCuT7ezBy2+Jwhqer XajyKGJ7W627jCp/UZ7C4+ObMRKfCi0K7nBB4FaNR3lwAtOZi/RGCLqmv487DkM/cDYD4kYlE beprcoQ4IftLprwPMflKK0= Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham 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: Richard Henderson , Laurent Vivier , David Hildenbrand Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Using the right type simplifies the frame setup. Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand Message-Id: <20210428193408.233706-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/s390x/signal.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.31.1 diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c index 707fb603d72e..fece8ab97b3c 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. */