From patchwork Sun May 27 14:13:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 137020 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1790858lji; Sun, 27 May 2018 07:23:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJFpWPbKKflO3pd5+ThwnDDQ3BMPj0hEBgKCV8xFfJ9RF9buptWiPrG4wKnOiySbaS/u5Le X-Received: by 2002:a37:b204:: with SMTP id b4-v6mr8831492qkf.149.1527431006660; Sun, 27 May 2018 07:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527431006; cv=none; d=google.com; s=arc-20160816; b=OUuPMOgJSDhe7JYT7dyH43Dga4cLy7TnAMBOodhRKl1iRf+YHnNXQESNwcokFgSxS+ sVKL2MvnzLQodQQQCzgbdUuN0QVfqAkaup2iPD4SZmgU7tSpzNYdKXzIpjRn63CCOt25 A6TNC71W+UC3A/jIBdHQMWCdSI5CjvJTegudLgZe61V7PQC/S2HZZ8p5fGhFDZ4atf4h 1gNYgHViNPLo5e0cV4I0ELogg82ut63Y7CQLCJcJjrwNOC9sYDX0aX1UL9Xe/XZvz5m9 HjrTxYUzCjec+Pqqp/kBWY1UyYnRitp94+KkXhbVBlGFy4KMHqkaqaTccokN0yP4xZPR l+QQ== 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=Ulh+EzcysOtJLTEaTwR+l2wPSZX/KDvqmQX2jTTu/AY=; b=skBmSiqCZSHeANqX+AHAsvhvtJN9PKNYkujGuCeK4qr5B5COuDH1jNb/8LGn+9Sprk c5MVNQe5VeVxmJrEn9TPDGoRDQELRzc5n3o4ZYwbEmYKtYrpm7DCes/xk6/+euvXSj++ 2bmVSysf+jb3qGuklObftwucIsbYPRIOsbG9lUzC8wllQI6L4YtjueA9AimwOazYRdOY SIxVFSm9Nq3SKI6s3jjEz9+PzTgLaAIsgjpAahTtOGvxW5rCh5arEuxKERXjjJgapPGE iWNmbC7qJ8wUx9/wHcWAnKGLpc827lhdJUEcv+rXVBkXRfyIZGzHdY+ax+PECWRtwEgv nnFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CnCO9JdT; 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 a1-v6si560971qvc.261.2018.05.27.07.23.26 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 27 May 2018 07:23:26 -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=CnCO9JdT; 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]:52239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwZy-0006Ni-3W for patch@linaro.org; Sun, 27 May 2018 10:23:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwQk-0000Dj-BO for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMwQi-0004SV-Sv for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:54 -0400 Received: from mail-pl0-x236.google.com ([2607:f8b0:400e:c01::236]:33574) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMwQi-0004SI-N7 for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:52 -0400 Received: by mail-pl0-x236.google.com with SMTP id n10-v6so5737341plp.0 for ; Sun, 27 May 2018 07:13: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=Ulh+EzcysOtJLTEaTwR+l2wPSZX/KDvqmQX2jTTu/AY=; b=CnCO9JdTC2RkZL6ZUtBX45F5AZr/RsFLWKhkaxtoi1+PXv4HqBX6YYwKq8eQ7xeYtl lBod83DfcFvE9xecgf6v0/su2wE/6MiOv6X7Rlv6SEz04PHjg85hjzxl6q5wixsH5pDr YZoRA0xeg0uSfH0cEyvrdHoFMpLAExcC6Zgv8= 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=Ulh+EzcysOtJLTEaTwR+l2wPSZX/KDvqmQX2jTTu/AY=; b=e5j3REArhDW8TG1wwOrab7Vgz5eWbNNP5RNTXBhHtD9RzG9ckJ8c9cQoXuNO5W4sVV /IyUe4SxW9pPksbEUFtJYERt4qqXmTiO3vIApFva8uhSixZqddSGqvMlroCbWMxu0lJg Md+DDV5XBwEd7+OYqigRaafZJxxgvNoc2RwuU+jnkQ48YIrM8X8UECy5dYzX+xKYtFTo Nef53w5ulUIJL0a0UA4TMoL7XxCy97oAzi6edpHj6VzickeocqEshrtHEOJOSfN0dduj H++TlZdMEyZRekJmF2SFzj5q2t2ROA5+1SH3tLBPNtZrgiS1wZFxqFRz2ryUE6wgVwFb OfpQ== X-Gm-Message-State: ALKqPwdNaC/PnGite4n40AXxvUR1+wxISP2F++GkX5BIx1V+jeF5lGHV /f8EAzDVotUfJf9WaYrP/M/PMS5IMR/i6w== X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr8899941plk.217.1527430431518; Sun, 27 May 2018 07:13:51 -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.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 May 2018 07:13:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 27 May 2018 09:13:19 -0500 Message-Id: <20180527141324.11937-16-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::236 Subject: [Qemu-devel] [PATCH 15/20] target/openrisc: Stub out handle_mmu_fault for softmmu 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" This hook is only used by CONFIG_USER_ONLY. Signed-off-by: Richard Henderson --- target/openrisc/mmu.c | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) -- 2.17.0 diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index ee3016a8b9..2f1f16fd6b 100644 --- a/target/openrisc/mmu.c +++ b/target/openrisc/mmu.c @@ -177,42 +177,17 @@ static void cpu_openrisc_raise_mmu_exception(OpenRISCCPU *cpu, cpu->env.lock_addr = -1; } -#ifndef CONFIG_USER_ONLY int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw, int mmu_idx) { +#ifdef CONFIG_USER_ONLY OpenRISCCPU *cpu = OPENRISC_CPU(cs); - int ret = 0; - hwaddr physical = 0; - int prot = 0; - - ret = get_phys_addr(cpu, &physical, &prot, address, rw); - - if (ret == TLBRET_MATCH) { - tlb_set_page(cs, address & TARGET_PAGE_MASK, - physical & TARGET_PAGE_MASK, prot, - mmu_idx, TARGET_PAGE_SIZE); - ret = 0; - } else if (ret < 0) { - cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret); - ret = 1; - } - - return ret; -} + cpu_openrisc_raise_mmu_exception(cpu, address, rw, 0); + return 1; #else -int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, - int rw, int mmu_idx) -{ - OpenRISCCPU *cpu = OPENRISC_CPU(cs); - int ret = 0; - - cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret); - ret = 1; - - return ret; -} + g_assert_not_reached (); #endif +} #ifndef CONFIG_USER_ONLY hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)