From patchwork Fri Jan 3 17:10:33 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: 13925719 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 209BEE7718F for ; Fri, 3 Jan 2025 17:11:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTlCL-0000RR-8d; Fri, 03 Jan 2025 12:10:57 -0500 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 1tTlCC-0000Pm-Iy for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:10:50 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlCB-0006md-4u for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:10:48 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4362bae4d7dso89660895e9.1 for ; Fri, 03 Jan 2025 09:10:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924245; x=1736529045; 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=jhLJyNKpXTaAG71p496OhoK9px2w3vuRidPr1o8/SQw=; b=QNbTF/Z+EIYKTIzNqycgTUaGheTcrKDdz1USiNYNc+8zA5+59DddTr/cCdLZnF1gao eswymmb+kODh8V+ZVliF7pHKgGxR+eHOufRpRdJl1oKJR/UjQeXt/++hSJM6LTvLlqB3 A4fkbZvKH0DwbA4FnQ8VKhzMxTsILEKPsKyJMlM5TduqamQ1jBlg5/w0wmHb59RcXTOT hoHsO3i7jA39DkiHDy2kFY9DjaB6s0EMG8UUmM6tJqYWTRk6MhTzMgnMMHrQjAenGbMm uBxcSRJZVIYzLQF+Hs51z0N6w75hwWClF5FXkj0nyJxknBLyo5sUSKFRq8bps/a1np40 UWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924245; x=1736529045; 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=jhLJyNKpXTaAG71p496OhoK9px2w3vuRidPr1o8/SQw=; b=Nh+Wle2TMahVy5LJWGcVzIWN+r55Jk5JxEyag5Ha1M1kBuLZoLFf+tq+an8toWUNe+ ADpYZf4a6owptcNH1cV2UHui/unESIZXRj2Z/SurFe6NLUVKb/+UiisZYxC6UZPrxnqu NrXIk/89NJowQKtfUS9ER7yHoYJjqINVsKvg7W/FbFEoKQuSJQqvTz0MxvNK3rltrNs7 3UoKXPmO8NFPjjf6XmXw94T4IAPBqGLWqdUITfthV8f4hUX4425lcCyCTCx4sbgi1+ZK ysmxpngbO1Uv4yoSVkvhxHkfqgrqEpSx+J4X7SdEZbV/3646LHCvfc9VfjpIbdRHvxnv VrFA== X-Gm-Message-State: AOJu0YxUwAUYayQ3T94VOSsSiwFDh8TNx/oyDDXJA4LCDDCKzXbyyqWz +v6ZQPZOG5FL+Dz8WYmXq9J6SwI4RUiqFy5rwADSk9KJFuCxuM9WlfklTwPV0nj5D2ao27sN456 NRBs= X-Gm-Gg: ASbGnctQUaf810vKRI/FGzMIP0Cig4Wso4MHqOYRGMAwzkHr/Joz5R9JX5rG0OFNZLZ oT/EuqI2Rmv4fZ1EN3TZQ5kqyfAK6hDjzT7sycbE5fE0BIBXgcUtUyY5l9UVV3Ubk3JsQaE/Lco ROXsHUFIeiUZSHvUGyc61GKQ0RceaznVYTOPk9YswM1SCCvcmhnlt/FgXMN5BrSuVqEv5xc+9J/ VZWZNuD+6vQYj5TRwEPKeauV1JhGI0/DJrTzUH+As01+31ieLgoKx4kNdDsWQ3vU0WJ4E8fapul nS9uqTLq14jD3VgdjH4dC+CKNmm9iQ8= X-Google-Smtp-Source: AGHT+IF8Nsy3ccr7cQYoUOI7TTONOJuDjDJ8wD8LLXAHwSTD/oHVYSofldv6C/suyviRUkfllAm1gw== X-Received: by 2002:a05:600c:3b86:b0:434:f3d8:62d0 with SMTP id 5b1f17b1804b1-43668547175mr449340245e9.3.1735924245179; Fri, 03 Jan 2025 09:10:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8acafesm40979667f8f.98.2025.01.03.09.10.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:10:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Alistair Francis , Kito Cheng , Richard Henderson , Keith Packard , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/5] semihosting/syscalls: Include missing 'exec/cpu-defs.h' header Date: Fri, 3 Jan 2025 18:10:33 +0100 Message-ID: <20250103171037.11265-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103171037.11265-1-philmd@linaro.org> References: <20250103171037.11265-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org target_ulong is defined in each target "cpu-param.h", itself included by "exec/cpu-defs.h". Include the latter in order to avoid when refactoring: include/semihosting/syscalls.h:26:24: error: unknown type name 'target_ulong' 26 | target_ulong fname, target_ulong fname_len, | ^ Signed-off-by: Philippe Mathieu-Daudé --- include/semihosting/syscalls.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/semihosting/syscalls.h b/include/semihosting/syscalls.h index b5937c619a6..6627c45fb28 100644 --- a/include/semihosting/syscalls.h +++ b/include/semihosting/syscalls.h @@ -9,6 +9,7 @@ #ifndef SEMIHOSTING_SYSCALLS_H #define SEMIHOSTING_SYSCALLS_H +#include "exec/cpu-defs.h" #include "gdbstub/syscalls.h" /* From patchwork Fri Jan 3 17:10:34 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: 13925722 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78E7CE7718F for ; Fri, 3 Jan 2025 17:11:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTlCL-0000Rc-9U; Fri, 03 Jan 2025 12:10:57 -0500 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 1tTlCH-0000Qm-Lo for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:10:53 -0500 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 1tTlCF-0006my-ND for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:10:52 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-38634c35129so9457163f8f.3 for ; Fri, 03 Jan 2025 09:10:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924250; x=1736529050; 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=H+ZxGzYLdyzFu2uJQr5CjuW08BAF9noYF4W9aPPe+So=; b=hS42hhXuLBB/5Mm4tPpo+71AfNpXdvqnaYAWECn3rMrykfgcyEiAICVj0ajmAPkUQo WSU44ElLXDRVlHpjR5W4p1gZ0iedn87ODMg63/ZpzkbAy+MIfaG3N8C/zC2JDuw61ZNS inLoz6NQzcaNUUUnhdUxUbIf4hEoZfFnK5CF2QZ7iSBJlZYpZiULGwCLGlXSr2PHCGAs R6zcoJ+GmC+Jk6ib5BhvdTsgkXvCspxzPS1P95hE5ACP5+Ff40jh2ttFt+3VVcSkyPsC RNDOc7VcPcchGXUsk7nD1JEsSkPaT/+f1NJhTTzm7YrcTXz6ZrwDeDXaZjewPUvqFuLy ACSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924250; x=1736529050; 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=H+ZxGzYLdyzFu2uJQr5CjuW08BAF9noYF4W9aPPe+So=; b=Y0UDpVS5XwwhPkrnbE9L1itBnsTZLYvGlfKK4BsleioV/FHtXyn4EA1cqOMJ4Djsot ReeeEeI15HSTOCnkwA60DpufrEnhVvehvwx1duJZiy5WqOYcw4AyVWHcGwj+y9s2pKXY X4A5cktXFwMu4KHPd9TpNSscmL95LtGZt6ob1K355VGZRZSibBkF/3qCcW8Xud5RxnJR sQVfM0BKZKVenY6PlfQ7mVXuQDxhVcMs2b9lQx7iJ9uEk6eLNYQRwr3ruZVQYxoc/M0o pP/kl1GtqXCBjyI1bHT8I7VLEZ6Fp5lO1061guhBUuU1gLu7ff7MMM0TwByMKoFKasrk MQ3w== X-Gm-Message-State: AOJu0Yyh7f0p7NJ/UZ/6q02QeGbMTtDGM8HsRMQq5xIoCtCW7mcmHpcq 0t29V3OdrwwyUUt2y/LoXWzXJwsuSGuwuJyCqdiq6/mttwnZc9GXi7CHIaNNjJLMLEhCozlA6g8 QbKE= X-Gm-Gg: ASbGncsJMaXRDtD/wHMcOMq+3xnkFgrBwHOx/ksGjtq0tYymyzqswd51k6wvgB+A0L9 xyhjtqzJGO5ViY6sAkIyClvhJd4KJZM/WtRuFtgjv2OEKS/tvGKz7yvY22GsqulOYUNwrUQBqZw DMXm/903adk8enmIb1Q8Kvh/f+IaDgUas3GO3CdiIL01Z3iIrUX9l/gGwVEM2tT+OHgkocqvoxh LMNY1bzYujZbgWX2zdmKD2qn0lT5/G3V3rM7nUu5PDBrs6If1upEOJxI44r4rc08MsFcVKuXWpZ 31asexDsvfPSuXRS+MGRb+TRWkL4z+I= X-Google-Smtp-Source: AGHT+IG36+FxPfRoaJs6T0beHTgfIyO000dxf+TJr+Eixq0xO8Ji7S32Oazk3Y0uueD1EPyK9+OZIQ== X-Received: by 2002:a05:6000:2a4:b0:386:1cf9:b96e with SMTP id ffacd0b85a97d-38a223ff2c2mr49058216f8f.55.1735924249885; Fri, 03 Jan 2025 09:10:49 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c847dabsm40627875f8f.59.2025.01.03.09.10.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:10:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Alistair Francis , Kito Cheng , Richard Henderson , Keith Packard , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/5] semihosting/uaccess: Include missing 'exec/cpu-all.h' header Date: Fri, 3 Jan 2025 18:10:34 +0100 Message-ID: <20250103171037.11265-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103171037.11265-1-philmd@linaro.org> References: <20250103171037.11265-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org TLB_INVALID_MASK is defined in "exec/cpu-all.h". Include it in order to avoid when refactoring: ../semihosting/uaccess.c:41:21: error: use of undeclared identifier 'TLB_INVALID_MASK' 41 | if (flags & TLB_INVALID_MASK) { | ^ Signed-off-by: Philippe Mathieu-Daudé --- semihosting/uaccess.c | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index dc587d73bc4..382a366ce31 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -8,6 +8,7 @@ */ #include "qemu/osdep.h" +#include "exec/cpu-all.h" #include "exec/exec-all.h" #include "semihosting/uaccess.h" From patchwork Fri Jan 3 17:10:35 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: 13925723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D52ABE77188 for ; Fri, 3 Jan 2025 17:12:04 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTlCX-0000SY-JR; Fri, 03 Jan 2025 12:11:09 -0500 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 1tTlCO-0000S9-FQ for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:11:00 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlCL-0006nV-EZ for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:10:58 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4362f61757fso123745775e9.2 for ; Fri, 03 Jan 2025 09:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924255; x=1736529055; 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=bFOLOeMz7nvWSObnCUJsVQrXvjleVQMv9sXlW+9Cp1o=; b=Dv9AHlLEy6FKDGC3fNW45b1TcNhGhnXbt15irFsF51B4Eqv/zdBTlNsdEXYThKKA4E CSaCnZ+Nrh9a6izERArAOt5DM6p3AevHWuRi0fJMG+PJs3yrL0Mb68RFE4a9UXzKfDdw Wp/JrB3o1ypwS3ys7uTzYzsvVkoCo4LR9w/pGU8446DznlFLSD/HTHkV73LwoC8/xbzP UyzserCsY+TY6lMDHFdPRio/tET8RoeO/c5medVvN6fuqq/gdWCSALaFonZ7nBuzOy6Q yGa6T0s8jislrW7E/umlEKz4sAGVc7vumUs+t3Yv9c7BsBD8K5pPqf6rvrmwosjWZF34 lQYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924255; x=1736529055; 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=bFOLOeMz7nvWSObnCUJsVQrXvjleVQMv9sXlW+9Cp1o=; b=WJOq/ARHV9+gna9FN/LR4G8wfYjA6Q/z5n3q7o6C5l/kbnY2Zult+8/YQmN8avCNrC B51P+vKYaoslv2hTDrh2QJ/Ou6jTH2CT7u+SUKa9C10oKPDwyBoABQg1EluzvRxM8cnC eKlDYoqYKcjglOnbnoQrzbaApbrddRTNJ+HxH6Ud0T+5wAKlWY6Ov62N2J6zZcHewuE/ PU1KGFFGwCV0MousiEewj9J2nD8a/cze1OYbPs2bFDijgi6bVSNTj5iVAfpbzwdhIbdm blL6e69eA0Ma3KnB5UZu+7tpJphA91V90PJderMacQI8E70aDfD6XljEGJiqgrfZ0I1G Yk1Q== X-Gm-Message-State: AOJu0YxZY+FbdSUHHL8XckMFtuTO6LJPtOQxLhIAPWfw3+MyH8N+r1fH fw0rmq0j3s0oJ1cDVNdy8UxvqLlBnlWBJxPO8SjyBBJD9PlbEoPf8GM95yUQM/wO6XTbo4VIrPa htrM= X-Gm-Gg: ASbGnctb9FtnM7O9Zelk1qAWQxYc5IMaf/AZFRsd6MOFpW8DlBMEa8n94MbUUH67PdJ nLpYBAaTZBg6mBFP3UGW+O/TNKk6bMlP44L4zAg04JHWDwQzWd/WiD7aKXTFnsY8y8MnwfSgfnq XjNP32sA07/uYwKiYVw9weZpa/pX093v2QmM0q/t9lKnaIoX/JGa+50/Xe8QnJ/P69Lrhfgjas0 mQo338xrm7mYs9CWLC0gfMxxaDUuqHh4KU/qgjOem8K+DpRZ7z5+wqWRNb1DLqaCy3rHnKhCrKt SfK2T+b8v8RN3FTxN4v+kUYj1Fed6Wo= X-Google-Smtp-Source: AGHT+IF+rrMTjue2+vuHoiVnpaonjflsL6Kb9Yitix7awOVRt+ocOHs/fJ/l5ks1VsYkMQngWSqRcg== X-Received: by 2002:a05:600c:45c6:b0:42c:c28c:e477 with SMTP id 5b1f17b1804b1-43668b4808fmr385949495e9.23.1735924255552; Fri, 03 Jan 2025 09:10:55 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43661219578sm493380585e9.20.2025.01.03.09.10.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:10:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Alistair Francis , Kito Cheng , Richard Henderson , Keith Packard , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] semihosting/arm-compat: Include missing 'cpu.h' header Date: Fri, 3 Jan 2025 18:10:35 +0100 Message-ID: <20250103171037.11265-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103171037.11265-1-philmd@linaro.org> References: <20250103171037.11265-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org ARM semihosting implementations in "common-semi-target.h" must de-reference the target CPUArchState, which is declared in each target "cpu.h" header. Include it in order to avoid when refactoring: In file included from ../../semihosting/arm-compat-semi.c:169: ../target/riscv/common-semi-target.h:16:5: error: use of undeclared identifier 'RISCVCPU' 16 | RISCVCPU *cpu = RISCV_CPU(cs); | ^ Signed-off-by: Philippe Mathieu-Daudé --- semihosting/arm-compat-semi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index d78c6428b90..86e5260e504 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -166,6 +166,7 @@ static LayoutInfo common_semi_find_bases(CPUState *cs) #endif +#include "cpu.h" #include "common-semi-target.h" /* From patchwork Fri Jan 3 17:10:36 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: 13925721 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63B99E77188 for ; Fri, 3 Jan 2025 17:11:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTlCa-0000Tb-85; Fri, 03 Jan 2025 12:11:12 -0500 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 1tTlCR-0000SP-HG for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:11:03 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTlCQ-0006nx-1V for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:11:03 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361815b96cso82555325e9.1 for ; Fri, 03 Jan 2025 09:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924260; x=1736529060; 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=A5XdE242or4AIgVZWPEadWGVw1QKMWXHY4iwMfcXJLM=; b=D8mcgKEXXgw0FqNtBfDFED/+AhBGUp8gatP/52JFK+d63do4Y+vFw4Q4kXIH9FBgf0 0NB3+0JNuDpVsQ+S/+L1o+3WcCIZBjpODMIIYsTj60WLoLx+eN7PjaiOeQxH4bsAfY8X kvvPhumg5mQ2yWbP/f/crqG2fQYgLYK2pWqVLhv2dhhHfh+xNf2xNAf6BDQaCw1qKlkq K1nJBmg+b+S6mwjuWYZO6JtgNNOmHk/NutLLIWECrIQns0x83My8AAq2lOu/wdrvvN3n BiqOKQ7fmL/CiBqiJ8mq0laNtf6XqXUcE/ThG3yBG706pGcu8VJWLGtikOsqZSPz2O29 Qn7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924260; x=1736529060; 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=A5XdE242or4AIgVZWPEadWGVw1QKMWXHY4iwMfcXJLM=; b=a986Cb8OCpuebj7YLqeNUJJ4wcZGxuMklE8bj5YuyaBAggH+kx7ExJbBAhG7OTUkoZ qoyfKfpID82mqUH6U6NidFBhDXnxJkfDxDU/8srKqzC4quSj3eATMkkJkJuISMrmxcEi JHWzVauOfnLSUiJltDEzOic2qm5sfauWFmzUzBCsZIO9XfXOUReDRKiw12D5JJwmCNlp TiIATyBX4M6sONcV8D2Sd4CJyrTCJLm89A+zrq5rDcKmfSdENO6J9jURyFWWgt20lX7+ KGr3+PCPb0oo88bJSb9JZn0raTN2lan4gSdbCPGDpKGv5p78RHnm7qz5QfXIUQigpQeb W9qw== X-Gm-Message-State: AOJu0YxoHAfqT8Xs1TcLKTlpj9AdgSMywkzGmYZ5dxVeD1KeXMxdOvmB 42mfK1ILanpg4eDZtf3Bep954LYT2zUW1U2iWI40Dpsk8gT3X3huZgkRbXauXFi23L3ZRBhTesJ 0bD4= X-Gm-Gg: ASbGnctp3AzmhWmtl4RcYaeP88JA2EC6rLgsxBFcTL8iROFdNXegCKFB6ctv3zM26l6 q1FeJnJXQld+7pNonbTBTuBBEbib8yoChH/LwxC2mHx+33QF3brZ35ktoiVzNzodUbWumSqZkmP jBE9aX7hv0uADqRHkYVJPy5rUboJEhpAzsmU5Noduanjb6Wc4zCFl3+BLs677Ar8SEJz9hafScG WqX+EzV36S2rKkgc6iSuLQuB4VwAT3drM+SMXPNzsIloEZBovDub1PTsBHt0nxOlMCm+ER1ZAY+ nj1TrVIvPv9mXfSJfJP3gmoomyiCukU= X-Google-Smtp-Source: AGHT+IERC60Agg1k2eN1gd88XTgS6bx2NpC5+LTqOO1XivlHcuIt5iuShlhqjWQR9o+zzB1I1uKB9g== X-Received: by 2002:a05:600c:548e:b0:431:5e3c:2ff0 with SMTP id 5b1f17b1804b1-436686431a0mr401008775e9.8.1735924260263; Fri, 03 Jan 2025 09:11:00 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43661289d3dsm494171645e9.41.2025.01.03.09.10.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:10:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Alistair Francis , Kito Cheng , Richard Henderson , Keith Packard , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] semihosting/console: Avoid including 'cpu.h' Date: Fri, 3 Jan 2025 18:10:36 +0100 Message-ID: <20250103171037.11265-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103171037.11265-1-philmd@linaro.org> References: <20250103171037.11265-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The CPUState structure is declared in "hw/core/cpu.h", the EXCP_HALTED definition in "exec/cpu-common.h". Both headers are indirectly include by "cpu.h". In order to remove "cpu.h" from "semihosting/console.h", explicitly include them in console.c, otherwise we'd get: ../semihosting/console.c:88:11: error: incomplete definition of type 'struct CPUState' 88 | cs->exception_index = EXCP_HALTED; | ~~^ ../semihosting/console.c:88:31: error: use of undeclared identifier 'EXCP_HALTED' 88 | cs->exception_index = EXCP_HALTED; | ^ Signed-off-by: Philippe Mathieu-Daudé --- include/semihosting/console.h | 2 -- semihosting/console.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/semihosting/console.h b/include/semihosting/console.h index bd78e5f03fc..1c12e178ee3 100644 --- a/include/semihosting/console.h +++ b/include/semihosting/console.h @@ -9,8 +9,6 @@ #ifndef SEMIHOST_CONSOLE_H #define SEMIHOST_CONSOLE_H -#include "cpu.h" - /** * qemu_semihosting_console_read: * @cs: CPUState diff --git a/semihosting/console.c b/semihosting/console.c index 60102bbab66..c3683a15668 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -18,14 +18,15 @@ #include "qemu/osdep.h" #include "semihosting/semihost.h" #include "semihosting/console.h" +#include "exec/cpu-common.h" #include "exec/gdbstub.h" -#include "exec/exec-all.h" #include "qemu/log.h" #include "chardev/char.h" #include "chardev/char-fe.h" #include "qemu/main-loop.h" #include "qapi/error.h" #include "qemu/fifo8.h" +#include "hw/core/cpu.h" /* Access to this structure is protected by the BQL */ typedef struct SemihostingConsole { From patchwork Fri Jan 3 17:10:37 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: 13925720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93F5FE7718F for ; Fri, 3 Jan 2025 17:11:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTlCa-0000Th-Dy; Fri, 03 Jan 2025 12:11:12 -0500 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 1tTlCW-0000T9-QX for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:11:09 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450: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 1tTlCV-0006oP-9P for qemu-devel@nongnu.org; Fri, 03 Jan 2025 12:11:08 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-385df53e559so9799460f8f.3 for ; Fri, 03 Jan 2025 09:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735924265; x=1736529065; 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=Q/CzbbG3jOxGhXorzYheCWoGqel4SlzmIyrU6suQqBM=; b=kyUL5HaUsDQe9YDQZb6Ki7ZTbvghAYHCf9IpLCsxUmPpN9OqGE/Akc6aFFRFTE3fi0 Nj56nzaUAahlISX3hvvIk2jJZlxVrfd8dqZcSec4GA8BJtUmVQdlz5oBeNhKDTnn0GNK CqE+PDVKefkUjjuztn0ifAm9d6skVxw2fRqeRtUgA+5seEwi+gL7bmSwknTZ18VC/UMD baNqZbgAX8NJEZtQ756u5itvFgeKqz22blEc8ZN8oQsvGZJ+5z2KHzglOIq5/kYwZ0/C 9jiB8ikFqqmsSfIQITBgplcfjKgOh67K8TeE82qx1hkLVNOKmiA9lnxf+zmJvdRoaFzv UVdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735924265; x=1736529065; 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=Q/CzbbG3jOxGhXorzYheCWoGqel4SlzmIyrU6suQqBM=; b=oero3itUF3BKSkUj6+XlKLhhqANKstWkdKyXyajwCWb9c66Wvyt8CE+Ax67MCCBpMi IxO3bYZ+4ZbgOYDd/fyuF+HHYCw/6A6koV33L4vlnOrlY5jou7OV7pGdTkOg9rmEvcPu TMhKRZ49/BO33oDErl5x+JYBSFFqhV3hnRhc+kb5bsIEJJtDDVPWny5XX/zsyjfuxsgP 5gWL/f9n4nMD47uPSFXXgHbN4tF8W3cn+g/HwBc+2rxHh4sX93Jj8tiXpF/daTOczSkm L24Oa+cgdt6Pn0WPE0vuABxwRRfSnnJIJBPdrHVFSOpg+7ltjdAPGOsim52DirBZRTS1 W6tg== X-Gm-Message-State: AOJu0YzdNqEzQ5wjjRb9kHSNPDmGi0ku4p1lfmYpxhXZwG5icac/Kbtx ZXoEiINpCabtiCjZJrWQwm+/Qfi+T9Lhwi+nS9IHbNbjmDSuIMav2e0qqfieXz3OJJj+GCdRu7I wBDE= X-Gm-Gg: ASbGncsrCGr2aWNxazci7J/Z5PzEstou30q+r7MuOt1wOtCU/L+QElKGCzqmMCmKmo+ W4nXnvv+WXv2hATyVo11lSTONbwPRCXGV10KyZ/Vlo4uHZO2JGtCn5AER75fO1hVQ+5JfykezCJ GMcQAo/MxtC7tGH51WsdtSHsFYs8R5VzrZ12dDe3/lhXMQ+qyer2H+IQKAfuYLtBzQCmcd7GQkJ ILxwCSrtZM3YWb8LHjNHPyENKf3qflSdM3OGIt57HpLGULzsV3BtWJGhAd99m68snDsHvUAXe+P uiR0ZbBzukVA4H9GQbfKkYtcfLkpk64= X-Google-Smtp-Source: AGHT+IGchJbT6bpnXWoxhQ17XnigkqxhTNr+aNxhYgiEpo4fdURQlkPCucKa22rfOo74+Qm9odwasw== X-Received: by 2002:a05:6000:154f:b0:385:eeb9:a5bb with SMTP id ffacd0b85a97d-38a221f698amr40605261f8f.17.1735924264910; Fri, 03 Jan 2025 09:11:04 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656b119b6sm526575015e9.22.2025.01.03.09.11.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Jan 2025 09:11:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Alistair Francis , Kito Cheng , Richard Henderson , Keith Packard , Daniel Henrique Barboza , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 5/5] semihosting/meson: Build config.o and console.o once Date: Fri, 3 Jan 2025 18:10:37 +0100 Message-ID: <20250103171037.11265-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250103171037.11265-1-philmd@linaro.org> References: <20250103171037.11265-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org config.c and console.c don't use any target specific headers anymore, move them from specific_ss[] to system_ss[] so they are built once, but will also be linked once, removing global symbol clash in a single QEMU binary. Signed-off-by: Philippe Mathieu-Daudé --- semihosting/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/semihosting/meson.build b/semihosting/meson.build index 34933e5a195..86f5004bed7 100644 --- a/semihosting/meson.build +++ b/semihosting/meson.build @@ -4,13 +4,16 @@ specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( )) specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_true: files( - 'config.c', - 'console.c', 'uaccess.c', )) common_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_false: files('stubs-all.c')) -system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_false: files('stubs-system.c')) +system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_true: files( + 'config.c', + 'console.c', +), if_false: files( + 'stubs-system.c', +)) specific_ss.add(when: ['CONFIG_ARM_COMPATIBLE_SEMIHOSTING'], if_true: files('arm-compat-semi.c'))