From patchwork Thu Jun 16 16:37:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1981 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 896D818819 for ; Thu, 16 Jun 2011 16:37:21 +0000 (UTC) Received: from mail-vw0-f52.google.com (mail-vw0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id 566BEA1804D for ; Thu, 16 Jun 2011 16:37:21 +0000 (UTC) Received: by mail-vw0-f52.google.com with SMTP id 16so560095vws.11 for ; Thu, 16 Jun 2011 09:37:21 -0700 (PDT) Received: by 10.52.112.106 with SMTP id ip10mr1537247vdb.127.1308242241084; Thu, 16 Jun 2011 09:37:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs199481vdc; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received: by 10.150.187.20 with SMTP id k20mr1347974ybf.401.1308242239328; Thu, 16 Jun 2011 09:37:19 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id w2si3156758ybl.91.2011.06.16.09.37.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 09:37:19 -0700 (PDT) Received-SPF: neutral (google.com: 81.2.115.146 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=neutral (google.com: 81.2.115.146 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QXFZD-00029w-D2; Thu, 16 Jun 2011 17:37:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Juan Quintela , Riku Voipio Subject: [PATCH 8/8] linux-user/signal.c: Remove unused fenab Date: Thu, 16 Jun 2011 17:37:15 +0100 Message-Id: <1308242235-8261-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> References: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> Remove fenab as it is only written, never used. Add a FIXME comment about the discrepancy between our behaviour and that of the Linux kernel for this routine. Signed-off-by: Peter Maydell --- linux-user/signal.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 2e34ffb..73670ac 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -2228,7 +2228,6 @@ void sparc64_set_context(CPUSPARCState *env) target_mc_gregset_t *grp; abi_ulong pc, npc, tstate; abi_ulong fp, i7, w_addr; - unsigned char fenab; int err; unsigned int i; @@ -2293,7 +2292,11 @@ void sparc64_set_context(CPUSPARCState *env) if (put_user(i7, w_addr + offsetof(struct target_reg_window, ins[7]), abi_ulong) != 0) goto do_sigsegv; - err |= __get_user(fenab, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_enab)); + /* FIXME this does not match how the kernel handles the FPU in + * its sparc64_set_context implementation. In particular the FPU + * is only restored if fenab is non-zero in: + * __get_user(fenab, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_enab)); + */ err |= __get_user(env->fprs, &(ucp->tuc_mcontext.mc_fpregs.mcfpu_fprs)); { uint32_t *src, *dst;