[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY
|
From: |
BALATON Zoltan |
|
Subject: |
[PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY blocks |
|
Date: |
Mon, 27 May 2024 01:13:10 +0200 (CEST) |
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 <balaton@eik.bme.hu>
---
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, float16
arg);
void helper_compute_fprf_float32(CPUPPCState *env, float32 arg);
void helper_compute_fprf_float128(CPUPPCState *env, float128 arg);
+FIELD(GER_MSK, XMSK, 0, 4)
+FIELD(GER_MSK, YMSK, 4, 4)
+FIELD(GER_MSK, PMSK, 8, 8)
+
/* translate.c */
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);
-#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_type)
{
@@ -252,7 +259,6 @@ bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType
access_type,
int ppc6xx_tlb_getnum(CPUPPCState *env, target_ulong eaddr,
int way, int is_code);
-#endif /* !CONFIG_USER_ONLY */
/* 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)
-#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, hwaddr
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 */
#endif /* PPC_INTERNAL_H */
--
2.30.9
- [PATCH 24/43] target/ppc/mmu_common.c: Use defines instead of numeric constants, (continued)
- [PATCH 24/43] target/ppc/mmu_common.c: Use defines instead of numeric constants, BALATON Zoltan, 2024/05/26
- [PATCH 07/43] target/ppc/mmu_common.c: Return directly in ppc6xx_tlb_pte_check(), BALATON Zoltan, 2024/05/26
- [PATCH 09/43] target/ppc/mmu_common.c: Remove unused field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 10/43] target/ppc/mmu_common.c: Remove hash field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 27/43] target/ppc/mmu_common.c: Remove mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 30/43] target/ppc: Unexport some functions from mmu-book3s-v3.h, BALATON Zoltan, 2024/05/26
- [PATCH 33/43] target/ppc: Remove single use static inline function, BALATON Zoltan, 2024/05/26
- [PATCH 11/43] target/ppc/mmu_common.c: Remove pte_update_flags(), BALATON Zoltan, 2024/05/26
- [PATCH 28/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_raddr(), BALATON Zoltan, 2024/05/26
- [PATCH 31/43] target/ppc/mmu-radix64: Remove externally unused parts from header, BALATON Zoltan, 2024/05/26
- [PATCH 34/43] target/ppc/internal.h: Consolidate ifndef CONFIG_USER_ONLY blocks,
BALATON Zoltan <=
- [PATCH 12/43] target/ppc/mmu_common.c: Remove nx field from mmu_ctx_t, BALATON Zoltan, 2024/05/26
- [PATCH 14/43] target/ppc/mmu_common.c: Remove single use local variable, BALATON Zoltan, 2024/05/26
- [PATCH 39/43] target/ppc: Change parameter type of some inline functions, BALATON Zoltan, 2024/05/26
- [PATCH 41/43] target/ppc: Change MMU xlate functions to take CPUState, BALATON Zoltan, 2024/05/26
- [PATCH 23/43] target/ppc/mmu_common.c: Rename function parameter, BALATON Zoltan, 2024/05/26
- [PATCH 22/43] target/ppc/mmu_common.c: Stop using ctx in ppc6xx_tlb_check(), BALATON Zoltan, 2024/05/26
- [PATCH 26/43] target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb(), BALATON Zoltan, 2024/05/26
- [PATCH 25/43] target/ppc: Remove bat_size_prot(), BALATON Zoltan, 2024/05/26
- [PATCH 32/43] target/ppc: Remove includes from mmu-book3s-v3.h, BALATON Zoltan, 2024/05/26
- [PATCH 13/43] target/ppc/mmu_common.c: Convert local variable to bool, BALATON Zoltan, 2024/05/26