From patchwork Sun May 27 14:13:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 137026 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1794243lji; Sun, 27 May 2018 07:27:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJoTbvX5ghYHKTUK31OX5t9dQON1FJOuVckVjwMCiUxAt5AuPOKYOgJjQjVbtAhV4hknqy+ X-Received: by 2002:aed:24d1:: with SMTP id u17-v6mr9687800qtc.116.1527431268282; Sun, 27 May 2018 07:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527431268; cv=none; d=google.com; s=arc-20160816; b=Q3yFMXp6vF1kMw32KP+ybIqmBxX2mkE6CwZJYSbEpJXXQ8uj5lR61ZEqerhS9gYsSY S9Fk656RN42SWz2RvDKkDx7SPSAHfNyS3N9ZFxCXkESLhi7P33/MTtYvj4pbqMW2yvYA 3vTp8VMf8ImpWCwNTpbA1y2NCgKzjdKdl2woJjrr/uyHKlfNEXQzrmvA+XXr9cLVrJL6 yeOEFCaezPTZ5EEIjS0SGrA/Ykj/wYj4rTMDcnggI3ssjJGPthNW1mdV9GIYJNEyTdcj GjTXc9+UdXOUqmCx3KhKXT1UGr9LFvB3Z0mwmJX1NZT4atvqshePdpbhgmGVSYjtWbHJ RVGw== 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:arc-authentication-results; bh=NIaY2w1LTeqLCpuv9V6P6qDxUSeCus+/OONKSFumf+4=; b=rFhM4V378sXwje8Vlt9RbyEjSMzwmjkwXDr0zebPpfBgbJM12xgg2wPQADm8WMP6tc wBdBAOhDYPNtj8IrZ4VtsIB9Q3Pu8pokReEovy10wB/2J/3jGKGW9XF9OAYJpF1al+ld toyEbvvLkjJBumOmTqFsUec30qjamhbEeGJSNIoCjkKNWSRZqB2xLc579cXDbZsRb1hE VpdeTAP2TqBFGf2J67pshmUDNaWEUg1uevEqIqkOc4KQku+eXrKPzTkpfz+G/h1hNn6h 4/dak665m5jt7Ytun14L/dgB4APGgYOKSMEhvCP0uABJSvM1IT/0pLkEdE6Kjsk9iORt J3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UulZnTAE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y25-v6si3733205qto.192.2018.05.27.07.27.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 27 May 2018 07:27:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UulZnTAE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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 ([::1]:52267 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMweB-0002Mq-No for patch@linaro.org; Sun, 27 May 2018 10:27:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwQc-0008Vm-5m for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMwQa-0004Pm-Ud for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:46 -0400 Received: from mail-pl0-x244.google.com ([2607:f8b0:400e:c01::244]:37671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMwQa-0004Pa-OD for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:44 -0400 Received: by mail-pl0-x244.google.com with SMTP id w19-v6so5735907plq.4 for ; Sun, 27 May 2018 07:13:44 -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=NIaY2w1LTeqLCpuv9V6P6qDxUSeCus+/OONKSFumf+4=; b=UulZnTAEZVwBwNmQK5h4p9EmRgPwAzutoqt8ammI8CYx1gONeixejdbEz5Y7fJwulf Hcgd5SxC490UgI42W4x1UYcVybyXLGIVL2BVhifga2r8kJfAi2Xs4YNymZvWZDCfuTFB DBxwg5Lgbrm+6VBNr0qpOm+R4j7gnwT0sI65s= 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=NIaY2w1LTeqLCpuv9V6P6qDxUSeCus+/OONKSFumf+4=; b=oYJBY2ZoinhmnqLAVAOW+FB2uS4txcqz25MU0RiFcmrYJnjTahW+Aaouw5LvFutG6E D+0ouXHUmcr1wQYUXQKtcAGrfPI5cVnGCf00e1cKuWZ05bCiiwDKhE1lJHTs9XiEqDnT dodj0WM64D5drIZVDsuXL4L1JSJEy4SO7Ij0wfP1J2S883dUhrojrhC0QYsyTVQPYvo7 xSP3V8aeCWshABlSbBEMlzMIwJBbSBtM1KxABkruw5SMKgVVz1iHtZ6mJ3jJH/7NP2dh RtRWaZY4IA5jhGlZeMC+Ve3eg8jtLJUfYnp8fnvZNv4udmJnmfkqGK+CyD7bNfCKw1IO DjPg== X-Gm-Message-State: ALKqPwftS4D8bPXw2sQruQeGyHdTHXWyZsELqw95ZeU1ubcQVtk1EtAr kJfih4pxJpE8+iSjWADQFidSH1Bkghglww== X-Received: by 2002:a17:902:82cc:: with SMTP id u12-v6mr9896887plz.83.1527430423462; Sun, 27 May 2018 07:13:43 -0700 (PDT) Received: from cloudburst.twiddle.net (50-233-235-3-static.hfc.comcastbusiness.net. [50.233.235.3]) by smtp.gmail.com with ESMTPSA id b89-v6sm66680075pfd.85.2018.05.27.07.13.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 May 2018 07:13:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 27 May 2018 09:13:14 -0500 Message-Id: <20180527141324.11937-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180527141324.11937-1-richard.henderson@linaro.org> References: <20180527141324.11937-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::244 Subject: [Qemu-devel] [PATCH 10/20] target/openrisc: Merge mmu_helper.c into mmu.c 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: Stafford Horne Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" With tlb_fill in mmu.c, we can simplify things further. Signed-off-by: Richard Henderson --- target/openrisc/mmu.c | 11 ++++++++++ target/openrisc/mmu_helper.c | 40 ----------------------------------- target/openrisc/Makefile.objs | 2 +- 3 files changed, 12 insertions(+), 41 deletions(-) delete mode 100644 target/openrisc/mmu_helper.c -- 2.17.0 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index b2effaa6d7..9b4b5cf04f 100644 --- a/target/openrisc/mmu.c +++ b/target/openrisc/mmu.c @@ -240,4 +240,15 @@ hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) return phys_addr; } } + +void tlb_fill(CPUState *cs, target_ulong addr, int size, + MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) +{ + int ret = openrisc_cpu_handle_mmu_fault(cs, addr, size, + access_type, mmu_idx); + if (ret) { + /* Raise Exception. */ + cpu_loop_exit_restore(cs, retaddr); + } +} #endif diff --git a/target/openrisc/mmu_helper.c b/target/openrisc/mmu_helper.c deleted file mode 100644 index 97e1d17b5a..0000000000 --- a/target/openrisc/mmu_helper.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * OpenRISC MMU helper routines - * - * Copyright (c) 2011-2012 Jia Liu - * Zhizhou Zhang - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#include "qemu/osdep.h" -#include "cpu.h" -#include "exec/exec-all.h" -#include "exec/cpu_ldst.h" - -#ifndef CONFIG_USER_ONLY - -void tlb_fill(CPUState *cs, target_ulong addr, int size, - MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) -{ - int ret; - - ret = openrisc_cpu_handle_mmu_fault(cs, addr, size, access_type, mmu_idx); - - if (ret) { - /* Raise Exception. */ - cpu_loop_exit_restore(cs, retaddr); - } -} -#endif diff --git a/target/openrisc/Makefile.objs b/target/openrisc/Makefile.objs index 1b98a911ea..957ce02199 100644 --- a/target/openrisc/Makefile.objs +++ b/target/openrisc/Makefile.objs @@ -1,7 +1,7 @@ obj-$(CONFIG_SOFTMMU) += machine.o obj-y += cpu.o exception.o interrupt.o mmu.o translate.o obj-y += exception_helper.o fpu_helper.o \ - interrupt_helper.o mmu_helper.o sys_helper.o + interrupt_helper.o sys_helper.o obj-y += gdbstub.o DECODETREE = $(SRC_PATH)/scripts/decodetree.py