From patchwork Mon Jun 18 18:40:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 139048 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4284360lji; Mon, 18 Jun 2018 11:47:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJdxpxPNEqXs2B5pOt+XbRsT4eCuoJbT0KpMyg6MgaoP2qvvfhojkeYDaeG3yXbblbAZOo2 X-Received: by 2002:a0c:93a2:: with SMTP id f31-v6mr11693029qvf.151.1529347630875; Mon, 18 Jun 2018 11:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529347630; cv=none; d=google.com; s=arc-20160816; b=R/yAfB2Sp/gn9MiTDVVU1avKTfhgy4FS+2czcZULIi+bfiosJQctphWWlRmMfU7SOf dMkGLoZ/vRipI/2Mri7RYMEmUQlPzAUEejnDBq9uNKlqspteFD9GcvtfJAdvJukKORYv p/mJhOyu2k2cZ0+aEWdiduyxikDsLSsvykHpUQo94D5mehBtu25yV7ZszN4kvFAKH5Ev tNI6J0B/op2Zq4L3VrFEFFz565Lv/aM01NbVEn/RizntJ3cJnVXXY0AQjtWmVsfQ68fy 57/GyQ2rBMQf1z0AeI7KHjiiBagWGdZ3jgRDjVIgBCjbWRSCCu0PHZA5Aww7dTIrvSM7 ndFg== 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=xQ7MuAb0CMxAlY812ETLA9j5/iyPIirofg3K3ekSZ3o=; b=VBm+7lN4WrVD2u/jTY9KbO1XWr5C3f7J9+sYXp0ZjCTzqCdS0wJC6G5ONXDfIoeG5X UScFxwtoIXkpW3aLJTE/cMHWC+op6QJ/U6UShE2U8VlAC9YOgzoeoim5n/ybccV/Rk5T I9WHhgnMzB5zhAI9ecOpJpO9bFx+U+hKhOqjXUdf4E51xSegHtb8lQuVmzJVz+aRSgoh ihOwa26/K0u5szp0BEUXoElNppNn6u0sKbOlT6LuGi1y9rgDzNOKY5hCGt1MQDZzM23D MTz6L5qYmJj9C+YhhORJHWGbf5S4LDIckE28IPMPehMY8U9nvh8Uxu0jkzMaRrRNrToF GbLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XYRkmP5M; 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 h33-v6si4461270qtk.78.2018.06.18.11.47.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 18 Jun 2018 11:47:10 -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=XYRkmP5M; 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]:36492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUzBG-0008LY-7T for patch@linaro.org; Mon, 18 Jun 2018 14:47:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUz5b-0003Xx-8p for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUz5a-0004ue-EW for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:19 -0400 Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]:34482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUz5a-0004th-8M for qemu-devel@nongnu.org; Mon, 18 Jun 2018 14:41:18 -0400 Received: by mail-pg0-x22f.google.com with SMTP id q4-v6so7935204pgr.1 for ; Mon, 18 Jun 2018 11:41:18 -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=xQ7MuAb0CMxAlY812ETLA9j5/iyPIirofg3K3ekSZ3o=; b=XYRkmP5MymnpTloEpD2cjCs8uhz5jUctDdu9t+twTVDOdIo7dO3YGbvXplSSU8zD0v pVKUJYw3cy2rvTjKh306roiadChb86L59RvOkmS+VkglVUp3aVYWdS/qhBYc6UIZDPJm K3IoKQloMwbN5fnRgdCVtU/YCzxD53qQhnknM= 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=xQ7MuAb0CMxAlY812ETLA9j5/iyPIirofg3K3ekSZ3o=; b=o89ZHWkKa3mrIRUYqKcts2HTgJ1JkbebQpboYrSSUk55LqKG36Iwrlt2FM34uZAv9J Cv+0W2U2IU5VCJmmoW9vazdu+bTno/MSlHJ1WMLEl+aGR2I9B+qq2YmeT6lmTPS7giZa A58hTD3h2v8qANhNL7Gt9LELRdPQh9yhap9s7D7dcdum7VGoXnT++v4B+ymzlYsKN13Z lKdxplbz6HRW8ASB84zZqbNWZU9Vcd5j5XA/vxYt3MQk2B6B8l7X+jMwUqXUFetpry1i I2supmWulGGxPzRrsVThNwZ8S0CPk/z0kXpSvf5cV5sd88hY3v5FpdDzHrdUAh1a78xQ doFw== X-Gm-Message-State: APt69E3e4f6myU4HANyZpgsz9eQPTDAx8RTBKb8e/1oukKgY4KtQ3V30 yU4OaRoIa1hk4gH2OjMEPLcvnopEEBI= X-Received: by 2002:a63:af50:: with SMTP id s16-v6mr12232101pgo.263.1529347277026; Mon, 18 Jun 2018 11:41:17 -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.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 11:41:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 08:40:39 -1000 Message-Id: <20180618184046.6270-16-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22f Subject: [Qemu-devel] [PATCH v2 15/22] 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: shorne@gmail.com 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.1 diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index a4613e9ae4..f4c0a3e217 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)