From patchwork Fri Apr 26 19:41:29 2024 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: 792354 Delivered-To: patch@linaro.org Received: by 2002:adf:cc13:0:b0:346:15ad:a2a with SMTP id x19csp625443wrh; Fri, 26 Apr 2024 12:44:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbapXaTC48thdQS6KkI5rWBWuAo7WQJCejXSk8zkvBlomZ7mmAb1ZaBY5v5r1RMySxlIBCaXObra3I7AKY7SUc X-Google-Smtp-Source: AGHT+IG4L9MuenO3xBptWIRK7Uh8TCV0GjghS6cfdt/hf0Kovqij9/EtTc85gtFlyNsXNgkBeox0 X-Received: by 2002:a05:620a:3b93:b0:78f:391:f8d8 with SMTP id ye19-20020a05620a3b9300b0078f0391f8d8mr769774qkn.31.1714160695280; Fri, 26 Apr 2024 12:44:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714160695; cv=none; d=google.com; s=arc-20160816; b=dGRlWcaBxwMZzHtCNGnO7FE/LQz6c+7fgUOU5YAB2gVuC85/PPEQcYF64ApSSiI5ad RCkAG+7hvRRMg6hinskr6UxyqNzOIDKxruJvmKMyqj6rTy6miJ89Kxj9j+lE4GPAPEa2 bjfPviWUzzkOd18pqY9BS/Gh+czgQBY/S70rbWiX2rdnC8ZV/nVEex2uSC+N9SjxIn0y 4edHqOFeaQ19XYwg2FfmV7rJVvTyvDAoMBRpubqSqI+/YFXxo8iUdnsYL/2O8RElbUfT tch+prKloe3VHFtBg6PtUAH6DS8AMjemQhtX98HYJRYOMdKiYSz+i9z92O8pAeE4KSnG bQfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=DE5bQD16xfwEMndgjcE7z1cuHvznf4KEW6ZfSJ0m28c=; fh=l2kfs+/h7+HpgbfyDT1jiv751sa6ON8Djpmc0d1l2tY=; b=QKZuLtT039V9wHiIWg871PH9LD65faneL+uTL6c5PAwpp1AjUn/isT3y1gDs50xVlY TJMnKzOgOYxpYgT+la904jiLYZLFrl44r/M9ka6piA3HFo3ZqSjgjcGzvJHB71fJ/k09 O0Q1BvcbJlW1xSulnDFZs4/v7Ogo7fPGHe/TzIkyM1JRSY8KF8n7KVHPzRBVhsPlCgTc FKjRiHxmiCxLOzmtF0kjWYn5l2/kLtkEI/ntGxM9bx0krlGfPy/Wem4BBZKwuUH8QBmV GAxjd1KaNMGyesutWfrlxK3W7J8HH2esSCDj3ekhUuAY6/sLZcYc1Yu116Mfmr3VPkMJ euHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mtLD3cry; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o3-20020a05620a228300b0078d62c6fd35si20546543qkh.570.2024.04.26.12.44.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2024 12:44:55 -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=mtLD3cry; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0RTg-0001FV-MG; Fri, 26 Apr 2024 15:43:24 -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 1s0RTI-0000wW-Ls for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:43:02 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0RTG-00030Y-79 for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:43:00 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a58bd410f92so281666066b.0 for ; Fri, 26 Apr 2024 12:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714160576; x=1714765376; 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=DE5bQD16xfwEMndgjcE7z1cuHvznf4KEW6ZfSJ0m28c=; b=mtLD3cryCFwGKpctZkcO6fJCInvNr+xo6odVYnQX+roWWGoDY3XJ9or/wh5SvLjJ9J NPY6N5eX2SB9uKZ6dDCptDxUqjgNn6p395lSeH6YFP2+2NeDIvA7B+mvbGTGV7AXa5ea MpV+BBH3w1FJPILlCfD4kW9uThOO+VPbqa0uMvPF0NdC+B8IlipBxCZ4bpnyvNkL3JIf v9DbIX/uPwABEXxXinVF+Kji9vKOz4SXLDvR+/NzUiEVDwLGoF40qBVU7VTfsP5pQEbz 4pTk8hc1zAIXBX7yCm/39lX81kFqxcMctRu7+gbiFxVkkb77hoPYbXampp85NSbJWFmZ 086g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714160576; x=1714765376; 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=DE5bQD16xfwEMndgjcE7z1cuHvznf4KEW6ZfSJ0m28c=; b=i2bzVNmz2uN5av9RpyUmaj3u7VveYzpvIf/y8mzw9w5FyYw0ZG7rVm44a7BwO1N9Cw vou23Z6WhIocCq1rNDjsZGx/URQuO95C0ccEiDiMB6cRgXJRwhJLjVuqOHA1AnQ56Ew/ S3+8SS77yN7u9cNsfk8WD9euoS6ep5OISuKPJJAEXIo2nQHtRUWoNwpJlB5RllC2Wb/h NskoRrY9ddsWM6mMp4lR0EXOjntH3309fKdMEYKZRjyuW1KM1yNZES00TN+eVV/7X++3 lHLufL30Xv7CICkF6TxaUsC0wqauhVgyKAd/j8l2zfxO6uIWmZXJsTb7tAlDu7yYZqy4 aixw== X-Gm-Message-State: AOJu0YyiaLl6ynh5kWSFjZQVKgZVaPb5FIMevSCVV5wNiwIgGKN/qkan +iBUzTrdgQs9NXQMbqHp8gyCPj671d9HBRTq/J5a29c6yIw59uKO2IFe9VqnwGeOwsOn3qt5ifT 0YqE= X-Received: by 2002:a17:906:b0d8:b0:a55:adec:7139 with SMTP id bk24-20020a170906b0d800b00a55adec7139mr2412387ejb.60.1714160576443; Fri, 26 Apr 2024 12:42:56 -0700 (PDT) Received: from m1x-phil.lan (aul93-h02-176-184-11-147.dsl.sta.abo.bbox.fr. [176.184.11.147]) by smtp.gmail.com with ESMTPSA id n1-20020a170906724100b00a55bef9ab56sm5775865ejk.120.2024.04.26.12.42.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 26 Apr 2024 12:42:56 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 09/38] semihosting/uaccess: Avoid including 'cpu.h' Date: Fri, 26 Apr 2024 21:41:29 +0200 Message-ID: <20240426194200.43723-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240426194200.43723-1-philmd@linaro.org> References: <20240426194200.43723-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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=unavailable 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 "semihosting/uaccess.h" only requires the following headers: - "exec/cpu-defs.h" for target_ulong, - "exec/cpu-common.h" for cpu_memory_rw_debug() - "exec/tswap.h" for tswap32() and tswap64(). Include them instead of the huge "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <42c6471e-8383-45e0-85ee-e20ca32ecbad@linaro.org> --- include/semihosting/uaccess.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/semihosting/uaccess.h b/include/semihosting/uaccess.h index 3963eafc3e..dd289af8dd 100644 --- a/include/semihosting/uaccess.h +++ b/include/semihosting/uaccess.h @@ -14,7 +14,9 @@ #error Cannot include semihosting/uaccess.h from user emulation #endif -#include "cpu.h" +#include "exec/cpu-common.h" +#include "exec/cpu-defs.h" +#include "exec/tswap.h" #define get_user_u64(val, addr) \ ({ uint64_t val_ = 0; \