From patchwork Tue Dec 12 12:33:55 2023 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: 753079 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1877157wrs; Tue, 12 Dec 2023 04:39:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYfAmhvEnSO6TluxyBA+ITEM3ars+BWj3NMY01yupE3Um8XYdSWLUy/M13IKuSKm5JRYJu X-Received: by 2002:ac8:5846:0:b0:425:8458:16c0 with SMTP id h6-20020ac85846000000b00425845816c0mr9430955qth.131.1702384759328; Tue, 12 Dec 2023 04:39:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702384759; cv=none; d=google.com; s=arc-20160816; b=RSuLxG3ZKHHuQ7zTxNGCaXy5bHsp+h7lIEZfFsIlT9Y4hSWXqpcSx4ftcT7QhF05yI xm0k1V0apJHfcSuDD5V03Jqm4SRYzNhaKGAkIXbPyMDAjKA7ZxvYm8OHyzMPYJ9ci4DH Kv81rXSSrrtz5DfEZGvpDh0vlfXB3PRJbz5d+O549mii6r7A856jDurcaOf9SDcWbmSq hss4ADNpyuoaTLC/KvicLsn7OqbYtdetTj7wFvxQAuJwqx/g9wblk5LtP6LCKhUy/qVR iTpxSNSVgWaj+y7cOJTaD3iQjLOxAUG9e9mGRfQP0amRoKuyKFrr6nSSoumdVWm7htHo 6GQQ== 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=EgOgJWBHHDbLNzyjR5V9GijCj9jUXCNUrJoD+ikNXAY=; fh=vlFEGdij83GYetLrOUaCnR04sbYRvtckD5L7fw5192c=; b=XzIkAeyI0PZ/58fa/knesr13uF8AxNQp2SunIATxk6HeCmqsxpk+zi97YaJRc1qOFh zH8gBcd9u9euqdAVfJzDMbwBF597a5UTxnJPA/Fn45rKDHUZE/h562W3aAqf1SNwWjnb SYsjKRSUJRTqP8T73K09P+7SMg5WDIcVkim2cDFV96TtEwAW22It5hztldX0Rsp1lt8U KYC2Ax9WLk3mQSH7wA56Np5SJGVMjnV8U5qFGfi5QbbHR3bX9tvXoyofgYPF4xFYY6RN 7vnqjIN+s/cb8pJJCCwFKzgtzbPw8oDoA+bAvvtHH0hYTifoMHtMoQDOY7BR9mkpLnc5 sMjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jdj7ahpn; 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 i15-20020ac8764f000000b00417f4c0115asi1317997qtr.509.2023.12.12.04.39.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 04:39:19 -0800 (PST) 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=Jdj7ahpn; 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 1rD20o-0005I7-R1; Tue, 12 Dec 2023 07:37:22 -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 1rD1zs-0003C0-I1 for qemu-devel@nongnu.org; Tue, 12 Dec 2023 07:36:26 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD1zq-0000Tp-Sp for qemu-devel@nongnu.org; Tue, 12 Dec 2023 07:36:24 -0500 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-54dca2a3f16so10297828a12.0 for ; Tue, 12 Dec 2023 04:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702384580; x=1702989380; 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=EgOgJWBHHDbLNzyjR5V9GijCj9jUXCNUrJoD+ikNXAY=; b=Jdj7ahpnwo5JreuHaKBzeVItX4XhBuzllMXEVhBsr5BS6v6V/caosMOAGemSMPle+C oMHYUsjXAx1K1P9QbZ3cd9ORFwqAeY+uB1WNE9o2BYnYNKREUQ83q3EHz4g77AI9b3TD cXS8KAGVSO2+RxjRjYzJKCmm5c/RmQoafAUQlb2eu2UGGfWGmib83qE5VzBfz2mhbVTc 7eyRHEsLCCwN/5GRc3NbiRlNHGPUF9Tj5zy3OweZXjClAWyN0ux3eiMlWbYI+HPwkBxn I14WfgbEjLOFVqf0DytVIYk7VuNibuRTT8vz6j/fMlafJRZC4+9WsWjVZWs3L8vPz0xZ x/3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702384580; x=1702989380; 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=EgOgJWBHHDbLNzyjR5V9GijCj9jUXCNUrJoD+ikNXAY=; b=VbiMmEUapptrVMDLa+0XvhPXGtdDMCq/himFq4eC9eytqO0DYVvYielw/kF8dpsP37 WY1RZjEmDLe2zYwEhDizUE5vC8pNG4OXDTPGMjNmOOrmvi5lWVpuTvd+nlXW/adrOo8m 22L2yqLCF4VmaPf94j+b8BolE40YXXWiGJp2UVgZ4jCIMHBOHKGlG0HHR168Qi7Ux0Zz o2vU5ixtb+86Ls0d3TnIRai64s3AG8nPFr5gjnA1Fe/oKe0dPF0DIzJdb8NEaMRNLYXZ mTMp6jmi1XwUS1pFM4mnh86NhiBadINzSKwimgvB8VzHDPr63QaNCH0i7WpUjUZ6uUCn 6UXA== X-Gm-Message-State: AOJu0YwKEl4V9nZa73sMjyjl/GbyI1kwLKd6LgImZ77CppLUBldR9AAw FtK6cApEkF9acNfyYqoq6vpC7nE27NQCIgUd4u8LRw== X-Received: by 2002:a17:906:6a27:b0:a1f:6551:6405 with SMTP id qw39-20020a1709066a2700b00a1f65516405mr7283292ejc.37.1702384579791; Tue, 12 Dec 2023 04:36:19 -0800 (PST) Received: from m1x-phil.lan ([176.176.175.193]) by smtp.gmail.com with ESMTPSA id ti7-20020a170907c20700b00a1caa50feb3sm6146677ejc.40.2023.12.12.04.36.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Dec 2023 04:36:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Claudio Fontana , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, Brian Cain , Thomas Huth , Paolo Bonzini , qemu-arm@nongnu.org, Manos Pitsidianakis , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , Warner Losh , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 19/23] exec/user: Do not include 'cpu.h' in 'abitypes.h' Date: Tue, 12 Dec 2023 13:33:55 +0100 Message-ID: <20231212123401.37493-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231212123401.37493-1-philmd@linaro.org> References: <20231212123401.37493-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=philmd@linaro.org; helo=mail-ed1-x534.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, T_SCC_BODY_TEXT_LINE=-0.01 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 "exec/user/abitypes.h" requires: - "exec/cpu-defs.h" (TARGET_LONG_BITS) - "exec/tswap.h" (tswap32) In order to avoid "cpu.h", pick the minimum required headers. Assert this user-specific header is only included from user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/exec/user/abitypes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h index ed10d5fe7e..fbb55684d3 100644 --- a/include/exec/user/abitypes.h +++ b/include/exec/user/abitypes.h @@ -1,7 +1,12 @@ #ifndef EXEC_USER_ABITYPES_H #define EXEC_USER_ABITYPES_H -#include "cpu.h" +#ifndef CONFIG_USER_ONLY +#error Cannot include this header from system emulation +#endif + +#include "exec/cpu-defs.h" +#include "exec/tswap.h" #include "exec/user/tswap-target.h" #ifdef TARGET_ABI32