From nobody Mon Nov 25 09:21:15 2024 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=eik.bme.hu Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716765432159617.1735522073823; Sun, 26 May 2024 16:17:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBN4l-0004PV-SW; Sun, 26 May 2024 19:14:51 -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 1sBN4j-0004Ln-Ba; Sun, 26 May 2024 19:14:49 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sBN4h-0003iP-Cf; Sun, 26 May 2024 19:14:49 -0400 Received: from zero.eik.bme.hu (localhost [127.0.0.1]) by zero.eik.bme.hu (Postfix) with ESMTP id D73454E6543; Mon, 27 May 2024 01:13:12 +0200 (CEST) Received: from zero.eik.bme.hu ([127.0.0.1]) by zero.eik.bme.hu (zero.eik.bme.hu [127.0.0.1]) (amavisd-new, port 10028) with ESMTP id uHS7dTEC5Kfy; Mon, 27 May 2024 01:13:10 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id DECF14E6503; Mon, 27 May 2024 01:13:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at eik.bme.hu Message-Id: In-Reply-To: References: From: BALATON Zoltan Subject: [PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY blocks MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Nicholas Piggin , Daniel Henrique Barboza Date: Mon, 27 May 2024 01:13:10 +0200 (CEST) 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=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-ZM-MESSAGEID: 1716765433263100001 Content-Type: text/plain; charset="utf-8" A few pte related definitions are between two ifndef CONFIG_USER_ONLY blocks but these are not needed for user only and should also be within these blocks. Consolidate the ifndef blocks so all user only and not user only definitions are in one #ifdef #else at the end of the file. Signed-off-by: BALATON Zoltan --- target/ppc/internal.h | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 8e5a241f74..66ce22bbe9 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -224,6 +224,10 @@ void helper_compute_fprf_float16(CPUPPCState *env, flo= at16 arg); void helper_compute_fprf_float32(CPUPPCState *env, float32 arg); void helper_compute_fprf_float128(CPUPPCState *env, float128 arg); =20 +FIELD(GER_MSK, XMSK, 0, 4) +FIELD(GER_MSK, YMSK, 4, 4) +FIELD(GER_MSK, PMSK, 8, 8) + /* translate.c */ =20 int ppc_fixup_cpu(PowerPCCPU *cpu); @@ -234,8 +238,11 @@ void destroy_ppc_opcodes(PowerPCCPU *cpu); void ppc_gdb_init(CPUState *cs, PowerPCCPUClass *ppc); const gchar *ppc_gdb_arch_name(CPUState *cs); =20 -#ifndef CONFIG_USER_ONLY - +#ifdef CONFIG_USER_ONLY +void ppc_cpu_record_sigsegv(CPUState *cs, vaddr addr, + MMUAccessType access_type, + bool maperr, uintptr_t ra); +#else /* Check if permission bit required for the access_type is set in prot */ static inline int check_prot_access_type(int prot, MMUAccessType access_ty= pe) { @@ -252,7 +259,6 @@ bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessT= ype access_type, int ppc6xx_tlb_getnum(CPUPPCState *env, target_ulong eaddr, int way, int is_code); =20 -#endif /* !CONFIG_USER_ONLY */ =20 /* Common routines used by software and hardware TLBs emulation */ static inline int pte_is_valid(target_ulong pte0) @@ -268,11 +274,6 @@ static inline void pte_invalidate(target_ulong *pte0) #define PTE_PTEM_MASK 0x7FFFFFBF #define PTE_CHECK_MASK (TARGET_PAGE_MASK | 0x7B) =20 -#ifdef CONFIG_USER_ONLY -void ppc_cpu_record_sigsegv(CPUState *cs, vaddr addr, - MMUAccessType access_type, - bool maperr, uintptr_t ra); -#else bool ppc_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); @@ -287,10 +288,6 @@ void ppc_cpu_do_transaction_failed(CPUState *cs, hwadd= r physaddr, void ppc_cpu_debug_excp_handler(CPUState *cs); bool ppc_cpu_debug_check_breakpoint(CPUState *cs); bool ppc_cpu_debug_check_watchpoint(CPUState *cs, CPUWatchpoint *wp); -#endif - -FIELD(GER_MSK, XMSK, 0, 4) -FIELD(GER_MSK, YMSK, 4, 4) -FIELD(GER_MSK, PMSK, 8, 8) +#endif /* !CONFIG_USER_ONLY */ =20 #endif /* PPC_INTERNAL_H */ --=20 2.30.9