From patchwork Wed Feb 1 17:44:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 6507 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 47A8A23ECC for ; Wed, 1 Feb 2012 17:44:58 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 27424A1806C for ; Wed, 1 Feb 2012 17:44:58 +0000 (UTC) Received: by bkar19 with SMTP id r19so1720398bka.11 for ; Wed, 01 Feb 2012 09:44:58 -0800 (PST) Received: by 10.205.121.2 with SMTP id ga2mr12963009bkc.38.1328118297761; Wed, 01 Feb 2012 09:44:57 -0800 (PST) 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.204.130.220 with SMTP id u28cs217407bks; Wed, 1 Feb 2012 09:44:57 -0800 (PST) Received: by 10.216.136.17 with SMTP id v17mr75362wei.26.1328118297058; Wed, 01 Feb 2012 09:44:57 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id t29si18443679weq.56.2012.02.01.09.44.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Feb 2012 09:44:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RseEp-0004ir-Fc for patches@linaro.org; Wed, 01 Feb 2012 17:44:55 +0000 From: Peter Maydell To: patches@linaro.org Subject: [PATCH] target-arm/helper.c: tb_flush() on CPU reset Date: Wed, 1 Feb 2012 17:44:55 +0000 Message-Id: <1328118295-18129-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Since target-arm has some CPUState fields for which we take the approach of baking assumptions about them into translated code and then calling tb_flush() when the fields change, we must also tb_flush on CPU reset, because reset is a change of those fields. Signed-off-by: Peter Maydell --- target-arm/helper.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index ea4f35f..fb0c387 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -344,6 +344,11 @@ void cpu_reset(CPUARMState *env) set_float_detect_tininess(float_tininess_before_rounding, &env->vfp.standard_fp_status); tlb_flush(env, 1); + /* Reset is a state change for some CPUState fields which we + * bake assumptions about into translated code, so we need to + * tb_flush(). + */ + tb_flush(env); } static int vfp_gdb_get_reg(CPUState *env, uint8_t *buf, int reg)