From patchwork Fri May 17 04:51:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 164391 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1704822ili; Thu, 16 May 2019 21:56:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOrJ0N2VLYD28F5lbw+Dmlb7O8UbGKKTUGW41W+Y21c0j8wh8h/PSuCFMg3f73JjO0q97+ X-Received: by 2002:a17:906:6051:: with SMTP id p17mr42320475ejj.243.1558068979879; Thu, 16 May 2019 21:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558068979; cv=none; d=google.com; s=arc-20160816; b=ighL8aIIYY2iQdt/oqRmsYymqhJjt3jzilEiw6LfV8QQ+7CnbaePw+GUFkgaHIa39y XBRhRJuCdGRpfIRyWlIGdHFhFfY1PKgutkRiltEQCo2+XyCOYlegIThpZmmk5d2edpyB N8vYdJwQQ5hFaOz8I/JJtca/SAgsna4RLvtD2Y1/oAhvp7Hg+PP1i0rdjLsII6+tE9Zx F02nwMmjUbQ/rIGzCjieHLYCUEl/UkqEaULKzoP397QBii2/DTlaNVXUGureLNh2cQn6 8CzGjQNotEnwOjfx6HoKuK4cfvM+MnI6i3ySnbkaP5lQlg1cyHLUekfMHX4+xn6o+PO1 7m7w== 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:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=p+U5vIBnOjLXY8VPVNTFWspmy+sk8WL3JV5On5zCYGA=; b=tsrxhnXqrBalCpNCszbpkK/q0hwUhN0rDWxzwUrytPkMF+EPHDY07iAfnEPnR4ZNkc HYfPA/8OsiCbhrDwLDJ8M+/CMChJwwccyElLWFbiwDULg3WwBeFIDAALgh4J/0+XQhvI 4Fso+3zlQkSTKfCi/oAwlkaWV5+abw55i4PueM+6XVojo9vMalZBjQQQ1JUJLBmjmyDc 1G2LNZODihNr/5RgXVJR/tfFRm9iwj1T317lj2sc5QIaa/oFtiKkhyWlPM5+KKqQ3369 OhAB63ifDsz5TqK6JL8wcFkBJheufjE0eM+0hCEsPlPcXvrh5KkFCRVzF7q4J+FVpPSc u0sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=A3LOidZH; 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 96si643464edq.250.2019.05.16.21.56.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 16 May 2019 21:56:19 -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=A3LOidZH; 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]:42312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRUuo-0001dw-Mc for patch@linaro.org; Fri, 17 May 2019 00:56:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRUqX-0006Dx-QJ for qemu-devel@nongnu.org; Fri, 17 May 2019 00:51:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRUqW-0007nr-SC for qemu-devel@nongnu.org; Fri, 17 May 2019 00:51:53 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:46646) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRUqW-0007n1-DA for qemu-devel@nongnu.org; Fri, 17 May 2019 00:51:52 -0400 Received: by mail-pg1-x543.google.com with SMTP id t187so2654838pgb.13 for ; Thu, 16 May 2019 21:51:52 -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; bh=p+U5vIBnOjLXY8VPVNTFWspmy+sk8WL3JV5On5zCYGA=; b=A3LOidZH4y9vx21PQgSSS0/bjErJS/Ie/xxo9a1i478Q+cAvj6sy6uSoICR563JyBy 07ex1MN89S9pLB6xc/27w32Gyd+ZFAB+8wm4FidQ300GmQNJVzbHvBdR0NQBfU/zqNNp PrLxN9YKvEP2fZQP2a5ayLtd7yPnT7oq6EHsDh9EOqTp6tqXW8CtnngmhtUTtz2fWEsL Ne4+3qKK8ZJKoTTvxkjtbrayiBTzjgHHj+xw+iwGOzqdj+K+tZlLu2LkX4HCQTCAbsty XCFH3S2bevvh11pHWAIG46V4TAFnPSo4+yRxYQui9nff97bKan+cCxH+/RTTZEOcfYEP I/aQ== 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; bh=p+U5vIBnOjLXY8VPVNTFWspmy+sk8WL3JV5On5zCYGA=; b=oJTbpzkmqLPAkZZGvMFuQorWbvFcxG/bhOZf3g+98qCEcbkUzc3nXMqNmEcVQoO6j4 h81k+mBDFb5D6RK9vm7tvHtnq5fNYCLGpR3zhQkM36S78vRJvL2FRqXgw825y24RtVYX mWfGVpg6o2fqM1nasTO/Z68mEpEwixfu8+ABWGLkpLjFjFzkF4HcMFyseOcAaffJOH4A O+sxglP5M5DfVqJvGOREtObG+c0leY2HC9dmec/SG+cXnDr17LKdthP1x3Y4y0StRxqB 1iM60QSm7PAIWxebkHfmmNJVuH2AdRz+ZUXVfpySB1uszAqRx0KwbY3KJ5pHBhEmdIMz bujA== X-Gm-Message-State: APjAAAU+ae6PRqVI/iJYNw326B6RwpjaKYGkwUPg1rEUZ4B+v6cvHHyo oloYqBA8nof7imI4tYXht6Tvx7lUXFI= X-Received: by 2002:a62:116:: with SMTP id 22mr20121785pfb.119.1558068711037; Thu, 16 May 2019 21:51:51 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id 132sm7709625pga.79.2019.05.16.21.51.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 21:51:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 16 May 2019 21:51:34 -0700 Message-Id: <20190517045136.3509-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190517045136.3509-1-richard.henderson@linaro.org> References: <20190517045136.3509-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH v14 11/13] 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. 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 Reviewed-by: Philippe Mathieu-Daudé 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); -}