qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Mateus Martins Araujo e Castro <lucas.araujo@eldorado.org.br>
To: Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: luis.pires@eldorado.org.br, fernando.valle@eldorado.org.br,
	matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au
Subject: Re: [PATCH v3 2/4] target/ppc: divided mmu_helper.c in 2 files
Date: Wed, 14 Jul 2021 08:23:47 -0300	[thread overview]
Message-ID: <592e6dc1-5c06-6d0c-d524-51c9af81a8e8@eldorado.org.br> (raw)
In-Reply-To: <0f225dcb-5d25-a672-9da3-dc39dca70d8c@linaro.org>


On 08/07/2021 15:09, Richard Henderson wrote:

> On 7/8/21 9:49 AM, Lucas Mateus Castro (alqotel) wrote:
>> +++ b/target/ppc/cpu.h
>> @@ -1327,6 +1327,26 @@ void store_40x_dbcr0(CPUPPCState *env, 
>> uint32_t val);
>>   void store_40x_sler(CPUPPCState *env, uint32_t val);
>>   void store_booke_tcr(CPUPPCState *env, target_ulong val);
>>   void store_booke_tsr(CPUPPCState *env, target_ulong val);
>> +typedef struct mmu_ctx_t mmu_ctx_t;
>> +bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type,
>> +                      hwaddr *raddrp, int *psizep, int *protp,
>> +                      int mmu_idx, bool guest_visible);
>> +int ppcmas_tlb_check(CPUPPCState *env, ppcmas_tlb_t *tlb,
>> +                            hwaddr *raddrp, target_ulong address,
>> +                            uint32_t pid);
>> +int ppcemb_tlb_check(CPUPPCState *env, ppcemb_tlb_t *tlb,
>> +                            hwaddr *raddrp,
>> +                            target_ulong address, uint32_t pid, int 
>> ext,
>> +                            int i);
>> +int get_physical_address_wtlb(CPUPPCState *env, mmu_ctx_t *ctx,
>> +                                     target_ulong eaddr,
>> +                                     MMUAccessType access_type, int 
>> type,
>> +                                     int mmu_idx);
>> +hwaddr booke206_tlb_to_page_size(CPUPPCState *env,
>> +                                        ppcmas_tlb_t *tlb);
>> +/* Software driven TLB helpers */
>> +int ppc6xx_tlb_getnum(CPUPPCState *env, target_ulong eaddr,
>> +                                    int way, int is_code);
>
> Why are any of these going into cpu.h?
> Surely they are not used outside of target/ppc/.
At first I divided between internal.h and cpu.h based on what I thought 
really shouldn't be used outside target/ppc, but looking back my logic 
was flawed since all of this was inside mmu_helper.c, so it was only 
visible inside mmu_helper.c, therefore none of it should be used outside 
target/ppc. I'll fix this in the next version.
>
>
> r~


  reply	other threads:[~2021-07-14 11:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 16:49 [PATCH v3 0/4] target/ppc: MMU clean up Lucas Mateus Castro (alqotel)
2021-07-08 16:49 ` [PATCH v3 1/4] target/ppc: Don't compile ppc_tlb_invalid_all without TCG Lucas Mateus Castro (alqotel)
2021-07-09  0:44   ` David Gibson
2021-07-08 16:49 ` [PATCH v3 2/4] target/ppc: divided mmu_helper.c in 2 files Lucas Mateus Castro (alqotel)
2021-07-08 18:09   ` Richard Henderson
2021-07-14 11:23     ` Lucas Mateus Martins Araujo e Castro [this message]
2021-07-14 17:04       ` Lucas Mateus Martins Araujo e Castro
2021-07-08 16:49 ` [PATCH v3 3/4] target/ppc: moved ppc_store_sdr1 to mmu_common.c Lucas Mateus Castro (alqotel)
2021-07-08 16:49 ` [PATCH v3 4/4] target/ppc: moved store_40x_sler to helper_regs.c Lucas Mateus Castro (alqotel)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=592e6dc1-5c06-6d0c-d524-51c9af81a8e8@eldorado.org.br \
    --to=lucas.araujo@eldorado.org.br \
    --cc=david@gibson.dropbear.id.au \
    --cc=fernando.valle@eldorado.org.br \
    --cc=luis.pires@eldorado.org.br \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).