From patchwork Wed Dec 20 17:14:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10126135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 371146019C for ; Wed, 20 Dec 2017 17:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2696F28734 for ; Wed, 20 Dec 2017 17:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B10228897; Wed, 20 Dec 2017 17:43:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9DC1528734 for ; Wed, 20 Dec 2017 17:43:43 +0000 (UTC) Received: from localhost ([::1]:60611 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRiP8-0003TP-Q1 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 20 Dec 2017 12:43:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRhyT-0004mH-CT for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRhyS-0007Iy-Cx for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:09 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:34988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRhyS-0007Ik-6f for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:08 -0500 Received: by mail-wr0-x243.google.com with SMTP id l19so10550382wrc.2 for ; Wed, 20 Dec 2017 09:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=pKpkifw8hWxEpYyeYQK8s7k+qdEtLUZUQXiL1OTSFqc=; b=Y1Q7M8AMfAQURJ8tTdX0F6yrWPpPk+nJq9I3CmJrcbis1TLtMso9UdtdpGcfPIIBoF wcglC2brR41jaJG/oOEJP+uuhn1AomNWH1T/Cr1s5hyNKGDN1b7RjkVxSu/XCTzAFtS6 dsJQrdaEZ+lmSN8WDrcz23Q4wVhHIYgXD1DEKGpGhzS1adPOOfkf4EsTwvAbrR9UCFKt AYSRCu0C0S6ld+btcz9AA0IsftIjLqYyzvP9+1TavP+2vDMoedeiBQTPFF23P7Y1y2xQ MMfTCK6qbIdbjIgUyfHcw012b8eBoUyr3AJPmh+7qH36zfrbOdEUo7ic0zEnEwPsvRSR 6Rvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=pKpkifw8hWxEpYyeYQK8s7k+qdEtLUZUQXiL1OTSFqc=; b=q39RnM4RJBjvne4bSt2U+UwfB9BaWWwUDrJTLDQaSU1HVLzMvmUejcGVywUEDNMYEb mYrq+5iOMiCyhKrHcjmy+jnISfgtCb83f5plWXGr+3796Sdll/uRD82NA01PrPtVGcns 2mRO7xcSbp0MKtYBfh2SYhf5DFwsX6kUYuqDjqXdvtpoFtZbJt7F4sdHxUtcbJAcsRaL ukwKsR5SlcVhSxdMnLQ6vxMdXZPpiVxvxq5StEEg0geeUPZEVWPx6+qDiIYTWYmbgys5 uxoHLGmH6jH+IbiMChVKtFXNj4MjlrcKWdyjuPxofBZqmoH9+umXp+LuR9KarGGFNXdU qnBg== X-Gm-Message-State: AKGB3mJkEoXYsmGiWiCJKh5NPdEz73DL3lENOHkTF9NqFKaNkVwdY6gB 1dbRKmQhSwUknrbkUYGOLPZN97U3 X-Google-Smtp-Source: ACJfBossO1dw/epr1YhEXhm3OaCi7T9N3jSHaUwN33WBgD+U11Ra5ssn3WYQkOTDw6jB15aj9ieMgg== X-Received: by 10.223.152.178 with SMTP id w47mr9755188wrb.254.1513790166953; Wed, 20 Dec 2017 09:16:06 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-251-125.clienti.tiscali.it. [78.12.251.125]) by smtp.gmail.com with ESMTPSA id f125sm2751101wme.45.2017.12.20.09.16.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Dec 2017 09:16:06 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 18:14:42 +0100 Message-Id: <1513790098-9815-31-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> References: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 30/46] hw/mips/boston: Remove workaround for writes to ROM aborting 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: Peter Maydell Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Maydell Now that the memory system correctly handles writes to ROM for guest CPUs that may generate exceptions for decode errors, we can remove the workaround from the boston board. Signed-off-by: Peter Maydell Message-Id: <1513187549-2435-3-git-send-email-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- hw/mips/boston.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 1cb4b6a..fb23161 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -248,16 +248,6 @@ static const MemoryRegionOps boston_platreg_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static void boston_flash_write(void *opaque, hwaddr addr, - uint64_t val, unsigned size) -{ -} - -static const MemoryRegionOps boston_flash_ops = { - .write = boston_flash_write, - .endianness = DEVICE_NATIVE_ENDIAN, -}; - static const TypeInfo boston_device = { .name = TYPE_MIPS_BOSTON, .parent = TYPE_SYS_BUS_DEVICE, @@ -481,8 +471,8 @@ static void boston_mach_init(MachineState *machine) sysbus_mmio_map_overlap(SYS_BUS_DEVICE(s->cps), 0, 0, 1); flash = g_new(MemoryRegion, 1); - memory_region_init_rom_device_nomigrate(flash, NULL, &boston_flash_ops, s, - "boston.flash", 128 * M_BYTE, &err); + memory_region_init_rom_nomigrate(flash, NULL, + "boston.flash", 128 * M_BYTE, &err); memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0); ddr = g_new(MemoryRegion, 1);