All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()
@ 2021-01-27 22:42 Philippe Mathieu-Daudé
  2021-01-27 22:42 ` [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition Philippe Mathieu-Daudé
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-27 22:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bastian Koppelmann, Richard Henderson,
	Philippe Mathieu-Daudé,
	Joe Komlodi, David Brenken, Andreas Konopik

Taking notes while reviewing commit 671a0a1265a
("use MMUAccessType instead of int in mmu_translate").

Philippe Mathieu-Daudé (3):
  target/tricore: Replace magic value by MMU_DATA_LOAD definition
  target/tricore: Pass MMUAccessType to get_physical_address()
  target/tricore: Remove unused definitions

 target/tricore/cpu.h    | 12 ------------
 target/tricore/helper.c |  9 ++++-----
 2 files changed, 4 insertions(+), 17 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition
  2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
@ 2021-01-27 22:42 ` Philippe Mathieu-Daudé
  2021-02-10 12:00   ` Bastian Koppelmann
  2021-01-27 22:42 ` [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-27 22:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bastian Koppelmann, Richard Henderson,
	Philippe Mathieu-Daudé,
	Joe Komlodi, David Brenken, Andreas Konopik

cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/tricore/helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/tricore/helper.c b/target/tricore/helper.c
index 77152932630..81171db833b 100644
--- a/target/tricore/helper.c
+++ b/target/tricore/helper.c
@@ -50,7 +50,8 @@ hwaddr tricore_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
     int prot;
     int mmu_idx = cpu_mmu_index(&cpu->env, false);
 
-    if (get_physical_address(&cpu->env, &phys_addr, &prot, addr, 0, mmu_idx)) {
+    if (get_physical_address(&cpu->env, &phys_addr, &prot, addr,
+                             MMU_DATA_LOAD, mmu_idx)) {
         return -1;
     }
     return phys_addr;
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address()
  2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
  2021-01-27 22:42 ` [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition Philippe Mathieu-Daudé
@ 2021-01-27 22:42 ` Philippe Mathieu-Daudé
  2021-02-10 12:09   ` Bastian Koppelmann
  2021-01-27 22:42 ` [PATCH 3/3] target/tricore: Remove unused definitions Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-27 22:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bastian Koppelmann, Richard Henderson,
	Philippe Mathieu-Daudé,
	Joe Komlodi, David Brenken, Andreas Konopik

'int access_type' and ACCESS_INT are unused, drop them.
Provide the mmu_idx argument to match other targets.
'int rw' is actually the MMUAccessType, rename it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/tricore/helper.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target/tricore/helper.c b/target/tricore/helper.c
index 81171db833b..c5e997f3215 100644
--- a/target/tricore/helper.c
+++ b/target/tricore/helper.c
@@ -33,7 +33,7 @@ enum {
 #if defined(CONFIG_SOFTMMU)
 static int get_physical_address(CPUTriCoreState *env, hwaddr *physical,
                                 int *prot, target_ulong address,
-                                int rw, int access_type)
+                                MMUAccessType access_type, int mmu_idx)
 {
     int ret = TLBRET_MATCH;
 
@@ -72,13 +72,11 @@ bool tricore_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
     CPUTriCoreState *env = &cpu->env;
     hwaddr physical;
     int prot;
-    int access_type;
     int ret = 0;
 
     rw &= 1;
-    access_type = ACCESS_INT;
     ret = get_physical_address(env, &physical, &prot,
-                               address, rw, access_type);
+                               address, rw, mmu_idx);
 
     qemu_log_mask(CPU_LOG_MMU, "%s address=" TARGET_FMT_lx " ret %d physical "
                   TARGET_FMT_plx " prot %d\n",
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] target/tricore: Remove unused definitions
  2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
  2021-01-27 22:42 ` [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition Philippe Mathieu-Daudé
  2021-01-27 22:42 ` [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
@ 2021-01-27 22:42 ` Philippe Mathieu-Daudé
  2021-02-10 12:10   ` Bastian Koppelmann
  2021-02-10 11:19 ` [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
  2021-02-10 12:12 ` Bastian Koppelmann
  4 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-27 22:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bastian Koppelmann, Richard Henderson,
	Philippe Mathieu-Daudé,
	Joe Komlodi, David Brenken, Andreas Konopik

Remove these confusing and unused definitions.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/tricore/cpu.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h
index b82349d1b10..4b61a2c03f8 100644
--- a/target/tricore/cpu.h
+++ b/target/tricore/cpu.h
@@ -375,18 +375,6 @@ typedef TriCoreCPU ArchCPU;
 
 #include "exec/cpu-all.h"
 
-enum {
-    /* 1 bit to define user level / supervisor access */
-    ACCESS_USER  = 0x00,
-    ACCESS_SUPER = 0x01,
-    /* 1 bit to indicate direction */
-    ACCESS_STORE = 0x02,
-    /* Type of instruction that generated the access */
-    ACCESS_CODE  = 0x10, /* Code fetch access                */
-    ACCESS_INT   = 0x20, /* Integer load/store access        */
-    ACCESS_FLOAT = 0x30, /* floating point load/store access */
-};
-
 void cpu_state_reset(CPUTriCoreState *s);
 void tricore_tcg_init(void);
 int cpu_tricore_signal_handler(int host_signum, void *pinfo, void *puc);
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()
  2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-01-27 22:42 ` [PATCH 3/3] target/tricore: Remove unused definitions Philippe Mathieu-Daudé
@ 2021-02-10 11:19 ` Philippe Mathieu-Daudé
  2021-02-10 12:12 ` Bastian Koppelmann
  4 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-10 11:19 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bastian Koppelmann, Richard Henderson, David Brenken,
	Joe Komlodi, Andreas Konopik

ping?

On 1/27/21 11:42 PM, Philippe Mathieu-Daudé wrote:
> Taking notes while reviewing commit 671a0a1265a
> ("use MMUAccessType instead of int in mmu_translate").
> 
> Philippe Mathieu-Daudé (3):
>   target/tricore: Replace magic value by MMU_DATA_LOAD definition
>   target/tricore: Pass MMUAccessType to get_physical_address()
>   target/tricore: Remove unused definitions
> 
>  target/tricore/cpu.h    | 12 ------------
>  target/tricore/helper.c |  9 ++++-----
>  2 files changed, 4 insertions(+), 17 deletions(-)
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition
  2021-01-27 22:42 ` [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition Philippe Mathieu-Daudé
@ 2021-02-10 12:00   ` Bastian Koppelmann
  0 siblings, 0 replies; 10+ messages in thread
From: Bastian Koppelmann @ 2021-02-10 12:00 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Andreas Konopik, Richard Henderson, qemu-devel, Joe Komlodi,
	David Brenken

On Wed, Jan 27, 2021 at 11:42:53PM +0100, Philippe Mathieu-Daudé wrote:
> cpu_get_phys_page_debug() uses 'DATA LOAD' MMU access type.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/tricore/helper.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address()
  2021-01-27 22:42 ` [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
@ 2021-02-10 12:09   ` Bastian Koppelmann
  0 siblings, 0 replies; 10+ messages in thread
From: Bastian Koppelmann @ 2021-02-10 12:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Andreas Konopik, Richard Henderson, qemu-devel, Joe Komlodi,
	David Brenken

On Wed, Jan 27, 2021 at 11:42:54PM +0100, Philippe Mathieu-Daudé wrote:
> 'int access_type' and ACCESS_INT are unused, drop them.
> Provide the mmu_idx argument to match other targets.
> 'int rw' is actually the MMUAccessType, rename it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/tricore/helper.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] target/tricore: Remove unused definitions
  2021-01-27 22:42 ` [PATCH 3/3] target/tricore: Remove unused definitions Philippe Mathieu-Daudé
@ 2021-02-10 12:10   ` Bastian Koppelmann
  0 siblings, 0 replies; 10+ messages in thread
From: Bastian Koppelmann @ 2021-02-10 12:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Andreas Konopik, Richard Henderson, qemu-devel, Joe Komlodi,
	David Brenken

On Wed, Jan 27, 2021 at 11:42:55PM +0100, Philippe Mathieu-Daudé wrote:
> Remove these confusing and unused definitions.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/tricore/cpu.h | 12 ------------
>  1 file changed, 12 deletions(-)
> 

Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Cheers,
Bastian


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()
  2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2021-02-10 11:19 ` [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
@ 2021-02-10 12:12 ` Bastian Koppelmann
  2021-03-09 22:46   ` Philippe Mathieu-Daudé
  4 siblings, 1 reply; 10+ messages in thread
From: Bastian Koppelmann @ 2021-02-10 12:12 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Andreas Konopik, Richard Henderson, qemu-devel, Joe Komlodi,
	David Brenken

Hi,

On Wed, Jan 27, 2021 at 11:42:52PM +0100, Philippe Mathieu-Daudé wrote:
> Taking notes while reviewing commit 671a0a1265a
> ("use MMUAccessType instead of int in mmu_translate").
> 
> Philippe Mathieu-Daudé (3):
>   target/tricore: Replace magic value by MMU_DATA_LOAD definition
>   target/tricore: Pass MMUAccessType to get_physical_address()
>   target/tricore: Remove unused definitions
> 
>  target/tricore/cpu.h    | 12 ------------
>  target/tricore/helper.c |  9 ++++-----
>  2 files changed, 4 insertions(+), 17 deletions(-)

Thanks for the cleanup. I applied it to my tricore.next queue.

Cheers,
Bastian


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()
  2021-02-10 12:12 ` Bastian Koppelmann
@ 2021-03-09 22:46   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-09 22:46 UTC (permalink / raw)
  To: Bastian Koppelmann
  Cc: David Brenken, Richard Henderson, qemu-devel, Joe Komlodi,
	Andreas Konopik

On 2/10/21 1:12 PM, Bastian Koppelmann wrote:
> Hi,
> 
> On Wed, Jan 27, 2021 at 11:42:52PM +0100, Philippe Mathieu-Daudé wrote:
>> Taking notes while reviewing commit 671a0a1265a
>> ("use MMUAccessType instead of int in mmu_translate").
>>
>> Philippe Mathieu-Daudé (3):
>>   target/tricore: Replace magic value by MMU_DATA_LOAD definition
>>   target/tricore: Pass MMUAccessType to get_physical_address()
>>   target/tricore: Remove unused definitions
>>
>>  target/tricore/cpu.h    | 12 ------------
>>  target/tricore/helper.c |  9 ++++-----
>>  2 files changed, 4 insertions(+), 17 deletions(-)
> 
> Thanks for the cleanup. I applied it to my tricore.next queue.

Thanks Bastian!

Phil.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-09 22:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 22:42 [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
2021-01-27 22:42 ` [PATCH 1/3] target/tricore: Replace magic value by MMU_DATA_LOAD definition Philippe Mathieu-Daudé
2021-02-10 12:00   ` Bastian Koppelmann
2021-01-27 22:42 ` [PATCH 2/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
2021-02-10 12:09   ` Bastian Koppelmann
2021-01-27 22:42 ` [PATCH 3/3] target/tricore: Remove unused definitions Philippe Mathieu-Daudé
2021-02-10 12:10   ` Bastian Koppelmann
2021-02-10 11:19 ` [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address() Philippe Mathieu-Daudé
2021-02-10 12:12 ` Bastian Koppelmann
2021-03-09 22:46   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.