From nobody Wed Nov 12 05:25:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1568306094; cv=none; d=zoho.com; s=zohoarc; b=jjC6K91cyjVi1f4n6tyaufNhaI6xuXuYyusbI3Ift2ut6yHUcWyLCfOSkyBNNv4eRwetzjJkftmlhE7amZTJU/tXYfPTeJ0l3KkIU5oTL2cBt2wy9D5CIBnxH0Gf31QAPmAuoOg/qagJuQZvTBykW1EWQ01dhNKOtiZyx/GZcYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568306094; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=i8LRmxtZuFvq+0UcRSB6Xv3LtsNpoqI8EHl05GHRQcM=; b=ch0Nc8hZiNzwDHGE7MPhFyiy5GrCNxDIq3SOd96WDR9iQnGm2EgZuY6qOJMRT9+3nItwiPQKrjAiWp7iUMo+3Yp0eqnjVR2Tq+Bk1FefMqdk8t2Xs2tMtarbEiChWPm9gIQRcIZE/1GRuSpPfbbPI7wkN+OXPD2QCCd33Ftn/Do= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568306094101429.4805394018988; Thu, 12 Sep 2019 09:34:54 -0700 (PDT) Received: from localhost ([::1]:36958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8S3P-0007wT-9R for importer@patchew.org; Thu, 12 Sep 2019 12:34:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57192) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8S0g-0005p5-BH for qemu-devel@nongnu.org; Thu, 12 Sep 2019 12:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8S0e-0006KA-Tp for qemu-devel@nongnu.org; Thu, 12 Sep 2019 12:31:54 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:37117 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i8S0e-00061t-GO for qemu-devel@nongnu.org; Thu, 12 Sep 2019 12:31:52 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id B78F11A1E6B; Thu, 12 Sep 2019 18:30:46 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id 8C6631A1EA3; Thu, 12 Sep 2019 18:30:46 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Thu, 12 Sep 2019 18:30:39 +0200 Message-Id: <1568305840-12550-4-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568305840-12550-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1568305840-12550-1-git-send-email-aleksandar.markovic@rt-rk.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PULL 3/4] hw/mips/mips_jazz: Remove no-longer-necessary override of do_unassigned_access X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, amarkovic@wavecomp.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Peter Maydell Now that the MIPS CPU implementation uses the new do_transaction_failed hook, we can remove the old code that handled the do_unassigned_access hook. Signed-off-by: Peter Maydell Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Herv=C3=A9 Poussineau Message-Id: <20190802160458.25681-4-peter.maydell@linaro.org> --- hw/mips/mips_jazz.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 1a8e847..c967b97 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -111,18 +111,6 @@ static const MemoryRegionOps dma_dummy_ops =3D { #define MAGNUM_BIOS_SIZE_MAX 0x7e000 #define MAGNUM_BIOS_SIZE (BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : M= AGNUM_BIOS_SIZE_MAX) =20 -static CPUUnassignedAccess real_do_unassigned_access; -static void mips_jazz_do_unassigned_access(CPUState *cpu, hwaddr addr, - bool is_write, bool is_exec, - int opaque, unsigned size) -{ - if (!is_exec) { - /* ignore invalid access (ie do not raise exception) */ - return; - } - (*real_do_unassigned_access)(cpu, addr, is_write, is_exec, opaque, siz= e); -} - static void (*real_do_transaction_failed)(CPUState *cpu, hwaddr physaddr, vaddr addr, unsigned size, MMUAccessType access_type, @@ -184,9 +172,8 @@ static void mips_jazz_init(MachineState *machine, * However, we can't simply add a global memory region to catch * everything, as this would make all accesses including instruction * accesses be ignored and not raise exceptions. - * So instead we hijack either the do_unassigned_access method or - * the do_transaction_failed method on the CPU, and do not raise excep= tions - * for data access. + * So instead we hijack the do_transaction_failed method on the CPU, a= nd + * do not raise exceptions for data access. * * NOTE: this behaviour of raising exceptions for bad instruction * fetches but not bad data accesses was added in commit 54e755588cf1e9 @@ -197,14 +184,8 @@ static void mips_jazz_init(MachineState *machine, * memory region that catches all memory accesses, as we do on Malta. */ cc =3D CPU_GET_CLASS(cpu); - if (cc->do_unassigned_access) { - real_do_unassigned_access =3D cc->do_unassigned_access; - cc->do_unassigned_access =3D mips_jazz_do_unassigned_access; - } - if (cc->do_transaction_failed) { - real_do_transaction_failed =3D cc->do_transaction_failed; - cc->do_transaction_failed =3D mips_jazz_do_transaction_failed; - } + real_do_transaction_failed =3D cc->do_transaction_failed; + cc->do_transaction_failed =3D mips_jazz_do_transaction_failed; =20 /* allocate RAM */ memory_region_allocate_system_memory(ram, NULL, "mips_jazz.ram", --=20 2.7.4