From patchwork Fri Oct 13 12:56:28 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: 733203 Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1448743wrv; Fri, 13 Oct 2023 05:58:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/5mFopu81OcP3pU9wdoEk31JZnk0QB1sO3KZWUx3BcZl/0ICuxs21vMxgYGqjJPAsaEee X-Received: by 2002:a05:6214:130e:b0:66d:237d:8f75 with SMTP id pn14-20020a056214130e00b0066d237d8f75mr2963770qvb.35.1697201892520; Fri, 13 Oct 2023 05:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697201892; cv=none; d=google.com; s=arc-20160816; b=uceCS54W8uNgnp0P9v3KJl1kSnx0Zhlv9NHJLkSq3W2MRtiUTy287naW9aKN922joE QpQvuP20psUA/DkaXKdh7/1Z8aE/t6jg+Kq0W7LlBhhEZ+Mqr0JAHOfNc/mCYGcA55M3 lHWXfkA3l+csS1aDETvHYO6IPRxcMoT/PWlA3Llk0yb7RUyjQbNqMqP9ERp6Sdztomru iOIVLiR8rZitJ/QFh97XTLyLMZ7WiIXxwilEtn+R4tfKSr9FSgGRLI1BRsAA3BzUZ2CC 6U8vRZDJEwVRKTqdEozZShmhsbiDksVVHu74YOtlcNqMBt4fVizLZwCEz4G5OfRWdkrN beag== 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=EnGehjCRe7N5NlcitFMO+yrUN4cOF8jWvzxKACAW5h8=; fh=VA6j7lkwZBpc1StxpFljCA0aH/klDdhOAPrIIfLw9Rk=; b=Y0ZKkA++4dupSBKGlu4PDTxxD+Y/H614lwcyCHCh6QJo9g91v/TvkIGR3HcaMOyRL2 ZIUyS3ELc/k9/G2DXpXWIvzshUWFJ7U4nqlkaWy8Nn7+4cAa3ZUjVw1fY0ZicX0Lj+CG CIDjdeXlk3IpvRjFoWM7TrhpTh3E/PNxjp83lhC4Q5E7kk+/F90WdsKBPOlIOgjQzAr/ 9sD9nM+Bry2HzVLZ1eO+d1hTgRP3UKr4vWnPwv0ek+NqRdHlR+9ZO6ARvSvIR+3iPHS4 5hSuU+vF/Yy439lxbBOYQWczEouTtAmorvk1/jldZQuJ3Q619sVabOpKOxE2RqFCAYMT 1KMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AVEkOjIy; 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 eu2-20020ad44f42000000b0066d029450afsi1106779qvb.305.2023.10.13.05.58.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2023 05:58:12 -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=AVEkOjIy; 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 1qrHj4-0004CR-8h; Fri, 13 Oct 2023 08:57:10 -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 1qrHj2-00048P-Tm for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:08 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHj1-0002d9-6l for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:08 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-53e08b60febso2997068a12.1 for ; Fri, 13 Oct 2023 05:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201825; x=1697806625; 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=EnGehjCRe7N5NlcitFMO+yrUN4cOF8jWvzxKACAW5h8=; b=AVEkOjIyt4nNmvF/1K+YRfQQigF1vcv06TgapS74Hq/EgVTcZUtD+wx3rpRtFABAHV JMX8GynDx0MRaNxaLSn2+SS03XPWhmAivAjE04VRanlYe4QLZxcmuvF/r3DlnC+M0aca 9EUjkxTgMCS1oI3RV+0/6TmHayH22n6nDJOFdEAhUob3daOK089zyDHAWeaej7T+maXy V1c2aMjcOdnWBonXEhnu/ZB0Zcz8luxoEX7FyGLwRaVu/uJYf38Njk8NyYeLyn9C1jzb tKiRMrS5ByojiTnC4AcNb5E7KARJ+ImSjOqBMeYSv8OTFHg6wNGsKLn2BziTkWQJtqr1 boHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201825; x=1697806625; 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=EnGehjCRe7N5NlcitFMO+yrUN4cOF8jWvzxKACAW5h8=; b=M9sJhhqdq7hvsml1ejMx8H1TF81HmTdCHS2DkvI+VFI2IsHVhBVCWOA5OucWuWmCDw khkj2nVhZx7uyvBURNTmKwH4C5eN8pNZFlRNKeWERQGeRDeQ4SV/6CZ1rl0RKLO5foWi GQ6KSmWheyO0+MDtKBHA/ZCPlYJu3WS5G88X647HhxBJObknbSGOE31QVyToohWjEzGK VgioMlfiFaHmTgZ+wyUBAZvwlNSCUj9Vp6aGv8u9VkRqbHwIgWr8P5CoC3Ay26KxhR72 kZzp/Lsaa/1EaYPbIn5HrofBWlfW8Fo+K+cXY2yYc8SXP0j3/1vDL3yHMR/g8gZlae5N d9lA== X-Gm-Message-State: AOJu0YzjqiBVYF3X/g+SsaSVKQ0Z8lXZ5mHV1eemsmTNe9IVNaiAUhhY 0dCil/CyM5Etg/p6BItr2euplnCPp/Lykn4o7rI= X-Received: by 2002:a05:6402:14c7:b0:51d:f5bd:5a88 with SMTP id f7-20020a05640214c700b0051df5bd5a88mr23977902edx.38.1697201825324; Fri, 13 Oct 2023 05:57:05 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id j18-20020a508a92000000b0053deb97e8e6sm3069380edj.28.2023.10.13.05.57.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:57:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: David Gibson , qemu-ppc@nongnu.org, Nicholas Piggin , Harsh Prateek Bora , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Daniel Henrique Barboza , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 5/7] target/ppc: Move powerpc_excp_t definition to 'cpu.h' Date: Fri, 13 Oct 2023 14:56:28 +0200 Message-ID: <20231013125630.95116-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231013125630.95116-1-philmd@linaro.org> References: <20231013125630.95116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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 The powerpc_excp_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater --- target/ppc/cpu-qom.h | 29 ----------------------------- target/ppc/cpu.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 41e97a0ea1..b2e42c2996 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -79,35 +79,6 @@ static inline bool mmu_is_64bit(powerpc_mmu_t mmu_model) return mmu_model & POWERPC_MMU_64; } -/*****************************************************************************/ -/* Exception model */ -typedef enum powerpc_excp_t powerpc_excp_t; -enum powerpc_excp_t { - POWERPC_EXCP_UNKNOWN = 0, - /* Standard PowerPC exception model */ - POWERPC_EXCP_STD, - /* PowerPC 40x exception model */ - POWERPC_EXCP_40x, - /* PowerPC 603/604/G2 exception model */ - POWERPC_EXCP_6xx, - /* PowerPC 7xx exception model */ - POWERPC_EXCP_7xx, - /* PowerPC 74xx exception model */ - POWERPC_EXCP_74xx, - /* BookE exception model */ - POWERPC_EXCP_BOOKE, - /* PowerPC 970 exception model */ - POWERPC_EXCP_970, - /* POWER7 exception model */ - POWERPC_EXCP_POWER7, - /* POWER8 exception model */ - POWERPC_EXCP_POWER8, - /* POWER9 exception model */ - POWERPC_EXCP_POWER9, - /* POWER10 exception model */ - POWERPC_EXCP_POWER10, -}; - /*****************************************************************************/ /* Input pins model */ typedef enum powerpc_input_t powerpc_input_t; diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index d521ee97bb..d8cf4c03bf 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -190,6 +190,33 @@ enum { POWERPC_EXCP_TRAP = 0x40, }; +/* Exception model */ +typedef enum powerpc_excp_t { + POWERPC_EXCP_UNKNOWN = 0, + /* Standard PowerPC exception model */ + POWERPC_EXCP_STD, + /* PowerPC 40x exception model */ + POWERPC_EXCP_40x, + /* PowerPC 603/604/G2 exception model */ + POWERPC_EXCP_6xx, + /* PowerPC 7xx exception model */ + POWERPC_EXCP_7xx, + /* PowerPC 74xx exception model */ + POWERPC_EXCP_74xx, + /* BookE exception model */ + POWERPC_EXCP_BOOKE, + /* PowerPC 970 exception model */ + POWERPC_EXCP_970, + /* POWER7 exception model */ + POWERPC_EXCP_POWER7, + /* POWER8 exception model */ + POWERPC_EXCP_POWER8, + /* POWER9 exception model */ + POWERPC_EXCP_POWER9, + /* POWER10 exception model */ + POWERPC_EXCP_POWER10, +} powerpc_excp_t; + #define PPC_INPUT(env) ((env)->bus_model) /*****************************************************************************/