From patchwork Fri Jun 7 09:11:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 166096 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp398739ili; Fri, 7 Jun 2019 02:30:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4ATfUKYN+/0t5zjYWyIa2DWySy4NfxENrICI7CLJ//I53PXoDk1q9JunOaSTkgXG8G2gu X-Received: by 2002:ac8:1c54:: with SMTP id j20mr19385559qtk.158.1559899800126; Fri, 07 Jun 2019 02:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559899800; cv=none; d=google.com; s=arc-20160816; b=JXQ5Hf6WJd/+9ZgMphjweMVV5pZBeJZhoxNQpMt8WFeaTOlWTe5Q65RglUdpyxgg5o 2rSusGjrU+f9r5D9UJukLsfkLKXGNYBffo8x3zv5IVp6WraevmWeENdDST933jIgHkEo KlC1DEO+PE6qiwpiJh584iDltf9WEz3+16oKat1isp13cKxSTPjHAai4zulU6u4CHdo6 Nm7Iz5WcdabwP4NG8vxjGl6pqKqDWAbVUt0Xm0CdM/XjGKhH4zw1hwsMrYc4COcHsL9P VsnhBJmVFvUk5AXsgoGBeH5bQed3A7Y7dUeZ1GfoXBQupiClI0r2ms3IAIMS0VZFhA1k Srdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=aJU+gPaVQEUhGtfuNmBUZX2bvd0GCQX2WdNbbQ+ITyI=; b=wHYnssPzrBTYREkD1xSsQw6YuTjPYYQApEvsaPWELTroJJmINaJZe08fRyTSnz23ni 0yVoxzd9CMJRS+L0fBeJ9hY/m3Gzr4vPT88e8DO/avljVvuh5v5/aamVQOveeBrppxLn b4yfOAe+sjPyZ6LPwScIJv61uwW0MBiNr/wnLBQqHuqohTMMDCCFCYifoLRP6h64Chnd r48Pi5IDl9VjoRw6eGh0ot0OP8KhnrLIpA8kmMNBimsrE2CrcQAbNm/KDorlObevfcMy 49p8o7L1eIdrY0o6FyNbQKkHoQSqsoU3uNo8B/Z5WhhjQYvvZO9Y51TjjYXY6aXQ39H4 VBBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.47]) by mx.google.com with ESMTPS id w6si248002qka.85.2019.06.07.02.30.00 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 02:30:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) client-ip=209.51.188.47; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:47490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZBCB-00070f-OW for patch@linaro.org; Fri, 07 Jun 2019 05:29:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41371) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZAuR-0000m4-6A for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZAuO-0002qX-4I for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:39 -0400 Received: from mail03.asahi-net.or.jp ([202.224.55.15]:41356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZAuN-0002ZG-O4 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:11:35 -0400 Received: from h61-195-96-97.vps.ablenet.jp (h61-195-96-97.ablenetvps.ne.jp [61.195.96.97]) (Authenticated sender: PQ4Y-STU) by mail03.asahi-net.or.jp (Postfix) with ESMTPA id 9E273495FA; Fri, 7 Jun 2019 18:11:28 +0900 (JST) Received: from yo-satoh-debian.localdomain (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by h61-195-96-97.vps.ablenet.jp (Postfix) with ESMTPSA id 54C4B240085; Fri, 7 Jun 2019 18:11:28 +0900 (JST) From: Yoshinori Sato To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 18:11:03 +0900 Message-Id: <20190607091116.49044-12-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190607091116.49044-1-ysato@users.sourceforge.jp> References: <20190607091116.49044-1-ysato@users.sourceforge.jp> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.224.55.15 Subject: [Qemu-devel] [PATCH v17 11/24] target/rx: Convert to CPUClass::tlb_fill X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Richard Henderson , Yoshinori Sato , philmd@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Yoshinori Sato --- target/rx/cpu.c | 14 ++++++++++++++ target/rx/op_helper.c | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) -- 2.11.0 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); -}