From patchwork Fri May 31 13:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 165536 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp790069ili; Fri, 31 May 2019 06:59:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOCE2C27Cjwye2ZmC4KeEBnnt1ukVBy9xewd/KNCEMtUFTHD6SHOCIUa6b9egyePhTYJFN X-Received: by 2002:aed:2bc1:: with SMTP id e59mr8506825qtd.7.1559311197526; Fri, 31 May 2019 06:59:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559311197; cv=none; d=google.com; s=arc-20160816; b=NaST1A84i0tbKxJkYFvvF4jPEQ5E70+xH5cxB5sr6KDNmcEXy3qzr82SHlItqPnvxe xVbigFcIBQEGn2i9DlMphPJVAIyfEHOsXrrjt509SN9th9rreh0WgJEYT4y5KqndIDpE wZrbOX73qTTcmdmIKTnqci/fJ63B3nRl7fFdOIMhPRw9j1uDrHW5fydGLgZztDZ+dV+I Y88Ph1THKniBEgY0uRppnx2JZYhKRiUBfKPephivHiJRuMwTKtVguQMCfPhjctDLwoGX J/hvvvLXtbDwCDxeGw0SGfgWrX7SIGVO+fV/dk3fd8kCfzV2RC5oUmQDOR2N+O/+a0wM TusA== 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:dkim-signature; bh=YB1fZJoA1Y1wxrdEJayHVTCzPLNtdm/r4TsjTEPf7eE=; b=VWYAQh2oxw1UZTDxijy8amyniVzNAxs1Tf7oLveIsrC8gGudMFvoqYsqTGjwDdy4KI 25XVm5qUdj+fOiK/dzDdfTbtTrtY+D1F8PD4+p/OYNbORoZBfjLuQ0nDBSEy1tZr6HT8 adE+FeBj7mqlq9qqhcUZ5Ll8nGvcIeJ16cPTYyFpiI1R9YhpNPMmThsMnbJcJG2X+Py6 E5rfY8x8TwwdTI319d7gWlzvv/dI+eCci960dlcKgD0ww+ctiFNq56NDL2A1ghG2vss1 diQQWbA/uKZUmrgI1QVFJwOopLIIKUa41aQAnSyIbCi6D/pYZuyvoKZk7QGtAxtVkzqQ rBhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ClBMu1OW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r1si729760qtp.91.2019.05.31.06.59.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 31 May 2019 06:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ClBMu1OW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:44000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWi4a-0003Mg-VC for patch@linaro.org; Fri, 31 May 2019 09:59:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWhoo-0007To-92 for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWhon-0000MH-6d for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:38 -0400 Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:36236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWhon-0000Ld-1k for qemu-devel@nongnu.org; Fri, 31 May 2019 09:43:37 -0400 Received: by mail-oi1-x244.google.com with SMTP id y124so7752308oiy.3 for ; Fri, 31 May 2019 06:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YB1fZJoA1Y1wxrdEJayHVTCzPLNtdm/r4TsjTEPf7eE=; b=ClBMu1OWQAARMpVvZL7Q/VGJg+5q+D9y3XnpQ4py2CUIPPLS/RsNpHLuzJY3z4d34r NjuKP7scorreohOVQ6P+mboO7UKOvNHq/1XhFiQaA22Sba2Oyo6Cx2W0HOAGlp/KJxo/ 3TCeH4ydSzBVYgEmLTjqjcuUK9HgrMqn8R2xYoOdMCErSugO9J2dxwddwVtJeVBSSl6N mqKsLBb1DAVl6b54BOk4TPNw6KG61B5k7IxJlCj+ruAupyGGcMZdCgyksIsfVN6HdIad NNY0X95N+KLzdtYpPCIldKyFXzmlfFH5s7OMqBI0t02YxhSJlcxALS4M77cWf1Uyb4gB l+cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YB1fZJoA1Y1wxrdEJayHVTCzPLNtdm/r4TsjTEPf7eE=; b=RnjKwI37gjeDPAVZzZbCDdi39cj/hAKYP0O0uQ3Mpi3rjJPajQ2B4FUmQaPzsMGp0+ voTS0evbg1dCeQ2wjVaRNC/j9+xOx9XRIxvT9X2yFY/bPjVd2WUXMNGBcgvk8Tl6PRc4 /NxWzeMBORG48uFd4T2zu1xVRw39jfRZlfDvcB391g598rVUDznMyMsph82es/84vHhA 1jiWRqBpmp0mkTd0OBb3AzyasQd//Rfi4ahQeAaXnrRRuTsId7nDL2Tk/ApDf9lpAgUw O3QvEJDYJd4S5guv57Fo/PjR31SHFI+uhk9eEb64h9ShFEGil63EWGDz0YmgjVTi0pjX rbvQ== X-Gm-Message-State: APjAAAUf1WUnMacKv2EQ9LvznSmx+52RrZWTexKx8+PHqX7FwrHqRze2 smVN1zQ9J62X+WHYeIXVYEfBKb0laVIWQQ== X-Received: by 2002:aca:b444:: with SMTP id d65mr670402oif.102.1559310216164; Fri, 31 May 2019 06:43:36 -0700 (PDT) Received: from localhost.localdomain (168.189-204-159.bestelclientes.com.mx. [189.204.159.168]) by smtp.gmail.com with ESMTPSA id r23sm2391176otg.49.2019.05.31.06.43.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 06:43:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 31 May 2019 08:43:03 -0500 Message-Id: <20190531134315.4109-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190531134315.4109-1-richard.henderson@linaro.org> References: <20190531134315.4109-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::244 Subject: [Qemu-devel] [PATCH v16 11/23] target/rx: Convert to CPUClass::tlb_fill X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, ysato@users.sourceforge.jp Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- target/rx/cpu.c | 14 ++++++++++++++ target/rx/op_helper.c | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) -- 2.17.1 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); -}