From nobody Mon Feb 9 23:01:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529375817392252.44074146080254; Mon, 18 Jun 2018 19:36:57 -0700 (PDT) Received: from localhost ([::1]:38680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6Vn-0007ER-Fw for importer@patchew.org; Mon, 18 Jun 2018 22:36:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5jU-00031x-Vz for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5jU-0000p8-47 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:57 -0400 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:44451) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5jT-0000oj-VB; Mon, 18 Jun 2018 21:46:56 -0400 Received: by mail-oi0-x230.google.com with SMTP id c128-v6so16680784oig.11; Mon, 18 Jun 2018 18:46:55 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id g8-v6sm8905967otc.68.2018.06.18.18.46.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i6VbW3kr7OQvfnMzpfKE0GIhhoa7W0K+wZd4IdB5yB0=; b=ek3GuzsF9MZxExzSjGmQwl0TF9XELIQ5+Fpl+qyR+wKS79ZPaocrcpzfXxWepe6u3U WB1KRfmP0r92Da6JoNYPEsSVaGePiZreEHr9W0zShKKuwka/T6k36r/AYEFbDXJmPofJ kKV71abkrKrxPuXaLivLCDOenH4q265PWEHMJUTGXd3+YxzyDRsbVxOEfx7byD1hCNr0 XO3NBYfeoiz/fB5nHOaVmDjQMN67Iwncie9Sjh0bGTNWrDW82MYLkthI/zhavlpJ7Zq4 78fEe7/OdjB2sK3g3x+NeUDfJzllIB7UY8BS1sRtbvkLhXwrCUxQNRTVI/0SiZznL9gw e2uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=i6VbW3kr7OQvfnMzpfKE0GIhhoa7W0K+wZd4IdB5yB0=; b=sfNy+o5z+5qhkGfOykV7eCQDJ15fC23KkN8c8e5igy63wjC4NQPr3aSkGtMOnB8//l 1RA93q3xelehm7h/bsSfa5u7oIVOgPcLxXxFJuBDXYTuu/XVB8MK/FwhRj5e3UqVlWr0 lasH455BagfJw7JyFXPHbjjMNKnnvquTni3hBJ4ptQ3KZIYlD+biUF8VNDTEVKPHv1oB Y7lGitaYJkEavwe7yJZ5sCeydpnXYhS/15F2i4t2mjfI6RPj0jsH/v1O4ZwtuXPEDNbK kNeEByJYEwY5+9lyCkORhoc+N5Uy5YhrKW2fBd2mYDkSK90BCnCH2WL2D4rcTOI/gfGL N1Nw== X-Gm-Message-State: APt69E32+o/m/oLY7PacB2cizFpBZCW2pKOrQeevxaYFc1dCyEQCLN7F ym30RX5ePmFfAVsE0Dn6t7J56hRxJN4= X-Google-Smtp-Source: ADUXVKIbIjfdQ+xzZsOioRQ7lmfVqJ6LlA5lTNuo3rJ8kAN5f1yw9a+acQqBq3qxIn07Na8Crns/Tw== X-Received: by 2002:aca:d0a:: with SMTP id 10-v6mr8802859oin.277.1529372814724; Mon, 18 Jun 2018 18:46:54 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:41 -0500 Message-Id: <20180619014319.28272-76-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::230 Subject: [Qemu-devel] [PATCH 075/113] lm32: take BQL before writing IP/IM register X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Walle , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Michael Walle Writing to these registers may raise an interrupt request. Actually, this prevents the milkymist board from starting. Cc: qemu-stable@nongnu.org Signed-off-by: Michael Walle Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e (cherry picked from commit 81e9cbd0ca1131012b058df6804b1f626a6b730c) Signed-off-by: Michael Roth --- target/lm32/op_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c index 2177c8ad12..93b8d09794 100644 --- a/target/lm32/op_helper.c +++ b/target/lm32/op_helper.c @@ -102,12 +102,16 @@ void HELPER(wcsr_dc)(CPULM32State *env, uint32_t dc) =20 void HELPER(wcsr_im)(CPULM32State *env, uint32_t im) { + qemu_mutex_lock_iothread(); lm32_pic_set_im(env->pic_state, im); + qemu_mutex_unlock_iothread(); } =20 void HELPER(wcsr_ip)(CPULM32State *env, uint32_t im) { + qemu_mutex_lock_iothread(); lm32_pic_set_ip(env->pic_state, im); + qemu_mutex_unlock_iothread(); } =20 void HELPER(wcsr_jtx)(CPULM32State *env, uint32_t jtx) --=20 2.11.0