qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: ysato@users.sourceforge.jp
Subject: Re: [Qemu-devel] [PATCH v14 11/13] target/rx: Convert to CPUClass::tlb_fill
Date: Fri, 17 May 2019 09:26:34 +0200	[thread overview]
Message-ID: <241b5521-877a-0df3-78f2-cf50c40a8215@redhat.com> (raw)
In-Reply-To: <20190517045136.3509-12-richard.henderson@linaro.org>

On 5/17/19 6:51 AM, Richard Henderson wrote:
> The interface for tlb_fill has changed very recently.
> Move the function into cpu.c so that it may be static
> while assigning to the CPUClass methods.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  target/rx/cpu.c       | 14 ++++++++++++++
>  target/rx/op_helper.c | 11 -----------
>  2 files changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/target/rx/cpu.c b/target/rx/cpu.c
> index 4b96f2e463..3268077d08 100644
> --- a/target/rx/cpu.c
> +++ b/target/rx/cpu.c
> @@ -143,6 +143,19 @@ static void rx_cpu_disas_set_info(CPUState *cpu, disassemble_info *info)
>      info->print_insn = print_insn_rx;
>  }
>  
> +static bool rx_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
> +                            MMUAccessType access_type, int mmu_idx,
> +                            bool probe, uintptr_t retaddr)
> +{
> +    uint32_t address, physical, prot;
> +
> +    /* Linear mapping */
> +    address = physical = addr & TARGET_PAGE_MASK;
> +    prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
> +    tlb_set_page(cs, address, physical, prot, mmu_idx, TARGET_PAGE_SIZE);
> +    return true;
> +}
> +
>  static void rx_cpu_init(Object *obj)
>  {
>      CPUState *cs = CPU(obj);
> @@ -177,6 +190,7 @@ static void rxcpu_class_init(ObjectClass *klass, void *data)
>      cc->get_phys_page_debug = rx_cpu_get_phys_page_debug;
>      cc->disas_set_info = rx_cpu_disas_set_info;
>      cc->tcg_initialize = rx_translate_init;
> +    cc->tlb_fill = rx_cpu_tlb_fill;
>  
>      cc->gdb_num_core_regs = 26;
>  }
> diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c
> index 9a460070e9..fb7ae3c3ec 100644
> --- a/target/rx/op_helper.c
> +++ b/target/rx/op_helper.c
> @@ -468,14 +468,3 @@ void QEMU_NORETURN helper_rxbrk(CPURXState *env)
>  {
>      raise_exception(env, 0x100, 0);
>  }
> -
> -void tlb_fill(CPUState *cs, target_ulong addr, int size,
> -              MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
> -{
> -    uint32_t address, physical, prot;
> -
> -    /* Linear mapping */
> -    address = physical = addr & TARGET_PAGE_MASK;
> -    prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
> -    tlb_set_page(cs, address, physical, prot, mmu_idx, TARGET_PAGE_SIZE);
> -}
> 


  reply	other threads:[~2019-05-17  7:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17  4:51 [Qemu-devel] [PATCH v14 00/13] RX architecture support Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 01/13] target/rx: TCG translation Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 02/13] target/rx: TCG helper Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 03/13] target/rx: CPU definition Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 04/13] target/rx: RX disassembler Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 05/13] hw/intc: RX62N interrupt controller (ICUa) Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 06/13] hw/timer: RX62N internal timer modules Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 07/13] hw/char: RX62N serial communication interface (SCI) Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 08/13] hw/rx: RX Target hardware definition Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 09/13] qemu/bitops.h: Add extract8 and extract16 Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 10/13] hw/registerfields.h: Add 8bit and 16bit register macros Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 11/13] target/rx: Convert to CPUClass::tlb_fill Richard Henderson
2019-05-17  7:26   ` Philippe Mathieu-Daudé [this message]
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 12/13] Add rx-softmmu Richard Henderson
2019-05-17  4:51 ` [Qemu-devel] [PATCH v14 13/13] MAINTAINERS: Add RX Richard Henderson
2019-05-17  8:00 ` [Qemu-devel] [PATCH v14 00/13] RX architecture support Philippe Mathieu-Daudé
2019-05-17 15:27   ` Richard Henderson

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=241b5521-877a-0df3-78f2-cf50c40a8215@redhat.com \
    --to=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=ysato@users.sourceforge.jp \
    /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).