From patchwork Sat Sep 18 18:45:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 514253 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp684296jao; Sat, 18 Sep 2021 12:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw431d2UusV+j8Ouhh+JkhcRA7SedaJ1jEvrcA/8cHGmYm3f35wAwIIKeU6i2HrfGedpJMp X-Received: by 2002:a25:428c:: with SMTP id p134mr21404371yba.60.1631992886379; Sat, 18 Sep 2021 12:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631992886; cv=none; d=google.com; s=arc-20160816; b=a/hxhavd9Ni0Ye7eXBk9Ivjm4PydMunOzhlna6qFdiqPR+U2wtyxCfoTBu0xiHucW8 uEWIMGYPGiS3Urhs/OCI8IyndG5QUAdpJZ0zrgkPvr4FngG3R7kw/vhIMz2y802XE6sJ nLFylO843ybXLOkJ4fO638ibLQ2v9b0rTK7waVIiOOR8ZnNKD202HlLCLXfFOMW9RZng Gwe39k5xknC9+EvyRGxN0qPJn6vCgO7QjOoY+PP3uaYYxWcY6ZfT5CARxAHn2u6hBYor P/Wl5Ws5Cm88Z1lbGY1ut4lFxgANi23rMo2r4bqkOdgBTIfWRJcT208BrhCGhUCUsYTz 9NVQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=J7hXQMffuuyXWpRCyuYJCpC7YHlZqNroGTBaJ0dICLY=; b=Dt4WhngshH5D9bzWydNYpIPI+FfGnVzLdpoG0yV6IpvcIkf92bXPsvugiFBucNhI3K VlcjBKV/cvAybhugC642CJAfG2OBeT8UvsCMRKov/g/jxtMzf3tS0okNP1V8ZtSShEp/ 43dMQu5AKv6Q9DzQvXHqiLfaYVS3xvY0YBCbjdFCJyoruJuTL4oG4YaxXRs5JJofYLFS YkPh3D5/ZcPwPIieZ0Tj9CzZgEUIhNzaViMpoqjR6qhfr2DIqt9nTavmfS48pcltZTWB OSigycHEjddlxM7qUF78kaJxInS8IxeAqe3DQJP3cxiDqeslUV/jBKzbqAR4mlcBsO7G +geg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HmaQDaZ6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j4si9286353ybo.68.2021.09.18.12.21.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Sep 2021 12:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HmaQDaZ6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRftt-0006pg-Rl for patch@linaro.org; Sat, 18 Sep 2021 15:21:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRfLl-0005Go-GD for qemu-devel@nongnu.org; Sat, 18 Sep 2021 14:46:09 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:35388) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRfLW-0006wT-6h for qemu-devel@nongnu.org; Sat, 18 Sep 2021 14:46:09 -0400 Received: by mail-pl1-x630.google.com with SMTP id bb10so8391305plb.2 for ; Sat, 18 Sep 2021 11:45: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 :mime-version:content-transfer-encoding; bh=J7hXQMffuuyXWpRCyuYJCpC7YHlZqNroGTBaJ0dICLY=; b=HmaQDaZ6OpxXZdCaSbmOznChge+x9N6Xx4Q/cATmhLf92uiWRSMFIshPAK3oYfVpsJ 7froXKEsUXT9bPzbXW+GgSGNvWZsT952zmVytnRDYDj7roxKGZLjUUysiztrxdN4/MNW /J4sroFSVX7kqfEXfilTbR1Y0vaes7ouYvNtmGucusrjDdSnexZrazew60xEXvYydbUG Uq9cC3w+UFC3hu88L9YVNs3tYuiuluqUY+FhSyB2/t/99WkDuzet6ozl+R/1kwWhD4t3 MdeTmqW5znUkW/7tAmgm5DIF5rNEbgXT0Vu10+rlN/iT5n6ZvlxOkgvE0PQtCFdzQ5jX scyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J7hXQMffuuyXWpRCyuYJCpC7YHlZqNroGTBaJ0dICLY=; b=ohGms0BuY043sIapSLsuk7QEVern/lqsYRT4fsMjIR7s5KzqiZIFjAmWPq4Hh/mtET kvyd9jALiu7kPcnMf2K+uaqCORd02+VYl9gUTYhgYHt9xc/I0vWJUJEuxGwyeXz550on 4IexkMqMH2qN1GwJ4P4kDD0+gUEZ/++VGE0qz1M0CHwTYJg88hUuWPsNlr4JhOVc6UKR TfTUR7W0NX4Kuuo426REPPkyYrKBDIwRDiyb2Mc+IDwyQ6hjm96fZDKKRouEg9z3IYIl CD+ThcAH8hOVt2igDxNmCY8wdZG+LQ/Es7IdNP9RiEojqZ7/+RYmZXU+i6/+3lXTVuPV IR8A== X-Gm-Message-State: AOAM533IPe7mQJOHWQHQ3FjrBRhHXNgtXAHi3IeBgsPEfSs1vK95MAPc 2nLxQjiGk9VUAjSUol3ZT0t8Hay5HEXd9w== X-Received: by 2002:a17:90b:3e84:: with SMTP id rj4mr14300361pjb.208.1631990751974; Sat, 18 Sep 2021 11:45:51 -0700 (PDT) Received: from localhost.localdomain ([71.212.134.125]) by smtp.gmail.com with ESMTPSA id y26sm9555858pfe.69.2021.09.18.11.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Sep 2021 11:45:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 28/41] target/m68k: Make m68k_cpu_tlb_fill sysemu only Date: Sat, 18 Sep 2021 11:45:14 -0700 Message-Id: <20210918184527.408540-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210918184527.408540-1-richard.henderson@linaro.org> References: <20210918184527.408540-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The fallback code in raise_sigsegv is sufficient for m68k-linux-user. Remove the code from cpu_loop that handled EXCP_ACCESS. Signed-off-by: Richard Henderson --- linux-user/m68k/cpu_loop.c | 10 ---------- target/m68k/cpu.c | 2 +- target/m68k/helper.c | 6 +----- 3 files changed, 2 insertions(+), 16 deletions(-) -- 2.25.1 diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c index c7a500b58c..7d106aa86e 100644 --- a/linux-user/m68k/cpu_loop.c +++ b/linux-user/m68k/cpu_loop.c @@ -88,16 +88,6 @@ void cpu_loop(CPUM68KState *env) case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */ break; - case EXCP_ACCESS: - { - info.si_signo = TARGET_SIGSEGV; - info.si_errno = 0; - /* XXX: check env->error_code */ - info.si_code = TARGET_SEGV_MAPERR; - info._sifields._sigfault._addr = env->mmu.ar; - queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); - } - break; case EXCP_DEBUG: info.si_signo = TARGET_SIGTRAP; info.si_errno = 0; diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index ad5d26b5c9..94b7fc90e8 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -517,10 +517,10 @@ static const struct SysemuCPUOps m68k_sysemu_ops = { static const struct TCGCPUOps m68k_tcg_ops = { .initialize = m68k_tcg_init, - .tlb_fill = m68k_cpu_tlb_fill, #ifndef CONFIG_USER_ONLY .has_work = m68k_cpu_has_work, + .tlb_fill = m68k_cpu_tlb_fill, .cpu_exec_interrupt = m68k_cpu_exec_interrupt, .do_interrupt = m68k_cpu_do_interrupt, .do_transaction_failed = m68k_cpu_transaction_failed, diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 137a3e1a3d..5728e48585 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -978,16 +978,12 @@ void m68k_set_irq_level(M68kCPU *cpu, int level, uint8_t vector) } } -#endif - bool m68k_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType qemu_access_type, int mmu_idx, bool probe, uintptr_t retaddr) { M68kCPU *cpu = M68K_CPU(cs); CPUM68KState *env = &cpu->env; - -#ifndef CONFIG_USER_ONLY hwaddr physical; int prot; int access_type; @@ -1051,12 +1047,12 @@ bool m68k_cpu_tlb_fill(CPUState *cs, vaddr address, int size, if (!(access_type & ACCESS_STORE)) { env->mmu.ssw |= M68K_RW_040; } -#endif cs->exception_index = EXCP_ACCESS; env->mmu.ar = address; cpu_loop_exit_restore(cs, retaddr); } +#endif /* !CONFIG_USER_ONLY */ uint32_t HELPER(bitrev)(uint32_t x) {