From patchwork Sun Jul 1 08:12:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 10498557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 992B360284 for ; Sun, 1 Jul 2018 08:13:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8834228B4C for ; Sun, 1 Jul 2018 08:13:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BC2728B53; Sun, 1 Jul 2018 08:13:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1166928B4C for ; Sun, 1 Jul 2018 08:13:43 +0000 (UTC) Received: from localhost ([::1]:49197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZXUL-00083X-AM for patchwork-qemu-devel@patchwork.kernel.org; Sun, 01 Jul 2018 04:13:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZXTc-0007ik-PL for qemu-devel@nongnu.org; Sun, 01 Jul 2018 04:12:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZXTZ-0003Uk-K5 for qemu-devel@nongnu.org; Sun, 01 Jul 2018 04:12:56 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:43726) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZXTZ-0003UN-Ey for qemu-devel@nongnu.org; Sun, 01 Jul 2018 04:12:53 -0400 Received: by mail-pf0-x244.google.com with SMTP id y8-v6so6091624pfm.10 for ; Sun, 01 Jul 2018 01:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=aiqhQs8WYnU+ERnMFSkODTYaMwM3d8ruWvQEbizV+us=; b=AHPNThM5aDH18K6X3FJzbakJtdiRY9qohC5tr0IWuOFvr692MzLicoqcKcgBAZujUk IXJowgyG44BlFTD8Jtu8TUVfBGN5o1C6BDRubgIGfMKLAtjFPFkpR/M7NcjxsD1UfLIv NlpCwaBkpLTHRL/ZwzzeVqH38KG9XveHmrvboAb9GWB/GIvfsnvUKXhkPz2haqGZ+EYA 8Rb+22jCzzU37106LKg6ZaajbABQtIPNujsxWa97BIWPCNmQRVoid9i8JR4yuy4a8DQ1 4XEgFxoCT3TSkE9gOUTmJw8VEfo4v2UYnwwYZ7XGGeqlDhJBEprdlKGUUIBmIm11zp15 gAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aiqhQs8WYnU+ERnMFSkODTYaMwM3d8ruWvQEbizV+us=; b=ONbnEKNUUKcPtMd8fXzGM/Ct7jlkOL/5zrBAEwy4CgqXR2I7KMlDq5Ow2a5mpa1PtJ hbRO/rmPPgT3zr8s/L0cQjH5ImLbPqWk93xqq0iBMD1hvpCAUpPn50zuTcTyaPc7+nRf spuErSYP+YU07m6m2kJmvIRtN5eXQXLy0ZLIdCxyy6PZk6bc0Hvwt7tPkV+9NRhU6kaX 1sng8/PN2X6vFVPwUdaiYtn/pt8ktSdvAIVPL15XECeJdVwHAeUPjnqfj65HSavw+x+n xViZ0rS/oFWaFIISnbcyv9a2t1SPcGqW+1f3oAd8eOCDFfwaHps62anGTdNFPrp0nLge ZRPw== X-Gm-Message-State: APt69E0UBEgczMYPJAAe6eOoCa783EL+Ab35rrHrh/pf0NYGicBIptSS BYSRRE/QVvE/FB+v3LhqhVrbMH9I X-Google-Smtp-Source: ADUXVKKed0M5wdZUwFViFhPDqErNCUzeKrL0kg7mdlXQhpGnpmuSMWPGJm8UjT63KHvRImdIrasa8w== X-Received: by 2002:a63:8c5:: with SMTP id 188-v6mr17681715pgi.97.1530432772353; Sun, 01 Jul 2018 01:12:52 -0700 (PDT) Received: from localhost (g90.124-44-6.ppp.wakwak.ne.jp. [124.44.6.90]) by smtp.gmail.com with ESMTPSA id e189-v6sm4209075pfe.52.2018.07.01.01.12.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Jul 2018 01:12:51 -0700 (PDT) From: Stafford Horne To: QEMU Development Date: Sun, 1 Jul 2018 17:12:45 +0900 Message-Id: <20180701081245.14357-1-shorne@gmail.com> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH] target/openrisc: Fix writes to interrupt mask 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: davidsondfgl@gmail.com, Stafford Horne , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The interrupt controller mask register (PICMR) allows writing any value to any of the 32 interrupt mask bits. Writing a 0 masks the interrupt writing a 1 unmasks (enables) the the interrupt. For some reason the old code was or'ing the write values to the PICMR meaning it was not possible to ever mask a interrupt once it was enabled. I have tested this by running linux 4.18 and my regular checks, I don't see any issues. Reported-by: Davidson Francis Signed-off-by: Stafford Horne Reviewed-by: Richard Henderson --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 541615bfb3..b66a45c1e0 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -142,7 +142,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb) } break; case TO_SPR(9, 0): /* PICMR */ - env->picmr |= rb; + env->picmr = rb; break; case TO_SPR(9, 2): /* PICSR */ env->picsr &= ~rb;