From patchwork Mon Jun 18 18:40:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 139060 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4292373lji; Mon, 18 Jun 2018 11:56:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKgUSlgx9Oo9bGv2jCiEMrmO/xCo/IvsAyg3CQyVoZlOzEn4JOZIlJfZRRtG0b4RAK8quGE X-Received: by 2002:a0c:ada5:: with SMTP id w34-v6mr11985762qvc.58.1529348191948; Mon, 18 Jun 2018 11:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529348191; cv=none; d=google.com; s=arc-20160816; b=LrAQyR9Na8a65bpS6uF2uNd4mRQdxOM/MzxD3Wnk6YFCgnbT7P+Yy43Xe1xJaA7Ac4 B9Pj0iSjj1RiGZr/MUhtwnmv12ghRnc6hupl8SgCySSr/mgjsg49ECAlwJx5uXKglvMq 76z92cBk/pM7ELq9lEWfy3kGs72un26al1hYQMNx3AlPHIRohGDVm8qAZ8DgZ8lHe+vw Isl4tv3bQMHC5lYnxVd7ALOhG3m00o3LhFig0GqeuMGhw29eBVKP5+dnlc19/6wDeKTA kahEBY8Ms4ubt0FL+A6zS94rV15Hy0HoysSKFz710tKViyj1iovbACTNEmUKMTLOFe6Z P8lQ== 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:arc-authentication-results; bh=s2fWIvcIapxwY3FyUL2rUhGsGMtdyQRgSzCCYuc2ilU=; b=gUJuiKPrilvWznoY67UXAWW3Pi0MC89EgjfLPWpi6QnY3qXsRtFvaHa9jmCs1Lchtp fiHhV3mLpLITAfsmNbAfQioUvut/l2pMgb3UsCpHD8QHaM5Tih8PCdgHR+gMphwf250r L854vL0BrkiKwzjRS7onjbHAnlXwj+i6nqhuD71FcqxfkGh4R7hZUOJNy8tiXgdT/QS/ 62pYfUFYOUdOHR5b8xi7rXPN+2WvIy617A9LwB7aQH1pzGWcwSNnJKJHRCHQ2JKj/INH Zmy2V2qkZ704qNKwHPFyutJOMTvprXWQlc7jM/b4AwjjXLnoG5Bsj1L0U5HBdn6aVn/f 7pCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f3W4Ys4a; 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 q2-v6si4662351qtf.174.2018.06.18.11.56.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 18 Jun 2018 11:56:31 -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=f3W4Ys4a; 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]:36546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUzKJ-0007f4-EW for patch@linaro.org; Mon, 18 Jun 2018 14:56:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUz5T-0003Te-5q for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUz5S-0004lw-2S for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:11 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:38652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUz5R-0004lL-S8 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:09 -0400 Received: by mail-pf0-x243.google.com with SMTP id b74-v6so8603233pfl.5 for ; Mon, 18 Jun 2018 11:41:09 -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=s2fWIvcIapxwY3FyUL2rUhGsGMtdyQRgSzCCYuc2ilU=; b=f3W4Ys4a382wVFMjBvgkRzUQH3/4Q5yZCwk7D0qKaYAxm+bsfDsPd0NfKeC5gf+yFC lRu4tr5n+idEhDyepxwAKdVoF4Gfq4/MFlszPNtotja3vvkOcOIDUhXATQWeQXKIx28K +p75mrnKD7Dl0sttc4hxmYaePjEBiVP1A9BCk= 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=s2fWIvcIapxwY3FyUL2rUhGsGMtdyQRgSzCCYuc2ilU=; b=NMxehxUezcKSwbmwNZCh49luJd5H2NCSJMljvHAx6yh0INwdojfXmGoV+a3saYaFpf G6Zh6uThqfyojpdbDfL0ekxXk/0gK28R6FjdAtMqyIXKD/gBEgkJ00nf4IqZHp2sCMzK 5bYb8gxfARNZsJ/e5YFo0VI1+k9/jhsKamJo0zH5FGIEqkwLwkGi5kG0gCZxEw/WHZjg meeLgTkkIG0YhBsrlgEngOnFbxbO5H3Yxo9KG0Ke7rVKMbJki+lcNBXAMelz4W4a5crH N8xNz8YwHVLHgvoaMUV6GkgC9xYSCCKQfJzCoRa3PwePkiqe9rl3TXAhngCQEi7nZ4fa kt8A== X-Gm-Message-State: APt69E2pTd/1pb6u+g1qItlO3Qa8ZqL8we2cuX5B/kYxub7Kc2Y2vHVH JiVui3GmyVX0SnUN0qvNvYrwmy/cbFw= X-Received: by 2002:a63:6ac5:: with SMTP id f188-v6mr11868438pgc.195.1529347268598; Mon, 18 Jun 2018 11:41:08 -0700 (PDT) Received: from cloudburst.twiddle.net (mta-98-147-121-51.hawaii.rr.com. [98.147.121.51]) by smtp.gmail.com with ESMTPSA id i65-v6sm49457254pfd.17.2018.06.18.11.41.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 11:41:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 08:40:34 -1000 Message-Id: <20180618184046.6270-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618184046.6270-1-richard.henderson@linaro.org> References: <20180618184046.6270-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:400e:c00::243 Subject: [Qemu-devel] [PATCH v2 10/22] 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: shorne@gmail.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" With tlb_fill in mmu.c, we can simplify things further. Reviewed-by: Philippe Mathieu-Daudé 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.1 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