From nobody Thu May 2 16:02:07 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621943890; cv=none; d=zohomail.com; s=zohoarc; b=akgAOGO0ODRrzERZ9MoRVw/tYlUFCQHy/Fd373ZP9gZHO2Nl+rAiq/TFWLovp0wWh0elEkiICbhKjO860CaqMB/cSYPLUhecJpYPwyiSV3WI2pnK8VXisLz99YxI78iLr30/jnQq/4lDFNsGU03IYnxsWTn8qOQz1tt82tku71k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621943890; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=F8wWdSq9vThqorJOZaojgkQkWEFHJm/VNcHc49vSYTs=; b=PtaMKryu2E5tH9oC68/51A5o/mRIf6IF3ovUQBX6JZ3vYsDVE8l+U8gtTCvV05wLTfSHRBTFYIFk73bSBbF67zAAWoKwHSYlKCX3rS5G3VzZniAHCinELiQyl9Sv4LqmXbOpwkCT6/Sway3V2xNgt7051naq/R/P9GJr7T1nXbE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621943890810861.8307882792868; Tue, 25 May 2021 04:58:10 -0700 (PDT) Received: from localhost ([::1]:55056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVhJ-0004jC-PZ for importer2@patchew.org; Tue, 25 May 2021 07:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVdU-0001dC-LV; Tue, 25 May 2021 07:54:12 -0400 Received: from [201.28.113.2] (port=5820 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVdT-0004P8-68; Tue, 25 May 2021 07:54:12 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 25 May 2021 08:54:00 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id 9FE4A80144F; Tue, 25 May 2021 08:54:00 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH v5 1/4] target/ppc: used ternary operator when registering MAS Date: Tue, 25 May 2021 08:53:52 -0300 Message-Id: <20210525115355.8254-2-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> References: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 25 May 2021 11:54:00.0812 (UTC) FILETIME=[A6CEA2C0:01D7515C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The write calback decision when registering the MAS SPR has been turned into a ternary operation, rather than an if-then-else block. This was done because when building without TCG, even though the compiler will optimize away the pointers to spr_write_generic*, it doesn't optimize away the decision and assignment to the local pointer, creating compiler errors. This cleanup looked better than using ifdefs, so we decided to with it. Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index b696469d1a..40719f6480 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -1205,15 +1205,12 @@ static void register_BookE206_sprs(CPUPPCState *env= , uint32_t mas_mask, /* TLB assist registers */ /* XXX : not implemented */ for (i =3D 0; i < 8; i++) { - void (*uea_write)(DisasContext *ctx, int sprn, int gprn) =3D - &spr_write_generic32; - if (i =3D=3D 2 && (mas_mask & (1 << i)) && (env->insns_flags & PPC= _64B)) { - uea_write =3D &spr_write_generic; - } if (mas_mask & (1 << i)) { spr_register(env, mas_sprn[i], mas_names[i], SPR_NOACCESS, SPR_NOACCESS, - &spr_read_generic, uea_write, + &spr_read_generic, + (i =3D=3D 2 && (env->insns_flags & PPC_64B)) + ? &spr_write_generic : &spr_write_generic32, 0x00000000); } } --=20 2.17.1 From nobody Thu May 2 16:02:08 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621943870; cv=none; d=zohomail.com; s=zohoarc; b=WNOt3qqrpwWRKc7vKLlrxjbnV7Lymq5Ax+sjar2y5wArnHIzVQ3MXKS7HJKh3rpeL3FVl7p2Xh0Sj9D/axZgIlulxiDyOxy5XluHwJyP2vZKvEdapE3KhxCJJ3WbmcK0ugUhbM2FjNaLmHDR+gTYAwqR4QfE6+zyEyrNxu45tgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621943870; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=jMveL+Td17smE9LQz+WfNLQsNFLjEjIu/4U1uoLj2nc=; b=ly74yeFrTI16o0J5Gb3j0gyfvaauAqDuHif4QwW/JPJMF5Iy7+WONOK8X60E6202HwreoyEja6Yp6xROuk24j7rGNgV18cre5CXRgUjBoS4X12+kOmq7GvNS7Ebnpq0uV1WmYAV3T4P7tOteZ+LZQuYwPMqJpoDZZNw4ilREReU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621943870849379.23937621915934; Tue, 25 May 2021 04:57:50 -0700 (PDT) Received: from localhost ([::1]:54316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVgz-0004Ex-ML for importer2@patchew.org; Tue, 25 May 2021 07:57:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVdX-0001iU-Rb; Tue, 25 May 2021 07:54:15 -0400 Received: from [201.28.113.2] (port=5820 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVdV-0004P8-PV; Tue, 25 May 2021 07:54:15 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 25 May 2021 08:54:00 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id B758080144E; Tue, 25 May 2021 08:54:00 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH v5 2/4] target/ppc: added ifdefs around TCG-only code Date: Tue, 25 May 2021 08:53:53 -0300 Message-Id: <20210525115355.8254-3-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> References: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 25 May 2021 11:54:00.0890 (UTC) FILETIME=[A6DA89A0:01D7515C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" excp_helper.c, mmu-hash64.c and mmu_helper.c have some function declarations that are TCG-only, and couldn't be easily moved to a TCG only file, so ifdefs were added around them. We also needed ifdefs around some header files because helper-proto.h includes trace/generated-helpers.h, which is never created when building without TCG, and cpu_ldst.h includes tcg/tcg.h, whose containing folder is not included as a -iquote. As future cleanup, we could change the part of the configuration script to add those. cpu_init.c also had a callback definition that is TCG only and could be removed as part of a future cleanup (all the dump_statistics part is almost never used and will become obsolete as we transition to using decodetree). Signed-off-by: Bruno Larsen (billionai) --- target/ppc/cpu_init.c | 2 ++ target/ppc/excp_helper.c | 21 ++++++++++++++++++--- target/ppc/mmu-hash64.c | 11 ++++++++++- target/ppc/mmu_helper.c | 16 ++++++++++++++-- 4 files changed, 44 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 40719f6480..f5ae2f150d 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -9250,7 +9250,9 @@ static void ppc_cpu_class_init(ObjectClass *oc, void = *data) cc->class_by_name =3D ppc_cpu_class_by_name; cc->has_work =3D ppc_cpu_has_work; cc->dump_state =3D ppc_cpu_dump_state; +#ifdef CONFIG_TCG cc->dump_statistics =3D ppc_cpu_dump_statistics; +#endif cc->set_pc =3D ppc_cpu_set_pc; cc->gdb_read_register =3D ppc_cpu_gdb_read_register; cc->gdb_write_register =3D ppc_cpu_gdb_write_register; diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index f4f15279eb..04418054f5 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -19,12 +19,15 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "cpu.h" -#include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" #include "internal.h" #include "helper_regs.h" =20 +#ifdef CONFIG_TCG +#include "exec/helper-proto.h" +#include "exec/cpu_ldst.h" +#endif + /* #define DEBUG_OP */ /* #define DEBUG_SOFTWARE_TLB */ /* #define DEBUG_EXCEPTIONS */ @@ -1208,6 +1211,7 @@ void raise_exception_ra(CPUPPCState *env, uint32_t ex= ception, raise_exception_err_ra(env, exception, 0, raddr); } =20 +#ifdef CONFIG_TCG void helper_raise_exception_err(CPUPPCState *env, uint32_t exception, uint32_t error_code) { @@ -1218,8 +1222,10 @@ void helper_raise_exception(CPUPPCState *env, uint32= _t exception) { raise_exception_err_ra(env, exception, 0, 0); } +#endif =20 #if !defined(CONFIG_USER_ONLY) +#ifdef CONFIG_TCG void helper_store_msr(CPUPPCState *env, target_ulong val) { uint32_t excp =3D hreg_store_msr(env, val, 0); @@ -1259,6 +1265,7 @@ void helper_pminsn(CPUPPCState *env, powerpc_pm_insn_= t insn) (env->spr[SPR_PSSCR] & PSSCR_EC); } #endif /* defined(TARGET_PPC64) */ +#endif /* CONFIG_TCG */ =20 static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong= msr) { @@ -1293,6 +1300,7 @@ static inline void do_rfi(CPUPPCState *env, target_ul= ong nip, target_ulong msr) check_tlb_flush(env, false); } =20 +#ifdef CONFIG_TCG void helper_rfi(CPUPPCState *env) { do_rfi(env, env->spr[SPR_SRR0], env->spr[SPR_SRR1] & 0xfffffffful); @@ -1345,8 +1353,10 @@ void helper_rfmci(CPUPPCState *env) /* FIXME: choose CSRR1 or MCSRR1 based on cpu type */ do_rfi(env, env->spr[SPR_BOOKE_MCSRR0], env->spr[SPR_BOOKE_MCSRR1]); } -#endif +#endif /* CONFIG_TCG */ +#endif /* !defined(CONFIG_USER_ONLY) */ =20 +#ifdef CONFIG_TCG void helper_tw(CPUPPCState *env, target_ulong arg1, target_ulong arg2, uint32_t flags) { @@ -1374,11 +1384,13 @@ void helper_td(CPUPPCState *env, target_ulong arg1,= target_ulong arg2, } } #endif +#endif =20 #if !defined(CONFIG_USER_ONLY) /*************************************************************************= ****/ /* PowerPC 601 specific instructions (POWER bridge) */ =20 +#ifdef CONFIG_TCG void helper_rfsvc(CPUPPCState *env) { do_rfi(env, env->lr, env->ctr & 0x0000FFFF); @@ -1523,8 +1535,10 @@ void helper_book3s_msgsndp(CPUPPCState *env, target_= ulong rb) book3s_msgsnd_common(pir, PPC_INTERRUPT_DOORBELL); } #endif +#endif /* CONFIG_TCG */ #endif =20 +#ifdef CONFIG_TCG void ppc_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) @@ -1540,3 +1554,4 @@ void ppc_cpu_do_unaligned_access(CPUState *cs, vaddr = vaddr, env->error_code =3D insn & 0x03FF0000; cpu_loop_exit(cs); } +#endif diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c index ce0068590f..c1b98a97e9 100644 --- a/target/ppc/mmu-hash64.c +++ b/target/ppc/mmu-hash64.c @@ -21,7 +21,6 @@ #include "qemu/units.h" #include "cpu.h" #include "exec/exec-all.h" -#include "exec/helper-proto.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "sysemu/hw_accel.h" @@ -33,6 +32,10 @@ #include "mmu-book3s-v3.h" #include "helper_regs.h" =20 +#ifdef CONFIG_TCG +#include "exec/helper-proto.h" +#endif + /* #define DEBUG_SLB */ =20 #ifdef DEBUG_SLB @@ -97,6 +100,7 @@ void dump_slb(PowerPCCPU *cpu) } } =20 +#ifdef CONFIG_TCG void helper_slbia(CPUPPCState *env, uint32_t ih) { PowerPCCPU *cpu =3D env_archcpu(env); @@ -202,6 +206,7 @@ void helper_slbieg(CPUPPCState *env, target_ulong addr) { __helper_slbie(env, addr, true); } +#endif =20 int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot, target_ulong esid, target_ulong vsid) @@ -255,6 +260,7 @@ int ppc_store_slb(PowerPCCPU *cpu, target_ulong slot, return 0; } =20 +#ifdef CONFIG_TCG static int ppc_load_slb_esid(PowerPCCPU *cpu, target_ulong rb, target_ulong *rt) { @@ -348,6 +354,7 @@ target_ulong helper_load_slb_vsid(CPUPPCState *env, tar= get_ulong rb) } return rt; } +#endif =20 /* Check No-Execute or Guarded Storage */ static inline int ppc_hash64_pte_noexec_guard(PowerPCCPU *cpu, @@ -1097,12 +1104,14 @@ void ppc_hash64_tlb_flush_hpte(PowerPCCPU *cpu, tar= get_ulong ptex, cpu->env.tlb_need_flush =3D TLB_NEED_GLOBAL_FLUSH | TLB_NEED_LOCAL_FLU= SH; } =20 +#ifdef CONFIG_TCG void helper_store_lpcr(CPUPPCState *env, target_ulong val) { PowerPCCPU *cpu =3D env_archcpu(env); =20 ppc_store_lpcr(cpu, val); } +#endif =20 void ppc_hash64_init(PowerPCCPU *cpu) { diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 5395e5ee5a..9339b3aa59 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -20,13 +20,11 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "cpu.h" -#include "exec/helper-proto.h" #include "sysemu/kvm.h" #include "kvm_ppc.h" #include "mmu-hash64.h" #include "mmu-hash32.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" #include "exec/log.h" #include "helper_regs.h" #include "qemu/error-report.h" @@ -36,6 +34,10 @@ #include "mmu-book3s-v3.h" #include "mmu-radix64.h" =20 +#ifdef CONFIG_TCG +#include "exec/helper-proto.h" +#include "exec/cpu_ldst.h" +#endif /* #define DEBUG_MMU */ /* #define DEBUG_BATS */ /* #define DEBUG_SOFTWARE_TLB */ @@ -268,6 +270,7 @@ static inline void ppc6xx_tlb_invalidate_virt(CPUPPCSta= te *env, ppc6xx_tlb_invalidate_virt2(env, eaddr, is_code, 0); } =20 +#ifdef CONFIG_TCG static void ppc6xx_tlb_store(CPUPPCState *env, target_ulong EPN, int way, int is_code, target_ulong pte0, target_ulong = pte1) { @@ -286,6 +289,7 @@ static void ppc6xx_tlb_store(CPUPPCState *env, target_u= long EPN, int way, /* Store last way for LRU mechanism */ env->last_way =3D way; } +#endif =20 static int ppc6xx_tlb_check(CPUPPCState *env, mmu_ctx_t *ctx, target_ulong eaddr, MMUAccessType access_type) @@ -626,6 +630,7 @@ static int ppcemb_tlb_check(CPUPPCState *env, ppcemb_tl= b_t *tlb, return 0; } =20 +#ifdef CONFIG_TCG /* Generic TLB search function for PowerPC embedded implementations */ static int ppcemb_tlb_search(CPUPPCState *env, target_ulong address, uint32_t pid) @@ -646,6 +651,7 @@ static int ppcemb_tlb_search(CPUPPCState *env, target_u= long address, =20 return ret; } +#endif =20 /* Helpers specific to PowerPC 40x implementations */ static inline void ppc4xx_tlb_invalidate_all(CPUPPCState *env) @@ -1420,12 +1426,14 @@ static int get_physical_address_wtlb(CPUPPCState *e= nv, mmu_ctx_t *ctx, return ret; } =20 +#ifdef CONFIG_TCG static int get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx, target_ulong eaddr, MMUAccessType access_t= ype, int type) { return get_physical_address_wtlb(env, ctx, eaddr, access_type, type, 0= ); } +#endif =20 static void booke206_update_mas_tlb_miss(CPUPPCState *env, target_ulong ad= dress, MMUAccessType access_type, int mm= u_idx) @@ -1709,6 +1717,7 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr ea= ddr, return false; } =20 +#ifdef CONFIG_TCG /*************************************************************************= ****/ /* BATs management */ #if !defined(FLUSH_ALL_TLBS) @@ -1898,6 +1907,7 @@ void helper_store_601_batl(CPUPPCState *env, uint32_t= nr, target_ulong value) #endif } } +#endif =20 /*************************************************************************= ****/ /* TLB management */ @@ -1943,6 +1953,7 @@ void ppc_tlb_invalidate_all(CPUPPCState *env) } } =20 +#ifdef CONFIG_TCG void ppc_tlb_invalidate_one(CPUPPCState *env, target_ulong addr) { #if !defined(FLUSH_ALL_TLBS) @@ -2912,6 +2923,7 @@ void helper_check_tlb_flush_global(CPUPPCState *env) { check_tlb_flush(env, true); } +#endif /* CONFIG_TCG */ =20 /*************************************************************************= ****/ =20 --=20 2.17.1 From nobody Thu May 2 16:02:08 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621944076; cv=none; d=zohomail.com; s=zohoarc; b=mYq5YZEtWYhYEjIhXrLZb7YJrJPfYgX1bCNVY/mb4TINqBQUqVwKwoK/uURJf9hUemExCyh+U3xIzXaboUzCA2QtXaNUb4boSlZ2YBmDY1kXtb16CGFkj1QTrzGaGmOSu2ST5vl6lP/ufvKJRx9ipPZIC8nTV4AIbhtXnmgxVE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621944076; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=zUbUjuIyL0PIxDggbLPsojOem/Fr7K/NCgCf0oyi834=; b=F3diQfWYUE8Dz1hOTSFXpSj9Ye0ri9Igc/TcdJ8YeCn2wE5YumBg/bJVoaXrJeflwR7w9gicWjIq2xVNvXnop0WiNsPUAOJsIRdyBhyv23S1q61CwQcr+XVxEHN96O5pQu+/r5ae0O+9tKPTZvI2QZSSZQ1mxPL0cZjYG4pXKGA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621944076385625.3780584455913; Tue, 25 May 2021 05:01:16 -0700 (PDT) Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVkJ-0000Hy-7J for importer2@patchew.org; Tue, 25 May 2021 08:01:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVda-0001pC-Ov; Tue, 25 May 2021 07:54:18 -0400 Received: from [201.28.113.2] (port=5820 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVdZ-0004P8-1c; Tue, 25 May 2021 07:54:18 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 25 May 2021 08:54:00 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id CC2AC80144F; Tue, 25 May 2021 08:54:00 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH v5 3/4] target/ppc: created tcg-stub.c file Date: Tue, 25 May 2021 08:53:54 -0300 Message-Id: <20210525115355.8254-4-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> References: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 25 May 2021 11:54:00.0984 (UTC) FILETIME=[A6E8E180:01D7515C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Created a file with stubs needed to compile disabling TCG. *_ppc_opcodes were created to make cpu_init.c have a few less ifdefs, since they are not needed. softmmu_resize_hpt_* have to be created because the compiler can't automatically know they aren't used, but they should never be reached. Signed-off-by: Bruno Larsen (billionai) --- target/ppc/meson.build | 4 ++++ target/ppc/tcg-stub.c | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 target/ppc/tcg-stub.c diff --git a/target/ppc/meson.build b/target/ppc/meson.build index d1aa7d5d39..848e625302 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -28,6 +28,10 @@ ppc_softmmu_ss.add(files( 'mmu_helper.c', 'monitor.c', )) +ppc_softmmu_ss.add(when: 'CONFIG_TCG', if_false: files( + 'tcg-stub.c' +)) + ppc_softmmu_ss.add(when: 'TARGET_PPC64', if_true: files( 'compat.c', 'mmu-book3s-v3.c', diff --git a/target/ppc/tcg-stub.c b/target/ppc/tcg-stub.c new file mode 100644 index 0000000000..aadcf59d26 --- /dev/null +++ b/target/ppc/tcg-stub.c @@ -0,0 +1,45 @@ +/* + * PowerPC CPU initialization for qemu. + * + * Copyright (C) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ +#include "qemu/osdep.h" +#include "cpu.h" +#include "internal.h" +#include "hw/ppc/spapr.h" + +void create_ppc_opcodes(PowerPCCPU *cpu, Error **errp) +{ +} + +void destroy_ppc_opcodes(PowerPCCPU *cpu) +{ +} + +target_ulong softmmu_resize_hpt_prepare(PowerPCCPU *cpu, + SpaprMachineState *spapr, + target_ulong shift) +{ + g_assert_not_reached(); +} + +target_ulong softmmu_resize_hpt_commit(PowerPCCPU *cpu, + SpaprMachineState *spapr, + target_ulong flags, + target_ulong shift) +{ + g_assert_not_reached(); +} --=20 2.17.1 From nobody Thu May 2 16:02:08 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621944070; cv=none; d=zohomail.com; s=zohoarc; b=l5yoRE1uvANzcXsKR3GY8/+MWcn5fA03h+xruG5LVX3j8TU5I8pkQSNb959nOPHtCvRlV/pCcZ7yqaZ8s8NV1giznRwJ+Mc7DgpoGe7NpeLDOAQfkNSyadekCIypjYvJBLmonf3HGVWlp2PPow1Vw2PhkZxKTg3k1hcFO6K1zX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621944070; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=b7DZ0IWx7idxhfVYki/iikkWuqOz1SX4rLS6R0DJPUw=; b=Ez1oo6ilGr8gjwffbJmsBjx6sDwpveMkGdnyWxVlhxH/ueQS0BMDx1hvsXqghnzHMNv6qdHoJ+zCBtSYclShmvFxjfk+2AL31BSEibIhGh/t5seU+29buCb4K71CajlQvrGmydm103Xln9sgElCSH3VSrkhdSiNInaPvOFTtCbo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621944070571657.6270043338186; Tue, 25 May 2021 05:01:10 -0700 (PDT) Received: from localhost ([::1]:60798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVkD-0000B5-GG for importer2@patchew.org; Tue, 25 May 2021 08:01:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llVdd-0001wD-AL; Tue, 25 May 2021 07:54:21 -0400 Received: from [201.28.113.2] (port=5820 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llVdb-0004P8-RR; Tue, 25 May 2021 07:54:21 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 25 May 2021 08:54:01 -0300 Received: from eldorado.org.br (unknown [10.10.71.235]) by power9a (Postfix) with ESMTP id E25BD80144E; Tue, 25 May 2021 08:54:00 -0300 (-03) From: "Bruno Larsen (billionai)" To: qemu-devel@nongnu.org Subject: [PATCH v5 4/4] target/ppc: updated meson.build to support disable-tcg Date: Tue, 25 May 2021 08:53:55 -0300 Message-Id: <20210525115355.8254-5-bruno.larsen@eldorado.org.br> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> References: <20210525115355.8254-1-bruno.larsen@eldorado.org.br> X-OriginalArrivalTime: 25 May 2021 11:54:01.0078 (UTC) FILETIME=[A6F73960:01D7515C] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=201.28.113.2; envelope-from=bruno.larsen@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: farosas@linux.ibm.com, richard.henderson@linaro.org, luis.pires@eldorado.org.br, lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" updated build file to not compile some sources that are unnecessary if TCG is disabled on the system. Signed-off-by: Bruno Larsen (billionai) --- target/ppc/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build index 848e625302..a6a53a8d5c 100644 --- a/target/ppc/meson.build +++ b/target/ppc/meson.build @@ -3,11 +3,14 @@ ppc_ss.add(files( 'cpu-models.c', 'cpu.c', 'cpu_init.c', - 'dfp_helper.c', 'excp_helper.c', - 'fpu_helper.c', 'gdbstub.c', 'helper_regs.c', +)) + +ppc_ss.add(when: 'CONFIG_TCG', if_true: files( + 'dfp_helper.c', + 'fpu_helper.c', 'int_helper.c', 'mem_helper.c', 'misc_helper.c', --=20 2.17.1