From patchwork Thu Apr 24 20:24:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 883975 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3634310wrs; Thu, 24 Apr 2025 13:28:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV0Mc1ySHOJ9ob4/EwfhfBLl77lVKrYscRiXgB6+XhBv+b7KoP461Qo9BYrIzsZpHx4hVIDNg==@linaro.org X-Google-Smtp-Source: AGHT+IFrgAgn9pBbtAG/nI/bX2Vr68LO2rKhmOq7QCE7iJ6b6VdCixcpEQxTa72Q3vrZOw/jm2mg X-Received: by 2002:ac8:7d4c:0:b0:476:9dc9:3c2a with SMTP id d75a77b69052e-47fbbb44c31mr12697661cf.48.1745526506063; Thu, 24 Apr 2025 13:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745526506; cv=none; d=google.com; s=arc-20240605; b=RtP4cSSQaPebtr/UKvZMK97wz9RjMr4ZT31+2+JkcPc5JY2Q82JR7/qNUMlE4XnqMX 7U0QQvtbZ9crH4P5AlZQ/ZIz4TV8Yxw1XM+bOLnYQwuOmZ1+oq2nEPCay7P7ZLk8ivL3 a3ZdSRfTKWRBOTNOr5tq6YCKaapAX7+9lgzNozy7SEYvDKqV0/mZ4qU/PSVZTbGFtaLu auUkD3jvlIS1hrxIYX4nX/5uV1kJgHdCWZWA3S2RZEv8VPDOfzZCTkKDCQy89DwnVm6L mjmOaT7wAjgdeNkUjBoMVaH0IVewwOk9oUEjNRusvtTPkWelXINxqKJUegCu75pbMaA6 tHqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EzYHC9R7RTf1r/vPvoxmooHSOXxbT/I1N4/WAtczuAw=; fh=FKWIFycyO1Orz3TvIvW5S2IUpOi3B7HongN0XtOmmZw=; b=gY7yducbydMchYRvZCfpF1gqMtlwnvFYv1zqeKNJgxtCXkyvX8WL0wVqMbBDTuoPmZ 4orHfXwZ3k2l5n+i0OvcgLNyMpWWk22xa++fHEgNEwXtlVx6fgK45w/0sVmVdZFVq6HP ZpsejXHmJ7tOf/wCONuKwYyiSc7qH72iQCciibiEfCRtBI+1Qt9eWICFnHyBBiZ0yOzT sHQPD+O6glu2MWuaqDPm9w3B5ZzyO1qzGO4ux8Bjs/wAwHsMCqHJfoMf4YsGKd4AZ8iJ 7LN6MM42O8ea6+WDvcic5ofpK4AfH7p+7qrjLHUI1WE5HuEajg/g6iGfzCk1a4nJjKmV Frzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U83A04Au; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f974d9si24039061cf.411.2025.04.24.13.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Apr 2025 13:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U83A04Au; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u837u-0008IJ-1Z; Thu, 24 Apr 2025 16:24:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u837r-0008I1-SY for qemu-devel@nongnu.org; Thu, 24 Apr 2025 16:24:51 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u837q-00050y-5i for qemu-devel@nongnu.org; Thu, 24 Apr 2025 16:24:51 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3912fdddf8fso1816916f8f.1 for ; Thu, 24 Apr 2025 13:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745526288; x=1746131088; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EzYHC9R7RTf1r/vPvoxmooHSOXxbT/I1N4/WAtczuAw=; b=U83A04Au7PvefqAAvPoSpkEOY5oqdqZUdUr8D4xOyee4kC4xAseTB3YWYQM0xlacbt sOZj7RTzgkbIHve0Tqm/AJxPBelYjM/Fl9okIXcIzVs4fZ+FTlNimYUEdP/HZVS9ovxU CuMlQHiy1idgfbQfG4MJy5vIEtJaURh5ZW8GBuQCAt3vS28AoyWNBQ7/AP4FmTpDeLcU p2Xr7arQilp+x+vAVQX3qOiymxeWqKNwWLMdwK2UClsAVL1KITZuYm5B1rd2VAJ0uCre n2JtyRjen2K3dxwhmVzWPI/BUoo38XSB1Oj1hie7cl1y5qNsiSm87F4R+PhJoSNzawJL LuoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745526288; x=1746131088; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EzYHC9R7RTf1r/vPvoxmooHSOXxbT/I1N4/WAtczuAw=; b=QwHcViV8oFMVOyf22sWT/OfTAwOVsQGXoz8nopccrZCYy31qAHl+7QdtA0gQ8z8RLG o36hsqSRfwBiD262ubJ5PO7ZOd9gZw6vTeTsrpRZkO/MgaCe6uuhIsYUlUiYf0IoNetO 8x2NAYR+aHSkvtqpqf7rj0m2AdF5EqBfOpGP8IpO8/a6HYtkbqLYnJPdoIi+vnp/uz3N cuV5DFe03pOv+S+U7gl2HStD3Etokt+pz9NjrpI/byhhSfrwolPUjlJRPrBYz5oy8+tE COzU3NGQ72PZZuh14/9mxHU8ZSSZIfgnl2y/NBaut/y2UzgXUP0XT0Mmp021lVLdXewJ Ymsg== X-Forwarded-Encrypted: i=1; AJvYcCWac1ucf73ueF5CqeSPMs+cbvb/J70eOc32OBh58m5gU9CgU/c/LNNyYZ8jIprxWEPWZ6cQ8xz69Ut1@nongnu.org X-Gm-Message-State: AOJu0Yz5TJBvZA+KgnUPkXKp5a7Oh+fRKX7XNKLEPgA/s0WP6DAwDvkM D1vvV37tgDwwORzAKxpTdkQ+s1KT+P4dBCNkJV61bbPGvyzRK1hPYRf6Rxd/wZY= X-Gm-Gg: ASbGncvAtH0cCXdPIFn8cG4wWwBmzVL3Akl5Ip72nI0rONZxhdwryL2AQWFn5vFZDON 8WE4w5cVGciIwVIoeGfVEkG+5Y7lRv3E25mCG6nJiFIeO/bMckxhLwzQPwSafESz3jePJNeOy3Q O+CqmbcLRQAJ6TKpDdMyZwyy9HUZgMnQIZHwJt3/8wp0pi0uihFo2KfKlv6RwUcpXhekiiy+hWW x/Yhvh/uFuTRYMbJ2b7idBIWnybR05emYBFmvRRzMuwZcL4KruCUlglyElp6RdRc1bOzhoL8BBB A/0SP8xYk799QuUUybKwp3mlN9kAjh4re1JRpO8t/gm9lori9iqI8X/VHdZTxvKzm2XohRgJaAX pOIjEFI7qdKlbbzA= X-Received: by 2002:a5d:4887:0:b0:39a:c9ae:9eea with SMTP id ffacd0b85a97d-3a06d651cb5mr2730106f8f.10.1745526288182; Thu, 24 Apr 2025 13:24:48 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a073e5e198sm244598f8f.97.2025.04.24.13.24.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 24 Apr 2025 13:24:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Cc: Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Cave-Ayland , Alistair Francis Subject: [PATCH v3 07/13] target/riscv: Include missing 'accel/tcg/getpc.h' in csr.c Date: Thu, 24 Apr 2025 22:24:06 +0200 Message-ID: <20250424202412.91612-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250424202412.91612-1-philmd@linaro.org> References: <20250424202412.91612-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org "accel/tcg/getpc.h" is pulled in indirectly. Include it explicitly to avoid when refactoring unrelated headers: target/riscv/csr.c:2117:25: error: call to undeclared function 'GETPC' [-Wimplicit-function-declaration] 2117 | if ((val & RVC) && (GETPC() & ~3) != 0) { | ^ Note the TODO comment around GETPC() added upon introduction in commit f18637cd611 ("RISC-V: Add misa runtime write support"): 2099 static RISCVException write_misa(CPURISCVState *env, int csrno, 2100 target_ulong val) 2101 { ... 2113 /* 2114 * Suppress 'C' if next instruction is not aligned 2115 * TODO: this should check next_pc 2116 */ 2117 if ((val & RVC) && (GETPC() & ~3) != 0) { 2118 val &= ~RVC; 2119 } Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Acked-by: Alistair Francis --- target/riscv/csr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index c52c87faaea..13086438552 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -28,6 +28,7 @@ #include "exec/cputlb.h" #include "exec/tb-flush.h" #include "exec/icount.h" +#include "accel/tcg/getpc.h" #include "qemu/guest-random.h" #include "qapi/error.h" #include