From patchwork Thu May 1 21:20:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 886394 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp519708wrq; Thu, 1 May 2025 14:23:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUKMFlXGQGtlO3++7KIIDw/DPvOATG+gYbnd95rGY4Q3jt/D1o/bJQfeConTd+0Jb5azsRvfg==@linaro.org X-Google-Smtp-Source: AGHT+IErG6+zPNnfYLt7aDeQwoo3ftpOPi2p2Ze3SIno9f70VzwR09lcBsZ+v9vr/vTb7UXGg3JD X-Received: by 2002:a05:622a:4a18:b0:48a:ae6f:580d with SMTP id d75a77b69052e-48c31160627mr8129601cf.11.1746134638001; Thu, 01 May 2025 14:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746134637; cv=none; d=google.com; s=arc-20240605; b=d0t66+XwS3zqbjH56jk/a5GIv8N/GfXnQveBVQ5QPDus/dEOxteeUzmDGMqnqYQjSy LTNvq1v8mNzK8JFmiOcmX5YJafkrIHYYYfVsxGTbmpmajO2R93H9ULMOH+b1X0cXqH/T FP4aZ/UGIPa54t3/GANVCKRl+2OV7eUBwn91ioL1kPgD7mkj6+le3YuW7X2KiqW6g46F f6Thw74mLtUDQjnZ699DCXDil0SUobbcysliET2vlApjbu1oY2BAd1+ExGT9S60s7kjs Gr49T7JazpqsDAO9vgUuqiJsi8GT/DX27jJc5Mb5NSS+xqDx9V+zIGO7jApdqTR0II65 cJAQ== 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=DY53sbbsfhMz/uL2ST/i1QboUtxsyltjh/Yn/CjASj8=; fh=VGVRALeyeP6kQRr+jcrxREP8eySJouzt507RiXyxDPU=; b=TdwXB/lT/mHn7JtHG4gDjf9P6NK43YCC3sLXTjoeXAE00fUxe0buVhWh7iXSjmLyxa 4aBvG14C4YtKQ8iMfQudW7eF01CqL8yDPpkWPwM4g7BPXxFWVcDRKGaf6im5ShQqSToy AxpMoSPWi7CLFm9yXImXkXCn6d1pXvbIgUfDgnSxVKFS7S2Vjn0KxRfP+ZX/y8PKAdL/ dC+s54SQPKfTGJ85DmQdhbhW2OHZx1qnsMMnOGCjIBROgTtO4XBMQJTrJBh3X2EeeeJq 2qMMvTuyJAw0AFjQR3UrqUNAK9rJ6q5HWEEPT+uC/gJUxprEHNomSZcovXWFLwUt+GGV AruQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zSr6z3Zg; 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-48b98d10a5bsi14666021cf.490.2025.05.01.14.23.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 May 2025 14:23:57 -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=zSr6z3Zg; 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 1uAbLp-00011s-S4; Thu, 01 May 2025 17:21:49 -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 1uAbLZ-0000ng-1B for qemu-devel@nongnu.org; Thu, 01 May 2025 17:21:35 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAbLX-0001Ui-6k for qemu-devel@nongnu.org; Thu, 01 May 2025 17:21:32 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7394945d37eso1291553b3a.3 for ; Thu, 01 May 2025 14:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746134489; x=1746739289; 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=DY53sbbsfhMz/uL2ST/i1QboUtxsyltjh/Yn/CjASj8=; b=zSr6z3ZgFnlXh8HI4m9IBDNV/r4KxqA8O5zXa3NVDuGPu+vIgYz5KP3rrCFnouKewT uQvclVHqrnK2WAf4xm5zNQ+Sdv4HJX/QJTlxBxl7+PdM7LbvuvlBaqbAnNUjIjXO/UEr iM55yiqhuJWLsOTTw7FQSIj7ha0x6Axq4YfvGKIXLgdxsP+q7VWqYvjhtcnkjzEXYfvN G9j5kOBe9XunOS+RF5FK1teG0bFlyRi6mdlYo8ehi2XbmIMTbiwWntZtQP6uYhKfV5jz 7GK6t+zNGe6vQaJCBj47O15pSvrvfe73Wsm5jdndulWLSmFhdJCPsGSd3H9qzFDDbgv7 zjYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746134489; x=1746739289; 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=DY53sbbsfhMz/uL2ST/i1QboUtxsyltjh/Yn/CjASj8=; b=BOkVm4tKm4yRABXH27lr+A/W7fujYzE8S5iF5HlPsekrOYlQbHqkdRxxF1aCVaXQ1b CzSK8D85ysQM7NskCwzSziTP0VKYYny+zFgV0j+8bZtJruBlb0je0H94Us3TVd24Xbtw K86u2PxewKYuRj2A4IO3e1kRLu8I1gPODI1tb977fa0ZxhNe/hilW5bgnQ9OBQx4Qk+9 qCIGffvxeu46F4Gy3LRw5TPeQO8ZuIOpohhpXjZpzS5TKcP+G96rlAxvIxQOJDhHe1uP LAjrsLsrdPYqq8jnVGbli82N7hhmJQN37ObAU6dH+9DvS5XaBCfIAMbFoqfdzIHAf92n S0fg== X-Gm-Message-State: AOJu0YwYuuWkDa2MShyC7iyuL5VJFiKU5lCyKYkory476Z58HUVUP9Fu ivBuZqQQY7MBrHEjAGMv0o03VvwKtJfsW6Wkl40/wy1uQV6dwuKp0eCKOjs9NbxUUKuw6HM66YJ k X-Gm-Gg: ASbGnctNZdpEcIOBsf1AlBpZPiWUlJRl1PG/rRTSXNm351suboKx7rlNid4fXrcdJv6 xu/uYvnZcU/9xCotnXk/B3E/4BouIrbYSvwSMdKcxCnkekB6KVg7F/oTGMlry7Tod02hKJmFxUJ asF1BZ9mQCSkwqJ8N9gbxDMnwjrQlZXR2Fara5yNJJbHpvKYIVSyNKmOnKq8Pex3Ytu/aYxlxsh GTOPQHi8AwL44DKAXVF5dNFCTPiiWiKcneMPGL0xsZASFSlNrYhD2GbEQveCjg8va3jKkcJuTEV FORESXHws0mHWab0JAxSnFvpBncrKq1AtjcbticarFyyHdti7Are8np75Mhc8mhlSOhZmdz9W84 = X-Received: by 2002:a17:90b:534d:b0:30a:4ce4:5287 with SMTP id 98e67ed59e1d1-30a4e42faa9mr1220926a91.0.1746134489626; Thu, 01 May 2025 14:21:29 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-30a476267e0sm1384573a91.39.2025.05.01.14.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 14:21:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Alistair Francis Subject: [PULL 18/59] target/riscv: Include missing 'accel/tcg/getpc.h' in csr.c Date: Thu, 1 May 2025 14:20:32 -0700 Message-ID: <20250501212113.2961531-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250501212113.2961531-1-richard.henderson@linaro.org> References: <20250501212113.2961531-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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 From: Philippe Mathieu-Daudé "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 Signed-off-by: Richard Henderson Message-ID: <20250424202412.91612-8-philmd@linaro.org> --- target/riscv/csr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index c52c87faae..1308643855 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