From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201830; cv=none; d=zohomail.com; s=zohoarc; b=KPl/jXVO07JGjcGnDp+7GE1p3S6m9+m20ijbLfGIORg5TodgmXUzQZEnYdExajK8TuSU57P3TO763oc+sX8GKMZ5+h+hzHFJveirxYfGQuKTga0847FYhuqeQwiV7q9ML2tH/p7wmXTTg3NnhBOaigWkWB08b3iK0XtQ6crtaP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201830; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aJG9hKwu+wpRvVwz3i5zPTfZu546zhwzoj0NQVluILM=; b=YRmxBAZ4fHk/IHhkg1NcvK6yCLIxh7VWrS5aRzLpilLpf331JgW6DYZT16QJ4kQwXbyL4QymRDVboLo5ahc4kk+WzCTL8ZPlCEwzfM8LrGHR5CAUdjoo62DYbH1kYHZuvq4zqRXq4xlwXmNtLyfsCURQVnn7HBBVDa3MO1k+gEs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201830048117.63684704095272; Fri, 13 Oct 2023 05:57:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHih-00035E-I5; Fri, 13 Oct 2023 08:56:47 -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 1qrHie-0002rq-Hl for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:44 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHic-0002YQ-AH for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:44 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-53dd752685fso3686898a12.3 for ; Fri, 13 Oct 2023 05:56:41 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id da6-20020a056402176600b0053dfd3519f4sm2439193edb.22.2023.10.13.05.56.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201800; x=1697806600; 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=aJG9hKwu+wpRvVwz3i5zPTfZu546zhwzoj0NQVluILM=; b=kgzeKRoZ1mvc42qI+U/KAu1/G1eNQwordEIAeW3ChGXYDGAZXGo0akFh6Iu4HTHz8g XYYHtdT4HHhaOYrmRjIMVSNWvT2717cJqi5iyKONvym2pHPkaqUly7YquVZN04Mfpklh LB+JgxzZYviZ/OyouOUcTKRbXowZXXqhQA3tl390p897OTbBhmIY08KBbF8DM5CPEwJT ZXeQhvRcyA/cXE1BzUfm1vVkbB2IvRLHhb2mWQ3yogvQbefeZXFfCkO2QXfFDBAAPB2f MOheE6A07XtDcoPEKLww7i2mxQWpGLEh/dMZ0ZnHsUVGR0UV1xXDcdcDq+AipJDtk8Dy ZD7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201800; x=1697806600; 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=aJG9hKwu+wpRvVwz3i5zPTfZu546zhwzoj0NQVluILM=; b=T2PwJowxjYvmwlUpoaoPn4OEg/BYhKn85bp6g0Rp0K8SkdLaslOX8q7WRP7bL6XWbQ Kn/naV4/rkmod3u4MWw4u9N8M+0GtcBjobVlPwBj55dTeENLqXQJbsz4vKVyLkXDI3qN 37zxsndVhDDiPmH0DsTSG0Hs0ImWCDi5P7pD6oGaEN/n/0njGpYZKdT4602e8ElcdyQU lI2tdEqrc1pEQkSoqKl8JLjGRyrU/BeoGVGiYbH/Gpx1B1ryxIFZ8D69yt3Qq6UgvHT4 CVUGMmSusL8AYN2YQQKOLhFsEZMy80/de81oAA1GZAUvcjvokmbCj/ZMZQ4HTZRtRA6p iXxw== X-Gm-Message-State: AOJu0YwtwDTHtLm2x/57cOSKqz4t/h6ABT2ratcyk9p+hF0VxOF97yYQ 9GTQNBYv4OpjFPm0w6UMiSz5rrho8QNSLsEEK48= X-Google-Smtp-Source: AGHT+IHXm04fa/4ltJrEAslN/c6jb1nfaurjSJ3rrHbVJnPBC0yrzDb7waDIuC3pzUFfrxsjSQglhw== X-Received: by 2002:a05:6402:150d:b0:523:bfec:4915 with SMTP id f13-20020a056402150d00b00523bfec4915mr25184247edw.0.1697201800089; Fri, 13 Oct 2023 05:56:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/7] hw/ppc/spapr: Restrict PPCTimebase structure declaration to sPAPR Date: Fri, 13 Oct 2023 14:56:24 +0200 Message-ID: <20231013125630.95116-2-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201830590100001 The PPCTimebase structure is only used by the sPAPR machine. Move its declaration to "hw/ppc/spapr.h". Move vmstate_ppc_timebase and the VMSTATE_PPC_TIMEBASE_V() macro to hw/ppc/spapr.c, along with the timebase_foo() migration helpers. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- include/hw/ppc/spapr.h | 6 +++ target/ppc/cpu-qom.h | 22 -------- hw/ppc/ppc.c | 107 ------------------------------------- hw/ppc/spapr.c | 116 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 129 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index e91791a1a9..3cf9978cba 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -163,6 +163,12 @@ struct SpaprMachineClass { SpaprIrq *irq; }; =20 +typedef struct PPCTimebase { + uint64_t guest_timebase; + int64_t time_of_the_day_ns; + bool runstate_paused; +} PPCTimebase; + #define WDT_MAX_WATCHDOGS 4 /* Maximum number of watchdog devic= es */ =20 #define TYPE_SPAPR_WDT "spapr-wdt" diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index be33786bd8..b5deef5ca5 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -197,26 +197,4 @@ struct PowerPCCPUClass { int (*check_pow)(CPUPPCState *env); }; =20 -#ifndef CONFIG_USER_ONLY -typedef struct PPCTimebase { - uint64_t guest_timebase; - int64_t time_of_the_day_ns; - bool runstate_paused; -} PPCTimebase; - -extern const VMStateDescription vmstate_ppc_timebase; - -#define VMSTATE_PPC_TIMEBASE_V(_field, _state, _version) { \ - .name =3D (stringify(_field)), \ - .version_id =3D (_version), \ - .size =3D sizeof(PPCTimebase), \ - .vmsd =3D &vmstate_ppc_timebase, \ - .flags =3D VMS_STRUCT, \ - .offset =3D vmstate_offset_value(_state, _field, PPCTimebase), \ -} - -void cpu_ppc_clock_vm_state_change(void *opaque, bool running, - RunState state); -#endif - #endif diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index be167710a3..340cd6192f 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -32,7 +32,6 @@ #include "qemu/main-loop.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" -#include "sysemu/replay.h" #include "sysemu/runstate.h" #include "kvm_ppc.h" #include "migration/vmstate.h" @@ -967,112 +966,6 @@ void cpu_ppc_store_purr(CPUPPCState *env, uint64_t va= lue) _cpu_ppc_store_purr(env, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), value); } =20 -static void timebase_save(PPCTimebase *tb) -{ - uint64_t ticks =3D cpu_get_host_ticks(); - PowerPCCPU *first_ppc_cpu =3D POWERPC_CPU(first_cpu); - - if (!first_ppc_cpu->env.tb_env) { - error_report("No timebase object"); - return; - } - - if (replay_mode =3D=3D REPLAY_MODE_NONE) { - /* not used anymore, we keep it for compatibility */ - tb->time_of_the_day_ns =3D qemu_clock_get_ns(QEMU_CLOCK_HOST); - } else { - /* simpler for record-replay to avoid this event, compat not neede= d */ - tb->time_of_the_day_ns =3D 0; - } - - /* - * tb_offset is only expected to be changed by QEMU so - * there is no need to update it from KVM here - */ - tb->guest_timebase =3D ticks + first_ppc_cpu->env.tb_env->tb_offset; - - tb->runstate_paused =3D - runstate_check(RUN_STATE_PAUSED) || runstate_check(RUN_STATE_SAVE_= VM); -} - -static void timebase_load(PPCTimebase *tb) -{ - CPUState *cpu; - PowerPCCPU *first_ppc_cpu =3D POWERPC_CPU(first_cpu); - int64_t tb_off_adj, tb_off; - unsigned long freq; - - if (!first_ppc_cpu->env.tb_env) { - error_report("No timebase object"); - return; - } - - freq =3D first_ppc_cpu->env.tb_env->tb_freq; - - tb_off_adj =3D tb->guest_timebase - cpu_get_host_ticks(); - - tb_off =3D first_ppc_cpu->env.tb_env->tb_offset; - trace_ppc_tb_adjust(tb_off, tb_off_adj, tb_off_adj - tb_off, - (tb_off_adj - tb_off) / freq); - - /* Set new offset to all CPUs */ - CPU_FOREACH(cpu) { - PowerPCCPU *pcpu =3D POWERPC_CPU(cpu); - pcpu->env.tb_env->tb_offset =3D tb_off_adj; - kvmppc_set_reg_tb_offset(pcpu, pcpu->env.tb_env->tb_offset); - } -} - -void cpu_ppc_clock_vm_state_change(void *opaque, bool running, - RunState state) -{ - PPCTimebase *tb =3D opaque; - - if (running) { - timebase_load(tb); - } else { - timebase_save(tb); - } -} - -/* - * When migrating a running guest, read the clock just - * before migration, so that the guest clock counts - * during the events between: - * - * * vm_stop() - * * - * * pre_save() - * - * This reduces clock difference on migration from 5s - * to 0.1s (when max_downtime =3D=3D 5s), because sending the - * final pages of memory (which happens between vm_stop() - * and pre_save()) takes max_downtime. - */ -static int timebase_pre_save(void *opaque) -{ - PPCTimebase *tb =3D opaque; - - /* guest_timebase won't be overridden in case of paused guest or savev= m */ - if (!tb->runstate_paused) { - timebase_save(tb); - } - - return 0; -} - -const VMStateDescription vmstate_ppc_timebase =3D { - .name =3D "timebase", - .version_id =3D 1, - .minimum_version_id =3D 1, - .pre_save =3D timebase_pre_save, - .fields =3D (VMStateField []) { - VMSTATE_UINT64(guest_timebase, PPCTimebase), - VMSTATE_INT64(time_of_the_day_ns, PPCTimebase), - VMSTATE_END_OF_LIST() - }, -}; - /* Set up (once) timebase frequency (in Hz) */ void cpu_ppc_tb_init(CPUPPCState *env, uint32_t freq) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index cb840676d3..fe8b425ffd 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -37,6 +37,7 @@ #include "sysemu/numa.h" #include "sysemu/qtest.h" #include "sysemu/reset.h" +#include "sysemu/replay.h" #include "sysemu/runstate.h" #include "qemu/log.h" #include "hw/fw-path-provider.h" @@ -1809,6 +1810,100 @@ static bool spapr_vga_init(PCIBus *pci_bus, Error *= *errp) } } =20 +static void timebase_save(PPCTimebase *tb) +{ + uint64_t ticks =3D cpu_get_host_ticks(); + PowerPCCPU *first_ppc_cpu =3D POWERPC_CPU(first_cpu); + + if (!first_ppc_cpu->env.tb_env) { + error_report("No timebase object"); + return; + } + + if (replay_mode =3D=3D REPLAY_MODE_NONE) { + /* not used anymore, we keep it for compatibility */ + tb->time_of_the_day_ns =3D qemu_clock_get_ns(QEMU_CLOCK_HOST); + } else { + /* simpler for record-replay to avoid this event, compat not neede= d */ + tb->time_of_the_day_ns =3D 0; + } + + /* + * tb_offset is only expected to be changed by QEMU so + * there is no need to update it from KVM here + */ + tb->guest_timebase =3D ticks + first_ppc_cpu->env.tb_env->tb_offset; + + tb->runstate_paused =3D + runstate_check(RUN_STATE_PAUSED) || runstate_check(RUN_STATE_SAVE_= VM); +} + +static void timebase_load(PPCTimebase *tb) +{ + CPUState *cpu; + PowerPCCPU *first_ppc_cpu =3D POWERPC_CPU(first_cpu); + int64_t tb_off_adj, tb_off; + unsigned long freq; + + if (!first_ppc_cpu->env.tb_env) { + error_report("No timebase object"); + return; + } + + freq =3D first_ppc_cpu->env.tb_env->tb_freq; + + tb_off_adj =3D tb->guest_timebase - cpu_get_host_ticks(); + + tb_off =3D first_ppc_cpu->env.tb_env->tb_offset; + trace_ppc_tb_adjust(tb_off, tb_off_adj, tb_off_adj - tb_off, + (tb_off_adj - tb_off) / freq); + + /* Set new offset to all CPUs */ + CPU_FOREACH(cpu) { + PowerPCCPU *pcpu =3D POWERPC_CPU(cpu); + pcpu->env.tb_env->tb_offset =3D tb_off_adj; + kvmppc_set_reg_tb_offset(pcpu, pcpu->env.tb_env->tb_offset); + } +} + +static void cpu_ppc_clock_vm_state_change(void *opaque, bool running, + RunState state) +{ + PPCTimebase *tb =3D opaque; + + if (running) { + timebase_load(tb); + } else { + timebase_save(tb); + } +} + +/* + * When migrating a running guest, read the clock just + * before migration, so that the guest clock counts + * during the events between: + * + * * vm_stop() + * * + * * pre_save() + * + * This reduces clock difference on migration from 5s + * to 0.1s (when max_downtime =3D=3D 5s), because sending the + * final pages of memory (which happens between vm_stop() + * and pre_save()) takes max_downtime. + */ +static int timebase_pre_save(void *opaque) +{ + PPCTimebase *tb =3D opaque; + + /* guest_timebase won't be overridden in case of paused guest or savev= m */ + if (!tb->runstate_paused) { + timebase_save(tb); + } + + return 0; +} + static int spapr_pre_load(void *opaque) { int rc; @@ -2081,6 +2176,27 @@ static const VMStateDescription vmstate_spapr_fwnmi = =3D { }, }; =20 +static const VMStateDescription vmstate_spapr_timebase =3D { + .name =3D "timebase", + .version_id =3D 1, + .minimum_version_id =3D 1, + .pre_save =3D timebase_pre_save, + .fields =3D (VMStateField []) { + VMSTATE_UINT64(guest_timebase, PPCTimebase), + VMSTATE_INT64(time_of_the_day_ns, PPCTimebase), + VMSTATE_END_OF_LIST() + }, +}; + +#define VMSTATE_PPC_TIMEBASE_V(_field, _state, _version) { \ + .name =3D (stringify(_field)), \ + .version_id =3D (_version), \ + .size =3D sizeof(PPCTimebase), \ + .vmsd =3D &vmstate_spapr_timebase, \ + .flags =3D VMS_STRUCT, \ + .offset =3D vmstate_offset_value(_state, _field, PPCTimebase), \ +} + static const VMStateDescription vmstate_spapr =3D { .name =3D "spapr", .version_id =3D 3, --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201885; cv=none; d=zohomail.com; s=zohoarc; b=U/E/TSF8820N1ny0DFYlxwkaQKfHnYa2Oj0wE6vBVj0917Kn71TbuZWGNDoF+zjQtjcie5dq+dYg63UDqPFw2p3jC0Z8y1IcG4I/LL1yyga4Y9QI7/L+r3CDw7s9PveIoUddmhy3XZnmBeCHQySHvcryJB2myJ0zkcI2m4t/HwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201885; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UKmgf4fJPI4uE5NPSl+oCRC22RI7AomCq3WOdsU22V0=; b=U6doNUMnnJdWKsdZMPozuCfqqxM/JCPCEpvU8FGglYFsRRcyVxuWudDOnmNyooS5Enx6/Wu2RuCoApPDnRn8pJ9qHunYSIh6TM2CRPg+XFnKR6aARDmai4elfYl5rl/KQFJJq8qLSwlA78nReZM5UZD/rZpFoysgkD0yS9D7ESk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201885384905.2998697829544; Fri, 13 Oct 2023 05:58:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHil-0003Md-Pl; Fri, 13 Oct 2023 08:56:52 -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 1qrHij-0003B4-JT for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:50 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHii-0002ZI-5A for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:49 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9b96c3b4be4so314559466b.1 for ; Fri, 13 Oct 2023 05:56:47 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id k26-20020a17090627da00b0099b7276235esm12540897ejc.93.2023.10.13.05.56.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201806; x=1697806606; 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=UKmgf4fJPI4uE5NPSl+oCRC22RI7AomCq3WOdsU22V0=; b=tPRA2lcGPUZciHEhAjuia5nsna6na5q+CaKt8HajFiZvNR8UQIbjVCUPF5w5U5fEFO 8hMJMVxiYUm4qyLI8pCmhH9iGWBKDbpbSMn8fLFt/ag9ibjVbtQIAuSEqyBIsfkJZk0f OQpsa8u9yUx3lxbb1hVS2bFUJTaMs/rmMs2/VKsE091y7ep8QYQfgMhIpAfruAdLkIa4 xWoz2Af0XaxyBYIecUWp8VmZIJ9yfCu6jsX395/k/NL1KKefTgUcdCi+0GUbNhEvYLs7 2JR3K1DIr2e+YfJ7gn8pyrMKFthjPZXarWYuz7Tnp82ny26GJmypnkBwMPyvc559XLV6 /Pmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201806; x=1697806606; 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=UKmgf4fJPI4uE5NPSl+oCRC22RI7AomCq3WOdsU22V0=; b=cWiob/+IIsJja8cQq8FPNgU15N+s2wwo9/YuGe4rQHstFwjDdvCouTdfe3FJT/ns4G aNZS9K14jF2jU5wxmLTk6+TqjZj3imvzD/9rIRm0rD1vL4uOM90GSZ3A7QBrR49yw+15 dqqNibkAQByM3TGHUNIda71AIYUHa/tcI35ESYd2DkRedH1mSUa03h/knGuo1atRLuQN pQrsILuvt+gxVztIed4zXy/tyIR4ce9fHG40Zu5544QK+S1fEMw+kYGZbIUnIR5qNqEa YeepKA6tatG/mYltIH0cJVnqUOmjMfXB+RM35SN3GGFqizxDVXYWaXJ5dfZLBm9gNq/t YHCg== X-Gm-Message-State: AOJu0YxpwelxS00QNVaVmnCo8BtYziahnhTViCXpIWe6BJIKeHNl/A/P SDixiLZ/0jPehoqyGbhdLu0lO8hiuUTL3M7A6KQ= X-Google-Smtp-Source: AGHT+IHu6vZO7t1EQSwY9D1tpCT6rQ2X31onWjTcnxEjf3O4xa80SnSgcCQje7HxKIcgulFOGvgdyA== X-Received: by 2002:a17:907:1dd8:b0:9ba:3434:482b with SMTP id og24-20020a1709071dd800b009ba3434482bmr9424526ejc.26.1697201806373; Fri, 13 Oct 2023 05:56:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/7] target/ppc: Define powerpc_pm_insn_t in 'internal.h' Date: Fri, 13 Oct 2023 14:56:25 +0200 Message-ID: <20231013125630.95116-3-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201886473100003 PM instructions are only used by TCG helpers. No need to expose to other hardware. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- target/ppc/cpu-qom.h | 10 ---------- target/ppc/internal.h | 9 +++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index b5deef5ca5..b86fd46d25 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -115,16 +115,6 @@ enum powerpc_excp_t { POWERPC_EXCP_POWER10, }; =20 -/*************************************************************************= ****/ -/* PM instructions */ -typedef enum { - PPC_PM_DOZE, - PPC_PM_NAP, - PPC_PM_SLEEP, - PPC_PM_RVWINKLE, - PPC_PM_STOP, -} powerpc_pm_insn_t; - /*************************************************************************= ****/ /* Input pins model = */ typedef enum powerpc_input_t powerpc_input_t; diff --git a/target/ppc/internal.h b/target/ppc/internal.h index c881c67a8b..5b20ecbd33 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -20,6 +20,15 @@ =20 #include "hw/registerfields.h" =20 +/* PM instructions */ +typedef enum { + PPC_PM_DOZE, + PPC_PM_NAP, + PPC_PM_SLEEP, + PPC_PM_RVWINKLE, + PPC_PM_STOP, +} powerpc_pm_insn_t; + #define FUNC_MASK(name, ret_type, size, max_val) \ static inline ret_type name(uint##size##_t start, \ uint##size##_t end) \ --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201858; cv=none; d=zohomail.com; s=zohoarc; b=nUvoFLDmSmQdbTp6uiG/NpOnULsXXuRhiwuyirJYtvRRB/Etu+3aeQ2+TGVXh0hgx2xGaAYTn1PUrMLKUohcn2Z8C0yRIT+0FQRnLkc8Q/mOOf5PwBLJp6G3NLoL5yBYsy/i3rNcsYMSPLmrWAeEP80Mtk7tS+XW8H2BnWn6uo8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201858; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wIq+NNnPEjjdwEwMuihsIXkhuw1xh2LZ59h0H7TW924=; b=CZi2Iqu24fvlfuBH2TXJlLAKu80k0yQuFg3NCZgPRHrx2he/OXfehO/aG5PafWPnekJXSHudnOoPtJ89dk2DYivRK7J+5NQ2NwSM6gtR0FcvR8F4sH9/p2nuSAIg01wM0+rFTNyTNkgqHsSrP/KZRECpWCe3tf4TCHruN4V+t2E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201858677966.2444456066793; Fri, 13 Oct 2023 05:57:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHiv-0003sS-UC; Fri, 13 Oct 2023 08:57:01 -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 1qrHis-0003mM-2Y for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:58 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHip-0002aD-1B for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:56:57 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-53dd752685fso3687360a12.3 for ; Fri, 13 Oct 2023 05:56:54 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id g22-20020a50d0d6000000b0053e3d8f1d9fsm922774edf.67.2023.10.13.05.56.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201813; x=1697806613; 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=wIq+NNnPEjjdwEwMuihsIXkhuw1xh2LZ59h0H7TW924=; b=qpHZEqDD8+sy8g+WKUBGBSCaGmY+eN9DpjF7YxSX89z6mp5VEYSiPn7YqY1HbxFTuz tao8UQ6IkaMk8q6Ubl8ddnoM/f04ivYKVHAFOIzckXG1R+fYmSckvWeOF4F7fWZswtYp r402UtyXYQ+M8wBkF/WByKgBGxJQWPSVIidTqoa6LRl3s7fYD3IwiX/LcmHmh2QKWjyc sVp0BNYD2cqXfL3gvzZy42EH31XtaZyLc/DqFhEyijvVTpOAgSdOxxpYS2PiO9QkVErr 4SH3DoDsLK49d/ybKnFwv1mMncZTnbFKbvI58luA4zui0qOonh9ZyO+8LGjaUzREy0Hb a6Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201813; x=1697806613; 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=wIq+NNnPEjjdwEwMuihsIXkhuw1xh2LZ59h0H7TW924=; b=R/yXnn3ZRHlR/1qy/vT/QgP2p2lUJFCFG/Pai8nzft46udTsk+1rZ2NGzCoJVDdk3V WmqnuK5q0wd0feUT3MSC2l/JD+qVL1daZSF/vf5QjVka4/SANjfqo1YdgxQoE83diDFY ZxniuYgMU3Q5WZf3nW7mFt33iFN/UBVlqJ116Pi7ms8qpiTSgD0shhe6i8Xrqm1qryra bkCz1QN5gxV/QkfqXfbcFi4rVefxUGSFokQ+RT3R0iL06y/pOYFFC4hD1Xs7lM4Soi/V 2MclP7IX6IWAWwqn3xNsxr4249yekse556g+dykMM4/iONQ8RPgcA9Y5+ZsZoku7Al+R kXAw== X-Gm-Message-State: AOJu0YzncaL5yH7lQfpqwNBZWg0oM6d4JesERDKeBZxXGqpKcQSwvY61 ISQgGx9nr4JP2R73LD66Oe0LauKGvc//Sf8QJd0= X-Google-Smtp-Source: AGHT+IH5iXFqUHSsvfxtCi4I7ixU8SzyK4oGPs3H8CYvgUrGGId6iTVeAIGkjOt/iIxGlJfTRM/Z9w== X-Received: by 2002:a05:6402:518a:b0:53e:4a78:e281 with SMTP id q10-20020a056402518a00b0053e4a78e281mr1134348edd.27.1697201812921; Fri, 13 Oct 2023 05:56:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/7] target/ppc: Move ppc_cpu_class_by_name() declaration to 'cpu.h' Date: Fri, 13 Oct 2023 14:56:26 +0200 Message-ID: <20231013125630.95116-4-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201860563100007 ppc_cpu_class_by_name() is only called in target/ppc/, no need to expose outside (in particular to hw/). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- target/ppc/cpu-qom.h | 2 -- target/ppc/cpu.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index b86fd46d25..3dc92a852e 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -37,8 +37,6 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWE= RPC_CPU) =20 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") =20 -ObjectClass *ppc_cpu_class_by_name(const char *name); - typedef struct CPUArchState CPUPPCState; typedef struct ppc_tb_t ppc_tb_t; typedef struct ppc_dcr_t ppc_dcr_t; diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 30392ebeee..8bb66fbea4 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1342,6 +1342,7 @@ struct ArchCPU { }; =20 =20 +ObjectClass *ppc_cpu_class_by_name(const char *name); PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr); PowerPCCPUClass *ppc_cpu_class_by_pvr_mask(uint32_t pvr); PowerPCCPUClass *ppc_cpu_get_family_class(PowerPCCPUClass *pcc); --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201842; cv=none; d=zohomail.com; s=zohoarc; b=WbrXwSqR297bdkwL4pAePL/Zs8HWi3wWDb8Ev9f6ud2JC+vK8TxA+E8/FWdPHXZe4bMKqBdMgplZ/J/2VrMheV55rTU4DKVsXLUaDstyYfd3NzXNheIA53RwhXi0xsYknwLcmHablixKbcSdf7NB+D/dbvp5P/PJCVXOhcddeWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201842; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZMHL7SlFgEKR/BV5pB4UE16riBf0bBquF0WSFLpL7CU=; b=EXs0nfmMV/9uHHrrzOgGXx/o5x54xf0fPfygzAbTW9nTjTOpRF+EeKnIhwXKy0J9vpmArsaZIRT6fGTz89LiVjJZpsLw3ehskATTR7dGMzPWtesb7RwjfJGNnGFH9ioD4DD58pRN3NMy2AlRUGsypUMnU/jEyVFZisNVsHt3eTA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201842869985.909802555192; Fri, 13 Oct 2023 05:57:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHj1-000476-IX; Fri, 13 Oct 2023 08:57:07 -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 1qrHiy-0003tC-RL for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:05 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHiu-0002au-O5 for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:04 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-53df747cfe5so3851686a12.2 for ; Fri, 13 Oct 2023 05:57:00 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id h14-20020aa7de0e000000b00532eba07773sm11554780edv.25.2023.10.13.05.56.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201819; x=1697806619; 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=ZMHL7SlFgEKR/BV5pB4UE16riBf0bBquF0WSFLpL7CU=; b=lsGUCWnBQzgeVzvpEM80AK15HsCBc86I9+U//ZAYfiSPd/FkFfgGLN4O6n9p1qAHFo qcr06dFVvSxZ31O0J/VTQZ0nd+w7m6OeSfQv4M6CwgKhd3fM2KxoZWxBASGpyjGVxLF6 7u7As1dkIO9+p8VFclBUBYRyfItEv1X/ETLDnH57w6k6dORL9mOvzzL5ci3Xuejd4jQ9 K2yDnMVYsbzdbuy4hfyFyQFKYhRYjBQ3jwx26bzaMUBh9zkCKFVKTSpRZRR8SxQ93MoK 3YDZ5+SHjggW6FgmpdJSUxrBwfDd4+M+Bzxn6WLR74hXHPJH5v4A4RbckfhmEl2JD9Ua pUJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201819; x=1697806619; 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=ZMHL7SlFgEKR/BV5pB4UE16riBf0bBquF0WSFLpL7CU=; b=rkOMH6cb21dQPMSjJeBz2tRie1KbN9QtayKYiFsdT4rXdK5L3hVXX6S28nkTIUCsen +4lzV0dUoCzUb/IAj/JOY6D0P2gyH8/s4AFBjpI0KQvUtBp0G6K+f0MKbKDQEbs30FPI 6+MPPNII0Hes+BUJI/ZAXJKths3CD2MHs+sF3EwXKb7eF7FXeoe0V7T8caB3TQd+oldI 6jD2cnU4dUH0kisnuo0YbpDJQ4NYbvhiJ6SXVMlOwGOs/LyiIgdnqcIdT3YGdkx5V5cY xLJUMx8IE3mQqZfAStqxAJ7Wsp8TD5p4S2mptTqeSQ9YcOwOrDU5L2MxXwf2Zw2crjZ8 C/5w== X-Gm-Message-State: AOJu0YwXXr6YFGlHAy98zhbKLwTsdZSWGgR/rjTq18BUgYhDENaS1Zg9 uZQAojje0dClsldWVQ0sk1rkNYkU9oyjmxfP6A8= X-Google-Smtp-Source: AGHT+IElywHzfHGdFo9aLzAq9N5cOQvpIK0GcFJQFcG/NJKElObWy3FeLghGIEAGIeA4RPkjtyUmqA== X-Received: by 2002:a05:6402:1777:b0:53d:bf95:5402 with SMTP id da23-20020a056402177700b0053dbf955402mr5089943edb.42.1697201819212; Fri, 13 Oct 2023 05:56:59 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH 4/7] target/ppc: Move PowerPCCPUClass definition to 'cpu.h' Date: Fri, 13 Oct 2023 14:56:27 +0200 Message-ID: <20231013125630.95116-5-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201844340100003 The OBJECT_DECLARE_CPU_TYPE() macro forward-declares the PowerPCCPUClass type. This forward declaration is sufficient for code in hw/ to use the QOM definitions. No need to expose the structure definition. Keep it local to target/ppc/ by moving it to target/ppc/cpu.h. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- include/hw/ppc/ppc.h | 2 +- target/ppc/cpu-qom.h | 56 -------------------------------------------- target/ppc/cpu.h | 51 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 57 deletions(-) diff --git a/include/hw/ppc/ppc.h b/include/hw/ppc/ppc.h index 17a8dfc107..d5d119ea7f 100644 --- a/include/hw/ppc/ppc.h +++ b/include/hw/ppc/ppc.h @@ -1,7 +1,7 @@ #ifndef HW_PPC_H #define HW_PPC_H =20 -#include "target/ppc/cpu-qom.h" +#include "target/ppc/cpu.h" =20 void ppc_set_irq(PowerPCCPU *cpu, int n_IRQ, int level); PowerPCCPU *ppc_get_vcpu_by_pir(int pir); diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 3dc92a852e..41e97a0ea1 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -21,7 +21,6 @@ #define QEMU_PPC_CPU_QOM_H =20 #include "hw/core/cpu.h" -#include "qom/object.h" =20 #ifdef TARGET_PPC64 #define TYPE_POWERPC_CPU "powerpc64-cpu" @@ -37,10 +36,6 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POW= ERPC_CPU) =20 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") =20 -typedef struct CPUArchState CPUPPCState; -typedef struct ppc_tb_t ppc_tb_t; -typedef struct ppc_dcr_t ppc_dcr_t; - /*************************************************************************= ****/ /* MMU model = */ typedef enum powerpc_mmu_t powerpc_mmu_t; @@ -134,55 +129,4 @@ enum powerpc_input_t { PPC_FLAGS_INPUT_RCPU, }; =20 -typedef struct PPCHash64Options PPCHash64Options; - -/** - * PowerPCCPUClass: - * @parent_realize: The parent class' realize handler. - * @parent_phases: The parent class' reset phase handlers. - * - * A PowerPC CPU model. - */ -struct PowerPCCPUClass { - /*< private >*/ - CPUClass parent_class; - /*< public >*/ - - DeviceRealize parent_realize; - DeviceUnrealize parent_unrealize; - ResettablePhases parent_phases; - void (*parent_parse_features)(const char *type, char *str, Error **err= p); - - uint32_t pvr; - /* - * If @best is false, match if pcc is in the family of pvr - * Else match only if pcc is the best match for pvr in this family. - */ - bool (*pvr_match)(struct PowerPCCPUClass *pcc, uint32_t pvr, bool best= ); - uint64_t pcr_mask; /* Available bits in PCR register */ - uint64_t pcr_supported; /* Bits for supported PowerISA versions */ - uint32_t svr; - uint64_t insns_flags; - uint64_t insns_flags2; - uint64_t msr_mask; - uint64_t lpcr_mask; /* Available bits in the LPCR */ - uint64_t lpcr_pm; /* Power-saving mode Exit Cause Enable bit= s */ - powerpc_mmu_t mmu_model; - powerpc_excp_t excp_model; - powerpc_input_t bus_model; - uint32_t flags; - int bfd_mach; - uint32_t l1_dcache_size, l1_icache_size; -#ifndef CONFIG_USER_ONLY - unsigned int gdb_num_sprs; - const char *gdb_spr_xml; -#endif - const PPCHash64Options *hash64_opts; - struct ppc_radix_page_info *radix_page_info; - uint32_t lrg_decr_bits; - int n_host_threads; - void (*init_proc)(CPUPPCState *env); - int (*check_pow)(CPUPPCState *env); -}; - #endif diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 8bb66fbea4..d521ee97bb 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -198,9 +198,14 @@ typedef struct opc_handler_t opc_handler_t; /*************************************************************************= ****/ /* Types used to describe some PowerPC registers etc. */ typedef struct DisasContext DisasContext; +typedef struct ppc_dcr_t ppc_dcr_t; typedef struct ppc_spr_t ppc_spr_t; +typedef struct ppc_tb_t ppc_tb_t; typedef union ppc_tlb_t ppc_tlb_t; typedef struct ppc_hash_pte64 ppc_hash_pte64_t; +typedef struct PPCHash64Options PPCHash64Options; + +typedef struct CPUArchState CPUPPCState; =20 /* SPR access micro-ops generations callbacks */ struct ppc_spr_t { @@ -1341,6 +1346,52 @@ struct ArchCPU { int32_t mig_slb_nr; }; =20 +/** + * PowerPCCPUClass: + * @parent_realize: The parent class' realize handler. + * @parent_phases: The parent class' reset phase handlers. + * + * A PowerPC CPU model. + */ +struct PowerPCCPUClass { + CPUClass parent_class; + + DeviceRealize parent_realize; + DeviceUnrealize parent_unrealize; + ResettablePhases parent_phases; + void (*parent_parse_features)(const char *type, char *str, Error **err= p); + + uint32_t pvr; + /* + * If @best is false, match if pcc is in the family of pvr + * Else match only if pcc is the best match for pvr in this family. + */ + bool (*pvr_match)(struct PowerPCCPUClass *pcc, uint32_t pvr, bool best= ); + uint64_t pcr_mask; /* Available bits in PCR register */ + uint64_t pcr_supported; /* Bits for supported PowerISA versions */ + uint32_t svr; + uint64_t insns_flags; + uint64_t insns_flags2; + uint64_t msr_mask; + uint64_t lpcr_mask; /* Available bits in the LPCR */ + uint64_t lpcr_pm; /* Power-saving mode Exit Cause Enable bit= s */ + powerpc_mmu_t mmu_model; + powerpc_excp_t excp_model; + powerpc_input_t bus_model; + uint32_t flags; + int bfd_mach; + uint32_t l1_dcache_size, l1_icache_size; +#ifndef CONFIG_USER_ONLY + unsigned int gdb_num_sprs; + const char *gdb_spr_xml; +#endif + const PPCHash64Options *hash64_opts; + struct ppc_radix_page_info *radix_page_info; + uint32_t lrg_decr_bits; + int n_host_threads; + void (*init_proc)(CPUPPCState *env); + int (*check_pow)(CPUPPCState *env); +}; =20 ObjectClass *ppc_cpu_class_by_name(const char *name); PowerPCCPUClass *ppc_cpu_class_by_pvr(uint32_t pvr); --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201892; cv=none; d=zohomail.com; s=zohoarc; b=Gg+rd+fIXqQQBxrHIDrVM9nZ0zeNXMdyYXIYve6/aJ1wUs5GPwmr5SH0UGQpjCPEWP8lPi8ka2feWKm4bLluydGrG+LcoWt87jr5S0aJYSDEikeSWHvB/3tvfqipAayiJwQDX2TqzL3ITFblO54+wFIsK+H1GsHVbIs/6hAA+Zw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201892; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EnGehjCRe7N5NlcitFMO+yrUN4cOF8jWvzxKACAW5h8=; b=CMM+7PpHYWuVge6GnF93alQMKkTBoPX3gLK57eKWk+UIX8aFuJDapUOj70KC6rUBtbtJEvodQ/jnJqMi7EKJ5DVXGMuzSpwEW+TjN4IRVLrDYL+nVi7VNM0n4IUxy3rTs66SWB0ilRXDhJCL0LX5jbs5s9T76exF1kmYeL5hZzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201892811179.10142747728378; Fri, 13 Oct 2023 05:58:12 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IEp5Gsm7LoTVb1+v7PsmVpG/R9w+deQLvUMhmRaVoO6/HCVB6GqSdaIq00WbVwYWSuSK1NH6Q== 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) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201894654100007 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=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- 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; } =20 -/*************************************************************************= ****/ -/* Exception model = */ -typedef enum powerpc_excp_t powerpc_excp_t; -enum powerpc_excp_t { - POWERPC_EXCP_UNKNOWN =3D 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 =3D 0x40, }; =20 +/* Exception model = */ +typedef enum powerpc_excp_t { + POWERPC_EXCP_UNKNOWN =3D 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) =20 /*************************************************************************= ****/ --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201862; cv=none; d=zohomail.com; s=zohoarc; b=TjPSiukn/6GIJ4otIeEFwT5ktK1wVynHUK1rn3fp2ovQJWUQFlhZYyn+gZUF+HrvxatJoFEmEaXxe16Q3IIiQcZylZNGIKQZLOr0MWKNXmYmto9s5xDlfb/k3JD/C2lLeFks98B6XZP8vH25sZoXqDsYLNlDpE1j38TqhkZm3d8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201862; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8yYXPRc/xEWiPRWLkGZcxqQvValoM9UBry2nkc5FvzM=; b=IIdnl1oC1F3OzmSuBuNpJUf+2MIa3zVHbtF+h+PbW4RW62PRDHSoQbEY+2ygOxJ7eVrQ71cmstf4YkjkMNzcxjGhRiPUBvRUJSJr1c7nqX0Z7f/Tl5jk6n2kVaq8tlb/wSyWknkOC3XhuvDpjipT2g7np5S04jLTAbSQu29WgUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697201862384714.9643366153294; Fri, 13 Oct 2023 05:57:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHjB-0004Nr-D7; Fri, 13 Oct 2023 08:57:17 -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 1qrHj9-0004Mh-7p for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:15 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrHj7-0002ee-CZ for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:14 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-53df747cfe5so3852066a12.2 for ; Fri, 13 Oct 2023 05:57:12 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id f5-20020a170906560500b009b8dbdd5203sm12337668ejq.107.2023.10.13.05.57.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201831; x=1697806631; 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=8yYXPRc/xEWiPRWLkGZcxqQvValoM9UBry2nkc5FvzM=; b=SJiBlll7cxNYFVHVlldeMQRzkpD6odpAXKkzpfGBYqfIn9lln1O0b9a31e6ZVEl/RI jC6CFh/j0YlCHqwts7kTVcoCvQwzkyGSQ3BPL3kn/8LgoLGIkpjsN/KZ+kG72s2R3W0s BW1K5JCRUe2FyUhZUn/W8qwb9kPBN/tRx7gsba61FZc+cFfKv9Zh5pw1NQkGoCbTZKCE cxK9ef2GU7epKs23aWxb0zny6zUNn0aKs50ATfBB/dtaoRO2oBOunYy0O8WvSxvlYwiu KWIDkeKjNN+WAgwLWuPPoe192sgiLweJj/vwNqf8F16BBlBOgjUzCTZxXJ8mdGWNZEoD bW8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201831; x=1697806631; 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=8yYXPRc/xEWiPRWLkGZcxqQvValoM9UBry2nkc5FvzM=; b=O/7JdOz0SOHjbluD/nP68UIfnz4PS8+I7Px5Jh7GIDDYxVb/iY18tnLoYOieOSV27/ sq/o0RL8iyw0+lzziiTg9OR2LWEPqBYfB74Y2Y/B9fJKjaO+r5VzX+R2GeR1W3aBpGO8 Zjim56iT+v3lBdR9FYjgPguNotDlr3kCt4XXt2Q7y/pM/bcAA940a2Q1UVVect9fqE+f xVBxbtfkOcfkSkRaWr4V04CPNn2uNlgsI/OZnmlkeYjHn5yE2l8gUXKcEvqYIGDHorC0 hqnJ6f4gXtGZUtLY6XQreb5zqSWclFckP/tdAI6xE6qrsbTCbPWV8YGQaDPHFlbLO1nA 2g2A== X-Gm-Message-State: AOJu0YxFGYtKO9XRJCc6vMxktf5xxrjAOsHnotiDZGiHOi+rR3KDJLmF kUWuvXDdVM8xup3vUyPBonGuV+khVWo77g46xHc= X-Google-Smtp-Source: AGHT+IECYqAE9bzPbfKcjSRvaNnh9mg6UhX2AHxgiZxp9tS+MBe1lvhsz30q6+N09Wu+lCH7F/SHUA== X-Received: by 2002:a17:907:7711:b0:9ae:82b4:e309 with SMTP id kw17-20020a170907771100b009ae82b4e309mr24106310ejc.0.1697201831561; Fri, 13 Oct 2023 05:57:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 6/7] target/ppc: Move powerpc_mmu_t definition to 'cpu.h' Date: Fri, 13 Oct 2023 14:56:29 +0200 Message-ID: <20231013125630.95116-7-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201864396100003 The powerpc_mmu_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=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- target/ppc/cpu-qom.h | 43 ------------------------------------------- target/ppc/cpu.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 43 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index b2e42c2996..5bdca472be 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -36,49 +36,6 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POW= ERPC_CPU) =20 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") =20 -/*************************************************************************= ****/ -/* MMU model = */ -typedef enum powerpc_mmu_t powerpc_mmu_t; -enum powerpc_mmu_t { - POWERPC_MMU_UNKNOWN =3D 0x00000000, - /* Standard 32 bits PowerPC MMU */ - POWERPC_MMU_32B =3D 0x00000001, - /* PowerPC 6xx MMU with software TLB */ - POWERPC_MMU_SOFT_6xx =3D 0x00000002, - /* - * PowerPC 74xx MMU with software TLB (this has been - * disabled, see git history for more information. - * keywords: tlbld tlbli TLBMISS PTEHI PTELO) - */ - POWERPC_MMU_SOFT_74xx =3D 0x00000003, - /* PowerPC 4xx MMU with software TLB */ - POWERPC_MMU_SOFT_4xx =3D 0x00000004, - /* PowerPC MMU in real mode only */ - POWERPC_MMU_REAL =3D 0x00000006, - /* Freescale MPC8xx MMU model */ - POWERPC_MMU_MPC8xx =3D 0x00000007, - /* BookE MMU model */ - POWERPC_MMU_BOOKE =3D 0x00000008, - /* BookE 2.06 MMU model */ - POWERPC_MMU_BOOKE206 =3D 0x00000009, -#define POWERPC_MMU_64 0x00010000 - /* 64 bits PowerPC MMU */ - POWERPC_MMU_64B =3D POWERPC_MMU_64 | 0x00000001, - /* Architecture 2.03 and later (has LPCR) */ - POWERPC_MMU_2_03 =3D POWERPC_MMU_64 | 0x00000002, - /* Architecture 2.06 variant */ - POWERPC_MMU_2_06 =3D POWERPC_MMU_64 | 0x00000003, - /* Architecture 2.07 variant */ - POWERPC_MMU_2_07 =3D POWERPC_MMU_64 | 0x00000004, - /* Architecture 3.00 variant */ - POWERPC_MMU_3_00 =3D POWERPC_MMU_64 | 0x00000005, -}; - -static inline bool mmu_is_64bit(powerpc_mmu_t mmu_model) -{ - return mmu_model & POWERPC_MMU_64; -} - /*************************************************************************= ****/ /* Input pins model = */ typedef enum powerpc_input_t powerpc_input_t; diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index d8cf4c03bf..c2cd069095 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -217,6 +217,48 @@ typedef enum powerpc_excp_t { POWERPC_EXCP_POWER10, } powerpc_excp_t; =20 +/*************************************************************************= ****/ +/* MMU model = */ +typedef enum powerpc_mmu_t { + POWERPC_MMU_UNKNOWN =3D 0x00000000, + /* Standard 32 bits PowerPC MMU */ + POWERPC_MMU_32B =3D 0x00000001, + /* PowerPC 6xx MMU with software TLB */ + POWERPC_MMU_SOFT_6xx =3D 0x00000002, + /* + * PowerPC 74xx MMU with software TLB (this has been + * disabled, see git history for more information. + * keywords: tlbld tlbli TLBMISS PTEHI PTELO) + */ + POWERPC_MMU_SOFT_74xx =3D 0x00000003, + /* PowerPC 4xx MMU with software TLB */ + POWERPC_MMU_SOFT_4xx =3D 0x00000004, + /* PowerPC MMU in real mode only */ + POWERPC_MMU_REAL =3D 0x00000006, + /* Freescale MPC8xx MMU model */ + POWERPC_MMU_MPC8xx =3D 0x00000007, + /* BookE MMU model */ + POWERPC_MMU_BOOKE =3D 0x00000008, + /* BookE 2.06 MMU model */ + POWERPC_MMU_BOOKE206 =3D 0x00000009, +#define POWERPC_MMU_64 0x00010000 + /* 64 bits PowerPC MMU */ + POWERPC_MMU_64B =3D POWERPC_MMU_64 | 0x00000001, + /* Architecture 2.03 and later (has LPCR) */ + POWERPC_MMU_2_03 =3D POWERPC_MMU_64 | 0x00000002, + /* Architecture 2.06 variant */ + POWERPC_MMU_2_06 =3D POWERPC_MMU_64 | 0x00000003, + /* Architecture 2.07 variant */ + POWERPC_MMU_2_07 =3D POWERPC_MMU_64 | 0x00000004, + /* Architecture 3.00 variant */ + POWERPC_MMU_3_00 =3D POWERPC_MMU_64 | 0x00000005, +} powerpc_mmu_t; + +static inline bool mmu_is_64bit(powerpc_mmu_t mmu_model) +{ + return mmu_model & POWERPC_MMU_64; +} + #define PPC_INPUT(env) ((env)->bus_model) =20 /*************************************************************************= ****/ --=20 2.41.0 From nobody Wed Feb 11 01:11:09 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697201858; cv=none; d=zohomail.com; s=zohoarc; b=O/84z1Uc1UvUHj0YppPR7YaJ5oWlF22cKaD+Qop5bFlKSh7z8s1kzlToegqEykz+uk2ajMwujs6Zt4Lt9ZkXpQKAuUTmW8pSak87BJlSkPsoJx/qddHRmVxBGlkbccyTWCeGHnU2fZSbDOdlPvied0wrh3U6phyBOiqAGeRSxQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697201858; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cGRDbNMY2n5Kz87q0HF9aXN56DMXen4g7m78MIw8aHE=; b=T4rtJJfpWfc4eHZ1atkBQcr7FDoTJ0Nljhp5HGQ4yqBlbV4hBrFQojxaxm64dyvBlRccogYBfzHJrTvuZd/RoBooJ5G5tNqGNspI3n/5YjGaiMPAQPULQRI96zo/p6nVbObVkWXehR5y/p/M2xuq3qt1+lzU+rEBkd75hRcyktM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 169720185873442.0126129687975; Fri, 13 Oct 2023 05:57:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrHjR-0004uo-3T; Fri, 13 Oct 2023 08:57:34 -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 1qrHjE-0004Vh-Rn for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:21 -0400 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 1qrHjD-0002gC-6d for qemu-devel@nongnu.org; Fri, 13 Oct 2023 08:57:20 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53da72739c3so3589869a12.3 for ; Fri, 13 Oct 2023 05:57:18 -0700 (PDT) Received: from m1x-phil.lan ([176.172.118.168]) by smtp.gmail.com with ESMTPSA id h13-20020a17090619cd00b009ae587ce135sm12309552ejd.223.2023.10.13.05.57.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Oct 2023 05:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697201837; x=1697806637; 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=cGRDbNMY2n5Kz87q0HF9aXN56DMXen4g7m78MIw8aHE=; b=lhcKCGooGJrBtjITWM0vjZRURdJA4A9AvdfPrGFvkn0up8s2oritGNBNa3dAg2wX6C MtaVCWoyTq3O7r4tdxtcCiXLQd1VUtos88LdZ6qlnrkGEJLW1wkX3qkxfPMY9TCtQZ+X 4Rf9ZHmAz9xUDQslEaXZFgrW8Ow0R3X6ik9PAvo+EGu2Vpf6ZERd+FehQALeMrivZC5p 79hqJsbAc3q0V3cjtJcoFq8wMfJucmK5XPRlhCR0JRQlBVL6d5zfOrNZp3d67cPGIwKn XrPxfbjyWRjZUmyXkXinW+ZYjI3NRBLhTgPO+YAiPHCYTDzUKOR/zgvKpY8kRg+RsXZy v6Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697201837; x=1697806637; 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=cGRDbNMY2n5Kz87q0HF9aXN56DMXen4g7m78MIw8aHE=; b=tpeOu4Xjvv8TsqhXG/Hja+C/+SWA4l94H/zbAEXNmFnY3exP/Y9zjieOo57FKWQrLZ 6twpuznLsr+wlT9BVrrRyHpknDBV4UVNHMsmUVdxnpGU4hxsJFUZCRiiGIdZn99tysi3 QL2Zca6b66gvpxRRfeCdAsa3qwbsKVMeFiz+JoZ4KJhL2xJ6CYTlYMteFz1f6lbZqW07 3lzTVdiB8sbm96unurMV/Y1Rfk35Em9BJxfGJfSR0J2P6QnO2TaQGJLaUXWBcRuhHrnl Z+wOQLJL6j5+e3NGw9zjvliH6QYyMHa9i8DNbLUdQmTIcqvqNoNBDpL4I1v3l8cKmOXr Rt6Q== X-Gm-Message-State: AOJu0YyP6LaKTWcONxkSpL7WWk9bFX4ea3Zwb3H8BGHziae2ZywEgJZN Emb2qgHGJwfF3etmhFDgqFm0INk/cZ2ag9YEHHg= X-Google-Smtp-Source: AGHT+IHKdqliaFV7BpwPLKIdtW69Wadn7mv1Do3CXR3zMjtFb19abla3eFRsaLO//JqceQ0T8PzlvQ== X-Received: by 2002:a17:906:6a01:b0:9bd:ac0f:83dc with SMTP id qw1-20020a1709066a0100b009bdac0f83dcmr1246237ejc.54.1697201837451; Fri, 13 Oct 2023 05:57:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Le=20Goater?= , Daniel Henrique Barboza , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 7/7] target/ppc: Move powerpc_input_t definition to 'cpu.h' Date: Fri, 13 Oct 2023 14:56:30 +0200 Message-ID: <20231013125630.95116-8-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697201860403100005 The powerpc_input_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=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Richard Henderson --- target/ppc/cpu-qom.h | 21 --------------------- target/ppc/cpu.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 5bdca472be..6d39ad451c 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -36,25 +36,4 @@ OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POW= ERPC_CPU) =20 #define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host") =20 -/*************************************************************************= ****/ -/* Input pins model = */ -typedef enum powerpc_input_t powerpc_input_t; -enum powerpc_input_t { - PPC_FLAGS_INPUT_UNKNOWN =3D 0, - /* PowerPC 6xx bus */ - PPC_FLAGS_INPUT_6xx, - /* BookE bus */ - PPC_FLAGS_INPUT_BookE, - /* PowerPC 405 bus */ - PPC_FLAGS_INPUT_405, - /* PowerPC 970 bus */ - PPC_FLAGS_INPUT_970, - /* PowerPC POWER7 bus */ - PPC_FLAGS_INPUT_POWER7, - /* PowerPC POWER9 bus */ - PPC_FLAGS_INPUT_POWER9, - /* Freescale RCPU bus */ - PPC_FLAGS_INPUT_RCPU, -}; - #endif diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index c2cd069095..4b8b5d3d3e 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -259,6 +259,26 @@ static inline bool mmu_is_64bit(powerpc_mmu_t mmu_mode= l) return mmu_model & POWERPC_MMU_64; } =20 +/*************************************************************************= ****/ +/* Input pins model = */ +typedef enum powerpc_input_t { + PPC_FLAGS_INPUT_UNKNOWN =3D 0, + /* PowerPC 6xx bus */ + PPC_FLAGS_INPUT_6xx, + /* BookE bus */ + PPC_FLAGS_INPUT_BookE, + /* PowerPC 405 bus */ + PPC_FLAGS_INPUT_405, + /* PowerPC 970 bus */ + PPC_FLAGS_INPUT_970, + /* PowerPC POWER7 bus */ + PPC_FLAGS_INPUT_POWER7, + /* PowerPC POWER9 bus */ + PPC_FLAGS_INPUT_POWER9, + /* Freescale RCPU bus */ + PPC_FLAGS_INPUT_RCPU, +} powerpc_input_t; + #define PPC_INPUT(env) ((env)->bus_model) =20 /*************************************************************************= ****/ --=20 2.41.0