From nobody Wed Feb 11 02:12:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530155503572407.250909388334; Wed, 27 Jun 2018 20:11:43 -0700 (PDT) Received: from localhost ([::1]:34279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYNLK-0002jw-IU for importer@patchew.org; Wed, 27 Jun 2018 23:11:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYNDt-00051E-Ai for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYNDr-0007xk-OC for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:52 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:37548) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYNDr-0007wI-I5 for qemu-devel@nongnu.org; Wed, 27 Jun 2018 23:03:51 -0400 Received: by mail-pf0-x244.google.com with SMTP id y5-v6so1890337pfn.4 for ; Wed, 27 Jun 2018 20:03:51 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id y15-v6sm8030489pfm.136.2018.06.27.20.03.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 20:03:49 -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=Oiaw84aOleXkI3aNsvyBwT2UQxV+BKJ1RrZpjWmHXRA=; b=STy332Y+LBrX50W4fjuGzcXWDeyNKCErtHWHo/1N7bPJK+/PH2exMhWy+0iDpoKWGm Xz7iLYGedv6A2hT4Whs7soJ1xnG3HdmLFoDqIN5Ca++ULi8acZdMkXCwG7erNRwo9cFA oZOg8fBow7QFG0KLfdSVQ/6zlwQMwi74w3R78= 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=Oiaw84aOleXkI3aNsvyBwT2UQxV+BKJ1RrZpjWmHXRA=; b=lYd313MhcUiGF2PI/4q0FW5QqR9jZMi09311IrDMh32x1Ckvl8506wUgShl8+EubuC ps7n4K1kkhmK62mKwyw4TFiW8HplBSO2Tu8dFXpZZrK3lRnX5fulp95EQmAieQcDNCQm d70+XbLT3ThuBKwUSjlb1+DITa/75Sgq7p7kHRjtsfu6Xqu7h5DnkUJ6/AnGntM98/N+ 4WgQIGL4LLjflEcJxuGAXSPvskopM7rV4W80qGnKgV+qBtIhk6i5nokl1p4SeLpzsKlj 4e3J0vfc3vprs6Pz/QE8ph2UG3L2p342wUyhnbSwJeFynuX/vdfOCGOZt8xIYv+UZAVD jy8A== X-Gm-Message-State: APt69E0pyBfyvlBJRoCjA6PWC+aPVQUk4wCxg5pf0Q9ZPmMXn9jBsh5U CD0APn6M/FBax/YG783fbPYZ5pWW0fo= X-Google-Smtp-Source: ADUXVKIiQz+9e4+lss+paVFZ4pt6uClMAKrJbJRa+ua9fTn1js5nrcFPzssiLwlGNCkgcclTbydD3g== X-Received: by 2002:a63:4002:: with SMTP id n2-v6mr7153477pga.285.1530155030276; Wed, 27 Jun 2018 20:03:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 27 Jun 2018 20:03:20 -0700 Message-Id: <20180628030330.15615-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180628030330.15615-1-richard.henderson@linaro.org> References: <20180628030330.15615-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH v3 13/23] 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 With tlb_fill in mmu.c, we can simplify things further. Reviewed-by: Philippe Mathieu-Daud=C3=A9 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 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 =3D 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 =3D 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 8b8a890c59..b5432f4684 100644 --- a/target/openrisc/Makefile.objs +++ b/target/openrisc/Makefile.objs @@ -1,7 +1,7 @@ obj-$(CONFIG_SOFTMMU) +=3D machine.o obj-y +=3D cpu.o exception.o interrupt.o mmu.o translate.o disas.o obj-y +=3D exception_helper.o fpu_helper.o \ - interrupt_helper.o mmu_helper.o sys_helper.o + interrupt_helper.o sys_helper.o obj-y +=3D gdbstub.o =20 DECODETREE =3D $(SRC_PATH)/scripts/decodetree.py --=20 2.17.1