From patchwork Mon Nov 6 11:44:59 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: 741385 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1039060wrr; Mon, 6 Nov 2023 03:50:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSSLPQ0miSEjim20lzUfrVBO/N32/5fzQMK0shrrLSlBz5NmnxEa4d9i7RnbXW+ptTUoDS X-Received: by 2002:a05:620a:28c2:b0:778:9be8:2742 with SMTP id l2-20020a05620a28c200b007789be82742mr31668774qkp.3.1699271407717; Mon, 06 Nov 2023 03:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271407; cv=none; d=google.com; s=arc-20160816; b=tptPh8/26iNuN+Bs6OAUX9RHhSfeO2aV/pTrhFHLG6ZtLTjIWIvwCpDl8tRT9fAtYK Ly8XiJXYF996sM1jmQVenhzrrhhDrzFfS9ptjtzPRiF9a/GMQZncOPTQVu3G/xNrpMBD +d9qzjm22M9m9p7NAy0LzVBgF/yoB/Bqo7w6z7H872/GZh7O0AL5DbBwPDmXP7BRWlCB XWuu79RTQVC3qgWHHnO4U4QBcmlEH6qScjepjDbU25GeqUTRvxa54NaiPqgavFBkBKBQ /Z4RcaBjKQIN169kQghxCCVLF1JxBgTNU5ES5SFzIa4x9VIJH9fme25VlGvMncE77I8s gMSA== 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; fh=iyPtDenH/bpJiwn6+MxCUj0FPuOI6mBlLIyfrvrbZlI=; b=euKqzfY06NItWJE0axaBw7qa5dMdBx8zUY05lxu+LkuUp8HI/ZVujIt0sWlAIKmSzY B3PgnEn4QSkK3W8FnxJdcSlIPSRDHNt4+zFuZNk7NNDVMN1WljeYI92u+6AkLdBIYJO8 ffN3rHDMUHX1sJz7/OOCKF1MJavm4c/dZ4MJ7MQ7b6yWZrJ1y5LiC7fCHzRKY2D6+bQE XENtRZJ9AqmMu8Ov1swirRxCYZ3umWy7wy06+SvJIWsn0u/3Meb5bxLWpMPtO7iGw23I Air7OeiJyR9MnXSmxuqGBYUhBl0a0PXCzXeWB1qYgLxtAD3CRITaM6bPfaSW9D/S0mla By6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZGuHa0G/"; 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 qs17-20020a05620a395100b00775c0be5457si5563241qkn.553.2023.11.06.03.50.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:50:07 -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="ZGuHa0G/"; 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 1qzy2v-0002I9-PK; Mon, 06 Nov 2023 06:45:33 -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 1qzy2u-0002HD-Bp for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:32 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzy2s-0005Cb-NZ for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:32 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-32d849cc152so3027061f8f.1 for ; Mon, 06 Nov 2023 03:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699271129; x=1699875929; 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; b=ZGuHa0G/XgWogkipxro9H7ycU6Mj4SSCxKM0SvFpOOtcCSWF7h9/9rJSk4+d0J5kbR 9PLoLPUTaxZtd/mvn2Ka72Ejo9H2XrlU5W5VM93wjv1uCw/NXXSxJzZAIZrptC9FXo50 3HIzNoFPaZYTd+jzDgnN6yG0AKIYyQhz1g4TWdqrzqbUiCwYUWIxdddfnrpef30nF0ee iQdEb3MHmMKvfuJ4AqcKdgOq2Gy1pNqoqn8m16+Y0F1BknL1vA6kw/BToKtkrqLM0wEw zC56hswxM9QfuswZSDoKm0ZaHYwiQ19STa4DHweZxd3gdJz8nQzwmRKXCX/kvGilxY/C RJdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271129; x=1699875929; 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; b=Gg+S27He7EkP+67Hb6AYjdv8EAengWQsFstCFwI3/I43zVjSUWTG+LUMQPEzbp/o5R CNuVhfKl275XNkLzaU4a7DXpaTPVmyuvFNvQckv7/5KO+AcW87QcoK618QTv1l07AM1G dxb9dTWXi2royPV537+zdtZdEr2xOBBNGUgSwblj9jOrXunOrHtn7q0bSuAw2Zrpc7gf Scl1Q1TteMkr4hHBDCvyGIfnzvi9/Dqcacxdr/Xwi4nFrEaGb5LmF0SMSYxMn1XZ1HOA LSOSZVlSwq8JyNnNrEK2T87L877tAzGE4JE5V3jbKcwhhIjv+eiARDJwXws+jgANybBv oYGw== X-Gm-Message-State: AOJu0YzG2utCYw6u9hQR8nShjFVZ+2qx0GubHDpbu944GD+05j28X16L ptRVd59gOcX/q82fTXMacHObqhhTSrTtP2qtHNE= X-Received: by 2002:adf:d1c9:0:b0:32d:a0d3:d681 with SMTP id b9-20020adfd1c9000000b0032da0d3d681mr24726960wrd.43.1699271128939; Mon, 06 Nov 2023 03:45:28 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id i8-20020adfb648000000b0032f7cfac0fesm6384945wre.51.2023.11.06.03.45.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:45:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Thomas Huth , David Hildenbrand , Halil Pasic , Eric Farman , Christian Borntraeger , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h' Date: Mon, 6 Nov 2023 12:44:59 +0100 Message-ID: <20231106114500.5269-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106114500.5269-1-philmd@linaro.org> References: <20231106114500.5269-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 "target/s390x/cpu-qom.h" has to be target-agnostic. However, it currently declares CPUS390XState, which is target-specific. Move that declaration to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- target/s390x/cpu-qom.h | 2 -- target/s390x/cpu.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index fcd70daddf..ccf126b7a9 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -33,8 +33,6 @@ OBJECT_DECLARE_CPU_TYPE(S390CPU, S390CPUClass, S390_CPU) typedef struct S390CPUModel S390CPUModel; typedef struct S390CPUDef S390CPUDef; -typedef struct CPUArchState CPUS390XState; - typedef enum cpu_reset_type { S390_CPU_RESET_NORMAL, S390_CPU_RESET_INITIAL, diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 110902fa3c..942589c597 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -55,7 +55,7 @@ typedef struct PSW { uint64_t addr; } PSW; -struct CPUArchState { +typedef struct CPUArchState { uint64_t regs[16]; /* GP registers */ /* * The floating point registers are part of the vector registers. @@ -157,7 +157,7 @@ struct CPUArchState { /* currently processed sigp order */ uint8_t sigp_order; -}; +} CPUS390XState; static inline uint64_t *get_freg(CPUS390XState *cs, int nr) {