since tha last series. Please review.
Regards,
BALATON Zoltan
BALATON Zoltan (24):
target/ppc: Fix gen_sc to use correct nip
target/ppc: Move patching nip from exception handler to helper_scv
target/ppc: Simplify syscall exception handlers
target/ppc: Remove unused helper
target/p
The real mode handling is identical in the remaining switch cases.
Split off these common real mode cases into a separate conditional to
leave only the else branches in the switch that are different.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 34
ge it.
[balaton: added commit message]
Signed-off-by: BALATON Zoltan
---
target/ppc/excp_helper.c | 2 +-
target/ppc/translate.c | 6 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index b6a5241a4d..fd145200dd 100644
--- a/t
This function is no longer called for BookE MMU model so remove parts
related to it. This has uncovered a few may be used uninitialised
warnings that are also fixed.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 25 +
1 file changed, 5 insertions(+), 20
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 300
1 file changed, 150 insertions(+), 150 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index ad64ec1647..18e49aa2f1 100644
--- a/target/ppc/mmu_common.c
+++ b
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 843f909619..d40ddb6fc3 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc
In mmubooke_check_tlb() prot2 is calculated first but only used after
an unrelated check that can return before tha value is used. Move the
calculation after the check, closer to where it is used, to keep them
together and avoid computing it when not needed.
Signed-off-by: BALATON Zoltan
The helper_rac function is defined but not used, remove it.
Fixes: 005b69fdcc (target/ppc: Remove PowerPC 601 CPUs)
Signed-off-by: BALATON Zoltan
---
target/ppc/helper.h | 2 --
target/ppc/mmu_helper.c | 24
2 files changed, 26 deletions(-)
diff --git a/target/ppc
caller allowing further restructuring.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index c4fafebbe3..47346adb88 100644
--- a/target
This function is not used from any other files so make it static and
fix the maybe used uninitialised warnings this has uncovered.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 5 +
target/ppc/mmu_common.c | 5 -
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git
The ppc_hash32_pp_prot() function in mmu-hash32.c is the same as
pp_check() in mmu_common.c. Rename the latter to ppc_pte_prot() and
merge with ppc_hash32_pp_prot() to remove duplicated code.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 2 +-
target/ppc/mmu-hash32.c | 47
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 147 +++-
1 file changed, 56 insertions(+), 91 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index ce1cf5cb77..ad64ec1647 100644
--- a/target/ppc/mmu_common.c
+++ b
Instead of putting a large block of code in an if, invert the
condition and return early to be able to deindent the code block.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 319
1 file changed, 159 insertions(+), 160 deletions(-)
diff
This function is similar to mmubooke_get_physical_address() and can be
simplified the same way.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc
Introduce ppc_booke_xlate() to handle BookE and BookE 2.06 cases to
reduce ppc_jumbo_xlate() further.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 180 ++--
1 file changed, 138 insertions(+), 42 deletions(-)
diff --git a/target/ppc
This function just does two assignments and and unnecessary check that
is always true so inline it in the only caller left and remove it.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 26 +++---
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a
re as well that yields the same result. This also makes
these calls the same as the data access branch further down.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
i
Rename to ppc6xx_tlb_get_bat() to match other similar names in the
same file.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 47346adb88..1fbf5a1bb0 100644
After previous changes the hypercall handling in 7xx and 74xx
exception handlers can be folded into one if statement to simplify
this code. Also add "unlikely" to mark the less frequently used branch
for the compiler.
Signed-off-by: BALATON Zoltan
Reviewed-by: Harsh Prateek Bora
---
This type is only used within mmu_common.c. Move its definition from
internal.h to there.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 12
target/ppc/mmu_common.c | 11 +++
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/target/ppc/internal.h
BookE does not have real mode so split off and handle it first in
get_physical_address_wtlb() before checking for real mode for other
MMU models.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target
The default case will catch this and abort the same way and there is
still a warning about it in ppc_tlb_invalidate_all() so drop these
from mmu_common.c to simplify this code.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 9 -
1 file changed, 9 deletions(-)
diff --git a
Fix several qemu_log_mask() calls that are misindented.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 42 -
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 5cb550da7e
In get_physical_address_wtlb() the real_mode flag depends on either
the MSR[IR] or MSR[DR] bit depending on access_type. Extract just the
needed bit in a more straight forward way instead of doing unnecessary
computation.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 6 --
1
is in the exception handlers.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/excp_helper.c | 43 ++--
target/ppc/translate.c | 6 ++
2 files changed, 4 insertions(+), 45 deletions(-)
diff --git a/target/ppc/excp_helper.c b/t
mentioned above may be renaming monitor_puts to something that tells
it's a low level function (and add a momitor_puts that behaves as
expected) but I can't come up with a name either. Maybe the low level
function could be called hmp_putt? Or add a comment near monitor_puts to
explain this for now.
Regards,
BALATON Zoltan
On Wed, 24 Apr 2024, BALATON Zoltan wrote:
On Wed, 24 Apr 2024, Markus Armbruster wrote:
Philippe Mathieu-Daudé writes:
Replace qemu_printf() by monitor_printf() / monitor_puts() in monitor.
Why? Here's my attempt at an answer: because this runs only within HMP
command "info tl
'
It seems to actually be commit a2e1753b8054344f32cf94f31c6399a58794a380
Regards,
BALATON Zoltan
After previous changes the hypercall handling in 7xx and 74xx
exception handlers can be folded into one if statement to simplify
this code. Also add "unlikely" to mark the less frequently used branch
for the compiler.
Signed-off-by: BALATON Zoltan
Reviewed-by: Harsh Prateek Bora
---
BookE does not have real mode so split off and handle it first in
get_physical_address_wtlb() before checking for real mode for other
MMU models.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/target
This type is only used within mmu_common.c. Move its definition from
internal.h to there.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 12
target/ppc/mmu_common.c | 11 +++
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/target/ppc/internal.h
The ppc_hash32_pp_prot() function in mmu-hash32.c is the same as
pp_check() in mmu_common.c. Rename the latter to ppc_pte_prot() and
merge with ppc_hash32_pp_prot() to remove duplicated code.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 2 +-
target/ppc/mmu-hash32.c | 47
This function is not used from any other files so make it static and
fix the maybe used uninitialised warnings this has uncovered.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 5 +
target/ppc/mmu_common.c | 5 -
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 147 +++-
1 file changed, 56 insertions(+), 91 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index d61c41d8c9..b76611da80 100644
--- a/target/ppc/mmu_common.c
+++ b
The default case will catch this and abort the same way and there is
still a warning about it in ppc_tlb_invalidate_all() so drop these
from mmu_common.c to simplify this code.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 9 -
1 file changed, 9 deletions(-)
diff --git a
Introduce ppc_booke_xlate() to handle BookE and BookE 2.06 cases to
reduce ppc_jumbo_xlate() further.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 180 ++--
1 file changed, 138 insertions(+), 42 deletions(-)
diff --git a/target/ppc
since tha last series. Please review.
v2:
- Fix user mode issue in patch 1 by keeping old behaviour for user mode
- Add some more MMU clean up patches
Regards,
BALATON Zoltan
BALATON Zoltan (28):
target/ppc: Fix gen_sc to use correct nip
target/ppc: Move patching nip from exception handle
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index fab86a8f3e..760e4072b2 100644
--- a/target/ppc/mmu_common.c
+++ b/target/ppc
In mmubooke206_check_tlb() prot2 is calculated first but only used
after an unrelated check that can return before tha value is used.
Move the calculation after the check, closer to where it is used, to
keep them together and avoid computing it when not needed.
Signed-off-by: BALATON Zoltan
In get_physical_address_wtlb() the real_mode flag depends on either
the MSR[IR] or MSR[DR] bit depending on access_type. Extract just the
needed bit in a more straight forward way instead of doing unnecessary
computation.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 6 --
1
This function just does two assignments and and unnecessary check that
is always true so inline it in the only caller left and remove it.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 26 +++---
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a
This flag for split instruction/data TLBs is only set for 6xx soft TLB
MMU model and not used otherwise so no need to have a separate flag
for that.
Signed-off-by: BALATON Zoltan
---
hw/ppc/pegasos2.c| 2 +-
target/ppc/cpu.h | 1 -
target/ppc/cpu_init.c| 19
This function is similar to mmubooke_get_physical_address() and can be
simplified the same way.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 28 ++--
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc
The real mode handling is identical in the remaining switch cases.
Split off these common real mode cases into a separate conditional to
leave only the else branches in the switch that are different.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 34
ge it.
[balaton: added commit message]
Signed-off-by: BALATON Zoltan
---
target/ppc/excp_helper.c | 2 +-
target/ppc/translate.c | 6 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 92fe535815..5aa84bccd2 100644
--- a/t
Fix several qemu_log_mask() calls that are misindented.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 42 -
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index ebf18a751c
This function is no longer called for BookE MMU model so remove parts
related to it. This has uncovered a few may be used uninitialised
warnings that are also fixed.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 25 +
1 file changed, 5 insertions(+), 20
Rename to ppc6xx_tlb_get_bat() to match other similar names in the
same file.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index ef1669b01d..a069e4083f 100644
re as well that yields the same result. This also makes
these calls the same as the data access branch further down.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
i
In mmubooke_check_tlb() prot2 is calculated first but only used after
an unrelated check that can return before tha value is used. Move the
calculation after the check, closer to where it is used, to keep them
together and avoid computing it when not needed.
Signed-off-by: BALATON Zoltan
The helper_rac function is defined but not used, remove it.
Fixes: 005b69fdcc (target/ppc: Remove PowerPC 601 CPUs)
Signed-off-by: BALATON Zoltan
---
target/ppc/helper.h | 2 --
target/ppc/mmu_helper.c | 24
2 files changed, 26 deletions(-)
diff --git a/target/ppc
In mmubooke_check_tlb() and mmubooke206_check_tlb() we can assign the
value directly the the destination, no need to have a separate local
variable for it.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 30 +-
1 file changed, 13 insertions(+), 17
Several 4xx related CPUs have the same TLB settings. Split it off in a
common function in cpu_init.
Signed-off-by: BALATON Zoltan
---
target/ppc/cpu_init.c | 46 ---
1 file changed, 17 insertions(+), 29 deletions(-)
diff --git a/target/ppc/cpu_init.c b
caller allowing further restructuring.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 98730035b1..ef1669b01d 100644
--- a/target
Instead of putting a large block of code in an if, invert the
condition and return early to be able to deindent the code block.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 319
1 file changed, 159 insertions(+), 160 deletions(-)
diff
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 300
1 file changed, 150 insertions(+), 150 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index b76611da80..204b8af455 100644
--- a/target/ppc/mmu_common.c
+++ b
is in the exception handlers.
Signed-off-by: BALATON Zoltan
---
target/ppc/excp_helper.c | 43 ++--
target/ppc/translate.c | 15 ++
2 files changed, 8 insertions(+), 50 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
This macro can be used to abbreviate PAGE_READ | PAGE_WRITE | PAGE_EXEC
for which PAGE_RWX is a better name and renaming it also shows it is
not related to TARGET_PAGE_BITS.
Signed-off-by: BALATON Zoltan
---
accel/tcg/user-exec.c | 2 +-
bsd-user/mmap.c| 6 +++---
include/exec
On Sun, 5 May 2024, Dr. David Alan Gilbert wrote:
I think it's use was removed by
Commit 5883d8b296 ("mmu-hash*: Don't use full ppc_hash{32,
64}_translate() path for get_phys_page_debug()")
Signed-off-by: Dr. David Alan Gilbert
Reviewed-by: BALATON Zoltan
---
target/
not sure I got some of your
requests so that may need another round.
Regards,
BALATON Zoltan
On Tue, 7 May 2024, Nicholas Piggin wrote:
On Thu May 2, 2024 at 9:43 AM AEST, BALATON Zoltan wrote:
This series does some further clean up mostly around BookE MMU to
untangle it from other MMU models. It also contains some other changes
that I've come up with while working on this. The fi
On Tue, 7 May 2024, Nicholas Piggin wrote:
On Thu May 2, 2024 at 9:43 AM AEST, BALATON Zoltan wrote:
This function is not used from any other files so make it static and
fix the maybe used uninitialised warnings this has uncovered.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h
ninit warnings but I'm not sure it
would.
Regards,
BALATON Zoltan
On Tue, 7 May 2024, Nicholas Piggin wrote:
On Thu May 2, 2024 at 9:43 AM AEST, BALATON Zoltan wrote:
This flag for split instruction/data TLBs is only set for 6xx soft TLB
MMU model and not used otherwise so no need to have a separate flag
for that.
Signed-off-by: BALATON Zoltan
---
hw/ppc
On Tue, 7 May 2024, Nicholas Piggin wrote:
On Thu May 2, 2024 at 9:43 AM AEST, BALATON Zoltan wrote:
This function is no longer called for BookE MMU model so remove parts
related to it. This has uncovered a few may be used uninitialised
warnings that are also fixed.
Signed-off-by: BALATON
-by: BALATON Zoltan
Reviwed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 36 +---
1 file changed, 17 insertions(+), 19 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 4fde7fd3bf..f79e390306 100644
--- a/target/ppc
e for easier review.
v3:
- Address review comments from Nick
- Rebase on master
- Squashed some patches together
- Add some more patches I've done since last version
v2:
- Fix user mode issue in patch 1 by keeping old behaviour for user mode
- Add some more MMU clean up patches
Regards,
BALA
is in the exception handlers.
Signed-off-by: BALATON Zoltan
---
target/ppc/excp_helper.c | 43 ++--
target/ppc/translate.c | 15 ++
2 files changed, 8 insertions(+), 50 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
In get_physical_address_wtlb() the real_mode flag depends on either
the MSR[IR] or MSR[DR] bit depending on access_type. Extract just the
needed bit in a more straight forward way instead of doing unnecessary
computation.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target
ge it.
[balaton: added commit message]
Signed-off-by: BALATON Zoltan
---
target/ppc/excp_helper.c | 2 +-
target/ppc/translate.c | 6 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 92fe535815..5aa84bccd2 100644
--- a/t
After previous changes the hypercall handling in 7xx and 74xx
exception handlers can be folded into one if statement to simplify
this code. Also add "unlikely" to mark the less frequently used branch
for the compiler.
Signed-off-by: BALATON Zoltan
Reviewed-by: Harsh Prateek Bora
---
The default case will catch this and abort the same way and there is
still a warning about it in ppc_tlb_invalidate_all() so drop these
from mmu_common.c to simplify this code.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 9 -
1 file changed
Move the debug logging within ppc6xx_tlb_check() from after its only
call to simplify the caller.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 55 +++--
1 file changed, 26 insertions(+), 29 deletions(-)
diff --git a/target/ppc/mmu_common.c b
The helper_rac function is defined but not used, remove it.
Fixes: 005b69fdcc (target/ppc: Remove PowerPC 601 CPUs)
Signed-off-by: BALATON Zoltan
Reviwed-by: Nicholas Piggin
---
target/ppc/helper.h | 2 --
target/ppc/mmu_helper.c | 24
2 files changed, 26
Move setting error_code that appears in every case out in front and
hoist the common fall through case for BOOKE206 as well which allows
removing the nested switches.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 41 -
1 file changed, 12
Introduce ppc_booke_xlate() to handle BookE and BookE 2.06 cases to
reduce ppc_jumbo_xlate() further.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 128 +---
1 file changed, 92 insertions(+), 36 deletions(-)
diff --git a/target/ppc/mmu_common.c
The value is only used once so no need to introduce a local variable
for it.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu-radix64.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c
index 8daf71d2db..395ce3b782
re as well that yields the same result. This also makes
these calls the same as the data access branch further down.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/ppc/mmu_common
The real mode handling is identical in the remaining switch cases.
Split off these common real mode cases into a separate conditional to
leave only the else branches in the switch that are different.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 34
slightly lower performance.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 35
target/ppc/mmu-hash32.c | 45 -
target/ppc/mmu_common.c | 44 ++--
3 files changed, 37 insertions
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 226
1 file changed, 113 insertions(+), 113 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 04e5ad661d..a6e7b64049 100644
--- a/target/ppc/mmu_common.c
+++ b
caller allowing further restructuring.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index aa137123a4..181273579b 100644
--- a/target/ppc
Fix several qemu_log_mask() calls that are misindented.
Signed-off-by: BALATON Zoltan
Acked-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 42 -
1 file changed, 20 insertions(+), 22 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc
Instead of putting a large block of code in an if, invert the
condition and return early to be able to deindent the code block.
Signed-off-by: BALATON Zoltan
Acked-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 319
1 file changed, 159 insertions
In mmubooke_check_tlb() and mmubooke206_check_tlb() we can assign the
value directly the the destination, no need to have a separate local
variable for it.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 30 +-
1 file changed
This function just does two assignments and and unnecessary check that
is always true so inline it in the only caller left and remove it.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 26 +++---
1 file changed, 3 insertions(+), 23
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 7283eafe27..9793e6d282 100644
--- a/target/ppc
As BookE never returns -4 we can drop BookE from the direct store case
in ppc_jumbo_xlate().
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index 87cac12d68
Merge the code fetch and data access cases in a common switch.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 50 +
1 file changed, 20 insertions(+), 30 deletions(-)
diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c
index
Return directly, which is simpler than dragging a return value through
multpile if and else blocks.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 84 +++--
1 file changed, 39 insertions(+), 45 deletions(-)
diff --git a/target/ppc/mmu_common.c b
This function is not used from any other files so make it static and
fix the maybe used uninitialised warnings this has uncovered. Also
remove mmu_ctx_t definition from internal.h as this type is only used
within this file.
Signed-off-by: BALATON Zoltan
---
target/ppc/internal.h | 17
Several 4xx CPUs and e200 share the same TLB settings enclosed in an
ifdef. Split it off in a common function to reduce code duplication
and the number of ifdefs.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/cpu_init.c | 46
In mmu6xx_get_physical_address() we have a large if block with a two
line else branch that effectively returns. Invert the condition and
move the else there to allow deindenting the large if block to make
the flow easier to follow.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 71
This function is similar to mmubooke_get_physical_address() and can be
simplified the same way.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 26 +-
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/target/ppc
BookE does not have real mode so split off and handle it first in
get_physical_address_wtlb() before checking for real mode for other
MMU models.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
target/ppc/mmu_common.c | 14 +++---
1 file changed, 7 insertions(+), 7
that this assumption holds.
Signed-off-by: BALATON Zoltan
---
target/ppc/cpu_init.c| 4
target/ppc/internal.h| 20 ++--
target/ppc/mmu-hash32.c | 6 +++---
target/ppc/mmu-hash64.c | 2 +-
target/ppc/mmu-radix64.c | 2 +-
target/ppc/mmu_common.c | 26
This function is no longer called for BookE MMU model so remove parts
related to it. This has uncovered a few may be used uninitialised
warnings that are also fixed.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu_common.c | 25 +
1 file changed, 5 insertions(+), 20
This flag for split instruction/data TLBs is only set for 6xx soft TLB
MMU model and not used otherwise so no need to have a separate flag
for that.
Signed-off-by: BALATON Zoltan
Reviewed-by: Nicholas Piggin
---
hw/ppc/pegasos2.c| 2 +-
target/ppc/cpu.h | 1 -
target/ppc
makes these checks using it similar to other
places with such checks.
Signed-off-by: BALATON Zoltan
---
target/ppc/mmu-hash32.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c
index 960751a50e..b5d7aeed4e 100644
--- a
On Wed, 8 May 2024, Nicholas Piggin wrote:
On Wed May 8, 2024 at 10:14 AM AEST, BALATON Zoltan wrote:
Most exceptions are raised with nip pointing to the faulting
instruction but the sc instruction generating a syscall exception
leaves nip pointing to next instruction. Fix gen_sc to not use
401 - 500 of 4624 matches
Mail list logo