From patchwork Fri Apr 26 19:41:48 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: 792376 Delivered-To: patch@linaro.org Received: by 2002:adf:cc13:0:b0:346:15ad:a2a with SMTP id x19csp627213wrh; Fri, 26 Apr 2024 12:50:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7JGNZBsJMrXu/xphGP6pPazPZ28/XTs4mRLQVS5UJP39vVLQp2IFaTwRlWMHbbg/NUtG52HjC0AUCDjDw73T0 X-Google-Smtp-Source: AGHT+IEnpMkYKLMTlA2/QRQAa75qYGKCu9W9C0pMVVihKyTjhZK3GlgzqJjRdgf891qD3voHh6Ob X-Received: by 2002:a05:620a:88b:b0:790:a313:bcda with SMTP id b11-20020a05620a088b00b00790a313bcdamr3717616qka.52.1714161029491; Fri, 26 Apr 2024 12:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714161029; cv=none; d=google.com; s=arc-20160816; b=cj90x1okPZImw1lu0SnbfpiRen3zRSgcLp0ixG4G9OJCxKQZ+8rfX6pHOxt7Re10ii 1hnPATXBMR4NVLE1VGjuy3tpK1b/OEAEu2cNfc0SjVcapftmQE+e12I9D94BTMEJx6TN nXg6ftLorLMaOhwfoZrFCLUe/l3nMv9osyg2ylVM0g8utG5R4D24XVXKbaeThGzOch4z SkwYJQQAtbGquWxtmB5ibMw8p1ICOin/QI881uimxYyrsPZNABrauZ0u5Qyeq6CWdAiu aOZ4/EUnV8WncGnEl7CASGGnGRNfG2jBjz75W6wsYhA2x7Tw/U2FTpGD2iXPbh9CJPvm 5ucA== 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=LQMRED2mjhykafQx2tnnAWOSRm9bpyuzeSKJlhGVxZw=; fh=SfiFowSzI5ATZYdt3xSfg9ijceQjtlPRNX0VSBhOddY=; b=XHmcKb0gEEzYW+87AD3GEpZcyuJhxGmH2/OL20bn4sS7IwDRF6KRE2Jo0ybttGxxxZ lG7SW7evd7nHLUHnAaH/iGPn7k8HWw+CC6r5DfbGhKM9j2GJSO+OXmZ7x179Oi5CGdib C9xqtVl0tpBTcSC0xHqj09+TG8cPku3ceiBO3Sa0sOw3JyJSVLK9PDyDc4lS4G4AbmOC fq2EfBaiXyG1zHLjUM19IybvxiyDOZOE+5QkisObG+FENjG3nIBpAuavkx/amhgMembp VdcXhq/dFCGDgNmNd7G235cn983YcQocIxcO3tLQd/tRCuBQfjuMYCfBXaydMtqDuHLZ 0L6w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kLCeSw48; 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 wk12-20020a05620a578c00b0078ec559475esi20134431qkn.750.2024.04.26.12.50.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2024 12:50:29 -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=kLCeSw48; 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 1s0RV8-0008Df-Eu; Fri, 26 Apr 2024 15:44: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 1s0RV5-0007ux-IM for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:44:51 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0RV2-0003zY-Jg for qemu-devel@nongnu.org; Fri, 26 Apr 2024 15:44:51 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-56e48d0a632so3786306a12.2 for ; Fri, 26 Apr 2024 12:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714160687; x=1714765487; 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=LQMRED2mjhykafQx2tnnAWOSRm9bpyuzeSKJlhGVxZw=; b=kLCeSw48jzbLw6FmZf9QirNjOA8veHZkAjtOoXIxMqUjLZwWRBMDrmzv7/aQArBYOD a4NmYjIrROvBakxedvSY9Lrb9yc+QuYCUidiJxgXFtpcR7G3uxy1ZLltvO/4bpJrvBDM r9mpYCLaflT3RRWPZmDXa+ZbCeowHW4q9GTOri1F55Za1ECKUARQJVjKoYK78QnfxcAo zVQrbEd6hsfZRR/pAdCx85h75v37vlCvEH5SUyED0N+Blt9J/ckpg9sPi2umpQAzY+jr Nzo6uozJUPp8CW7Ok2pa6UK/smTUBoBeped+bQXTlN1ZT5AMY0neV65wLBEOvgwA61XK 6kjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714160687; x=1714765487; 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=LQMRED2mjhykafQx2tnnAWOSRm9bpyuzeSKJlhGVxZw=; b=ufbRJlQvb3Avr52HMOYmxSFDJ76t5SW/PW7cE/LhTu65KKsTxKN/sntSCRzIusKLf8 8hfuWg9barfA7oNNmFONBQTu5Pcp77DvkjT4/N0POf6ONKXnNYzkaiQBo+1muygVqDg5 Q0U+A1O1h+hq9ZZC81pVzxNAB7jhV+0RvE+WKM5t+qc66LKbDk4jWeTLIh5+I/NBdrxA 1eMubDqLSq/QNZFbyy50VFWb6qCYnxqzKM+pH22DuOP8cgKhfFQKLSPtM5a2EybAOah1 sJ/w/1GZZmkHCCWCUe0iJec94sslIL2qiMYBsytJad6NBdKw1cU7ybMnbqNrDvwCxpmh VxRw== X-Gm-Message-State: AOJu0YzorRkU5n0/DYyYwPaAv6K9dTTHETWq9CJLEX6F8rA2kz2KO5SZ I/t2RS5ttDT/WAlQ3/j2HB+paioTbZL4kfW5nuGPYnH/S93uBIoCa250TGra+hF09cyhMQU0eb7 /A4U= X-Received: by 2002:a17:906:f748:b0:a55:6602:e3a9 with SMTP id jp8-20020a170906f74800b00a556602e3a9mr3903164ejb.1.1714160686795; Fri, 26 Apr 2024 12:44:46 -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 qt11-20020a170906eceb00b00a55ab2630c3sm7155905ejb.38.2024.04.26.12.44.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 26 Apr 2024 12:44:46 -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?= , Thomas Huth , Richard Henderson , Riku Voipio Subject: [PULL 28/38] exec/user: Do not include 'cpu.h' in 'abitypes.h' Date: Fri, 26 Apr 2024 21:41:48 +0200 Message-ID: <20240426194200.43723-29-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::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 "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 Message-Id: <20231212123401.37493-20-philmd@linaro.org> Reviewed-by: Richard Henderson --- 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 731f345ff5..3ec1969368 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 "user/tswap-target.h" #ifdef TARGET_ABI32