From patchwork Tue May 18 05:30:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 441137 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1788304jac; Mon, 17 May 2021 22:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqzkWyxHmhmBtEW9xgzI/J1vQbNjvWEWxALHfDuP7K6UtsDvEJI/ZoQrnxxmqByfV9xtit X-Received: by 2002:ac8:5459:: with SMTP id d25mr3149175qtq.385.1621317479579; Mon, 17 May 2021 22:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621317479; cv=none; d=google.com; s=arc-20160816; b=i4E3K+liweILxM5PjzrBSfUMEJp/QIFZmziq3fFDCndQvC3CHmvXZ4VNpDvoD7sLZl 4mcuWR9SE9CMQouQgMRGIJ5hVZGvLAjMfXImAIxSeSUDVMx53SvRt5PWJL0KcENj0a93 bRRasa68mHpjXrOuhOgTXJf8yUQBLjjYJkZsWAmrc6pRe5XID0fwg7xpBR+BO6RnJ3qX Ol6S4cWpegY32aUNOZQRjyLN4RB+RtSNl88E8NThgoAK95uMWT6YB51JOH+DOJNUO5FY eqDtDstVLw0g/Gxb9jYfzrCTF+J7bGC7L8VDVr4hzNDLFc1WxPviQcw3k9HUUkTCTLNZ hs5A== 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=61rFI5PKzcOz/G10Rq+BczzBIfY7SgPblFIfT5kjN9Q=; b=lw21GJiD6WfqvIueErlDJhlPjyiTVqjbYi2dp1q94vYpdCXGM/fynZPcuPM+EbhWtd lfLkpf4dYTQ0N1LKvfwyPCgiowos/wo/RBU6KioyWjGe+zcMMNUsGv8t9gssbOPpm4Td dMGdU/gykKiPbxLDr7A36q38UMdyHMZMRlTsUSrjHYwtrNgU0Opghfc309wS3gVlB8bt pmZhPNA2zSccTxKBuSA75lFDptHsGrnDP31Lj93naXksfUAiBhgKMn3qVtoIXXdbqcQH viNh7ZUKTbNVgcJCyicyYIufRDrGst3siIJ1fz3Iwt+AKYygGaZjF1PeKBaEhYO7jGS8 mYtw== 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 y11si14303960qkp.94.2021.05.17.22.57.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 22:57:59 -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]:54276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lisju-0004V2-VO for patch@linaro.org; Tue, 18 May 2021 01:57:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lisKd-0007MV-4L for qemu-devel@nongnu.org; Tue, 18 May 2021 01:31:51 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:37511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lisKZ-00073e-Ay for qemu-devel@nongnu.org; Tue, 18 May 2021 01:31:50 -0400 Received: from quad ([82.142.31.78]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4ahC-1ljQpT0i1O-001kxe; Tue, 18 May 2021 07:31:45 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 24/59] linux-user/sparc: Clean up get_sigframe Date: Tue, 18 May 2021 07:30:56 +0200 Message-Id: <20210518053131.87212-25-laurent@vivier.eu> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210518053131.87212-1-laurent@vivier.eu> References: <20210518053131.87212-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Y23eJeByVcdaXufsDKSY7vQTyD+/2j5XrkjWQfjC4Cw6M1UUwj7 02O84q1LlQDwiwsgq9ic0Hx9P1e7apeLMO4s7PJB/fpKN94p2WJpZElxMLxDQY1ZzereVlo 83w94LfeXNmRNxO7W/xvEuGDnwbaILGQkwR/INu1ZSQXx1LjrIVs5BbUUkKZa9ZVcmtH+eW 32MZgEbrmmBZpVt77Go9w== X-UI-Out-Filterresults: notjunk:1; V03:K0:6s7TOdQVoIs=:duT049otYUhQKW2QHHqqpE /1PtXM/U1AVCUtyAl24dCG7EzoRpqAQLsX37D5ZXviFhXW8UgBDFImJP7tyfy3Fnk0qu1lmUP 9HojYkBk+c3SNpwQT6967FUZCgBbmzqIAhT+9PzNWgYP7/cf6lvC3Y6w270MDv4YkDUizIcVN VLpFecs7gPZ4P0I+7Hs4JmBViQpuMGS2D8IYbblRMH7BdXJVVw6rUpCrLsYwMtVMRb1jAcjyO DXxHR5Nrj2zQ5CFn3QTNqvw0z7u7Rls7mamojKTGHzHphzIpZs7NtTA7qeHcb3M/MgyqKn/+t HeZllctPg4ju8niE45c/tCGQ1FrhDjfWCeV4GdeMOb2QJeuqPJlg44NFG5C5VwDbuwWOuJAP/ F+6hPThqqoye9/5DmBzPn6fht/ZiUo51GGCkHuGpSqMgsDI2/W/COLuXaV0iVCStFXYdzCtLV ic1QGiTTZsdQeUCinHdvARRU7ijHkiHKoG33C1sumVFoBX86PV9J/FfGOH9/jiLS3QZvfyfIk TImgco3EmrLj2/NMHd3r8w= Received-SPF: none client-ip=212.227.126.135; 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, 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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Remove inline; fix spacing and comment format. Signed-off-by: Richard Henderson Message-Id: <20210426025334.1168495-18-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/signal.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 2.31.1 diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index 69fee5a76a8b..57dbc72c9949 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -65,24 +65,25 @@ struct target_signal_frame { qemu_siginfo_fpu_t fpu_state; }; -static inline abi_ulong get_sigframe(struct target_sigaction *sa, - CPUSPARCState *env, - unsigned long framesize) +static abi_ulong get_sigframe(struct target_sigaction *sa, + CPUSPARCState *env, + size_t framesize) { abi_ulong sp = get_sp_from_cpustate(env); /* * If we are on the alternate signal stack and would overflow it, don't. * Return an always-bogus address instead so we will die with SIGSEGV. - */ + */ if (on_sig_stack(sp) && !likely(on_sig_stack(sp - framesize))) { - return -1; + return -1; } /* This is the X/Open sanctioned signal stack switching. */ sp = target_sigsp(sp, sa) - framesize; - /* Always align the stack frame. This handles two cases. First, + /* + * Always align the stack frame. This handles two cases. First, * sigaltstack need not be mindful of platform specific stack * alignment. Second, if we took this signal because the stack * is not aligned properly, we'd like to take the signal cleanly