From nobody Tue Feb 10 19:48:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1645986309; cv=none; d=zohomail.com; s=zohoarc; b=GosOjiQjhpLjfFYmVg2dzQgm/JvkRb41Q87GMlsdYk4qmKZlPRbpkPCmbeiauINSGqrxvufig/KyaW0Zby3Q7frO/GKB7KPRb7zbrqrkQ2OkoWkJ+NJUZOIOBU/Rgy6/unQkbVDfd/tUftKz62ryd0viKKxB/jXwxuHXRXXgNnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645986309; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RAL1NIBF7xZKJotAn1xZ6zr2b57K5Ny5tPwj+GqSPZE=; b=cgnC9fs1b9nFTuH4avqJ/Ar4R7pw/lmDibpw3i2VBj5hTJm5yhcL6cEtZhV0oIGN6AUkfN3XkNmB4e/ilsd/ugdf1S3qhBz4apWcs7tjnhQQgHeKNLP8tPgh44f3GWZmhJEK9W6ubfgd7VGPhOtop7K46UGa2wtOdB5Z206o4HU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1645986309402939.3162374707032; Sun, 27 Feb 2022 10:25:09 -0800 (PST) Received: from localhost ([::1]:34568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOOEG-0001uO-7r for importer@patchew.org; Sun, 27 Feb 2022 13:25:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOOAu-0002m5-Ic for qemu-devel@nongnu.org; Sun, 27 Feb 2022 13:21:40 -0500 Received: from [2607:f8b0:4864:20::435] (port=38668 helo=mail-pf1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOOAt-0007pI-3p for qemu-devel@nongnu.org; Sun, 27 Feb 2022 13:21:40 -0500 Received: by mail-pf1-x435.google.com with SMTP id x18so9085542pfh.5 for ; Sun, 27 Feb 2022 10:21:38 -0800 (PST) Received: from localhost.localdomain (2603-800c-1201-c600-23be-43d9-7006-705a.res6.spectrum.com. [2603:800c:1201:c600:23be:43d9:7006:705a]) by smtp.gmail.com with ESMTPSA id t41-20020a056a0013a900b004e167af0c0dsm10776252pfg.89.2022.02.27.10.21.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 10:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RAL1NIBF7xZKJotAn1xZ6zr2b57K5Ny5tPwj+GqSPZE=; b=QqKWF0fvqJFVLJShPA8r41r1TNaHsWYCesDf309pymM+7B1pP8MUsdzydywBvKxMUn cByMo9LYsdqFZyMxwHfIudAs6M859AgcvGPnvYyLM4R2KfBEW4/5ZaBKpNp/a82Oxehx 78wjic7OMjwttOdfq9RJvrSXvSJsUVhxxiQldiyQlD+xx3mH7AzSPlC9AQKzm6oIKTeN 9KoYDJDLmd8NZuKZghxaJ1AW98JLJEOCYBvuUxGBhDHguZ1BPnYMCDmTBP6pcQcxh/TW jHdkX66CVGl5JO3pz+qyi3l4qVMbUVPiLAqO6I8LjraaGG7QuhqEk6IGecPpizos26MX oqtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RAL1NIBF7xZKJotAn1xZ6zr2b57K5Ny5tPwj+GqSPZE=; b=BnhvJ81nPV20SM78Yj7oTaX4Uxp/L7OkwJni1AeH4XC9wjUuiLPP4syMLPR4yaLQ3U jrDzSF+C8AhfrjEaSs2e8VklFdCRF2VRJR5r3EM+Xq/cAQNCB+1jCBgYUmGlaUJ4INP8 zQgbxpuTx4LKcwY5SFzXeVcG4D+irRpI61HS2IJuB52VrSNO/RQqecNhHmxFBUc0en7p Ywn4BB0v4D0o7PiQz8FPFbHzq6XKVl/GXDoknTE7cInmr9hHSZHH2cpjC+jYvGTsOPnK F/zVj1Y1JjJM9YMY7FCUxqajhi3Vtjwx6C5KKK7jNq1rLWbmeF5qRddND8HTSxmUXtlM M3AQ== X-Gm-Message-State: AOAM533qlRlOTxBaB1wrYBktOnF2o+H3VVQi7sJZ9bVuzpUTezveHKam ulwCrZucxXSa3qE0Z0C2GxFU6yvigG1oyg== X-Google-Smtp-Source: ABdhPJwBQcR8sfQHDLKAuM+mCFeOgiTpXg52+wuVkXooqUMKDfPyInPANQwvb0ROk9D9NrHX0dACmg== X-Received: by 2002:a05:6a00:1494:b0:4f0:ece9:a01c with SMTP id v20-20020a056a00149400b004f0ece9a01cmr17484247pfu.58.1645986097953; Sun, 27 Feb 2022 10:21:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 6/7] target/nios2: Special case ipending in rdctl and wrctl Date: Sun, 27 Feb 2022 08:21:24 -1000 Message-Id: <20220227182125.21809-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227182125.21809-1-richard.henderson@linaro.org> References: <20220227182125.21809-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::435 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amir.gonnen@neuroblade.ai Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1645986309878100001 Content-Type: text/plain; charset="utf-8" It was never correct to be able to write to ipending. Until the rest of the irq code is tidied, the read of ipending will generate an "unnecessary" mask. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/nios2/translate.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 52965ba17e..b17ce25a36 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -452,6 +452,15 @@ static void rdctl(DisasContext *dc, uint32_t code, uin= t32_t flags) } =20 switch (instr.imm5 + CR_BASE) { + case CR_IPENDING: + /* + * The value of the ipending register is synthetic. + * In hw, this is the AND of a set of hardware irq lines + * with the ienable register. In qemu, we re-use the space + * of CR_IPENDING to store the set of irq lines. + */ + tcg_gen_and_tl(cpu_R[instr.c], cpu_R[CR_IPENDING], cpu_R[CR_IENABL= E]); + break; default: tcg_gen_mov_tl(cpu_R[instr.c], cpu_R[instr.imm5 + CR_BASE]); break; @@ -477,6 +486,9 @@ static void wrctl(DisasContext *dc, uint32_t code, uint= 32_t flags) case CR_TLBMISC: gen_helper_mmu_write_tlbmisc(cpu_env, v); break; + case CR_IPENDING: + /* ipending is read only, writes ignored. */ + break; default: tcg_gen_mov_tl(cpu_R[instr.imm5 + CR_BASE], v); break; --=20 2.25.1