[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from hea
|
From: |
BALATON Zoltan |
|
Subject: |
[PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from header |
|
Date: |
Mon, 27 May 2024 01:13:12 +0200 (CEST) |
Two of these are not used anywhere and the other two are used only
once and can be inlined and removed from the header.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
target/ppc/mmu-hash32.c | 5 +++--
target/ppc/mmu-hash32.h | 32 --------------------------------
2 files changed, 3 insertions(+), 34 deletions(-)
diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
index a2c0ac05d2..7a6a674f8a 100644
--- a/target/ppc/mmu-hash32.c
+++ b/target/ppc/mmu-hash32.c
@@ -206,17 +206,18 @@ static hwaddr ppc_hash32_pteg_search(PowerPCCPU *cpu,
hwaddr pteg_off,
{
hwaddr pte_offset = pteg_off;
target_ulong pte0, pte1;
+ hwaddr base = ppc_hash32_hpt_base(cpu);
int i;
for (i = 0; i < HPTES_PER_GROUP; i++) {
- pte0 = ppc_hash32_load_hpte0(cpu, pte_offset);
+ pte0 = ldl_phys(CPU(cpu)->as, base + pte_offset);
/*
* pte0 contains the valid bit and must be read before pte1,
* otherwise we might see an old pte1 with a new valid bit and
* thus an inconsistent hpte value
*/
smp_rmb();
- pte1 = ppc_hash32_load_hpte1(cpu, pte_offset);
+ pte1 = ldl_phys(CPU(cpu)->as, base + pte_offset + HASH_PTE_SIZE_32 /
2);
if ((pte0 & HPTE32_V_VALID)
&& (secondary == !!(pte0 & HPTE32_V_SECONDARY))
diff --git a/target/ppc/mmu-hash32.h b/target/ppc/mmu-hash32.h
index 2838de031c..4db55fb0a0 100644
--- a/target/ppc/mmu-hash32.h
+++ b/target/ppc/mmu-hash32.h
@@ -69,38 +69,6 @@ static inline hwaddr ppc_hash32_hpt_mask(PowerPCCPU *cpu)
return ((cpu->env.spr[SPR_SDR1] & SDR_32_HTABMASK) << 16) | 0xFFFF;
}
-static inline target_ulong ppc_hash32_load_hpte0(PowerPCCPU *cpu,
- hwaddr pte_offset)
-{
- target_ulong base = ppc_hash32_hpt_base(cpu);
-
- return ldl_phys(CPU(cpu)->as, base + pte_offset);
-}
-
-static inline target_ulong ppc_hash32_load_hpte1(PowerPCCPU *cpu,
- hwaddr pte_offset)
-{
- target_ulong base = ppc_hash32_hpt_base(cpu);
-
- return ldl_phys(CPU(cpu)->as, base + pte_offset + HASH_PTE_SIZE_32 / 2);
-}
-
-static inline void ppc_hash32_store_hpte0(PowerPCCPU *cpu,
- hwaddr pte_offset, target_ulong pte0)
-{
- target_ulong base = ppc_hash32_hpt_base(cpu);
-
- stl_phys(CPU(cpu)->as, base + pte_offset, pte0);
-}
-
-static inline void ppc_hash32_store_hpte1(PowerPCCPU *cpu,
- hwaddr pte_offset, target_ulong pte1)
-{
- target_ulong base = ppc_hash32_hpt_base(cpu);
-
- stl_phys(CPU(cpu)->as, base + pte_offset + HASH_PTE_SIZE_32 / 2, pte1);
-}
-
static inline hwaddr get_pteg_offset32(PowerPCCPU *cpu, hwaddr hash)
{
return (hash * HASH_PTEG_SIZE_32) & ppc_hash32_hpt_mask(cpu);
--
2.30.9
- [PATCH 26/43] target/ppc/mmu_common.c: Stop using ctx in get_bat_6xx_tlb(), (continued)
- [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
- [PATCH 43/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_direct_store, BALATON Zoltan, 2024/05/26
- [PATCH 38/43] target/ppc/mmu-hash32.c: Use pte address as parameter instead of offset, BALATON Zoltan, 2024/05/26
- [PATCH 42/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_set_[rc], BALATON Zoltan, 2024/05/26
- [PATCH 37/43] target/ppc/mmu-hash32.c: Return and use pte address instead of base + offset, BALATON Zoltan, 2024/05/26
- [PATCH 19/43] target/ppc/mmu-hash32.c: Inline and remove ppc_hash32_pte_prot(), BALATON Zoltan, 2024/05/26
- [PATCH 40/43] target/ppc: Change parameter type of ppc64_v3_radix(), BALATON Zoltan, 2024/05/26
- [PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from header,
BALATON Zoltan <=
- [PATCH 29/43] target/ppc/mmu-hash32.c: Move get_pteg_offset32() to the header, BALATON Zoltan, 2024/05/26
- [PATCH 35/43] target/ppc/mmu-hash32.c: Change parameter type of ppc_hash32_bat_lookup(), BALATON Zoltan, 2024/05/26
- Re: [PATCH 00/43] Remaining MMU clean up patches, BALATON Zoltan, 2024/05/27