From patchwork Tue Nov 2 11:07:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516659 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp4418850iml; Tue, 2 Nov 2021 04:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0T1UifEPdRjd7GnsJrQLUhi6l3PB5ZLTSo6/veRD8uYzM698/C/xb5R8Ti01jimnDbh8P X-Received: by 2002:a9d:7302:: with SMTP id e2mr13375653otk.52.1635852969122; Tue, 02 Nov 2021 04:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635852969; cv=none; d=google.com; s=arc-20160816; b=o5Wn4bHNFkIs6zJL4u/aq529L1PKmhd5HlUORY7SUMBmnxYIyLNwrZfxN2v+R6WG58 sfF/SqnctLQexxnfPJ36GcTWKD5+LQYBK2KayEaW2xf6QTHA5WHb+XxtyWwLEaK8300/ bX3XUN73bLuZbCdIJ5qW4sARiiM9r5Le4tsmWPjC8f6n51BieXmfURK7yGL1zbkQUPK6 QqjAUsLl9KxoAxBOwLx3Rx7OYWiYXPNkS4AbulIdOK/PZwUK6WU5QevZpI4ToaT7h/n0 ljR2z78fXWUgdt69TW/S5HHd6RUhHkn5SL55jixdhYeS1RUVKq7EshtdT1srVZVsqNF0 ElGQ== 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=z8ecs4LTwGjkTaIMjFwaDU18rjRNxTTeFlYdhpfOXR8=; b=tG5sI2vP39DFn/eG/uokHV0b6/gmeCSbeC1KGZ/cRq/xE8cqX2XnqozSEoRiMMGwIH rtDLmtHPzpwGvwJ5VJpuv0Kf6YPsDk30GLEy8zm0m5mw3BFFfaGQWH9/F1+cKMYxUF15 WOEydCTsOOcrmUJeFdJVlsxdtN5jxfG6FJZOBYd5sEk0K90k9tYiAw2fufr8X4XmxQke CgWZmoU6R5NMZjCHjcK3NeyI4/5avRbT3wrz8ZhCR6CVnP+09KVi1iys54efWqJZ+UIh jGi19UANHvlWv2xc/ByyDQw+X3EE531gltNJ6rSRZV6W3smG48N3dbYxf2kSZj+Yat62 es3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EkH9Ppp+; 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 r3si14754481oib.234.2021.11.02.04.36.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Nov 2021 04:36:09 -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=EkH9Ppp+; 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]:41486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhs5I-0008Hz-HK for patch@linaro.org; Tue, 02 Nov 2021 07:36:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhreF-0003qV-OT for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:08:11 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:33458) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhre3-0000vx-Co for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:08:10 -0400 Received: by mail-qk1-x72b.google.com with SMTP id p4so988464qkk.0 for ; Tue, 02 Nov 2021 04:07:56 -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=z8ecs4LTwGjkTaIMjFwaDU18rjRNxTTeFlYdhpfOXR8=; b=EkH9Ppp+yQ8tag6+63FM9tSuH5jfpvAVfiRSrzTx6AHmgLyAXYgVGBwxX0j9Xv5Q/q rM3XB4YGQyKerRRWCkv1H7xdMTFdGLr5yLydvBJ6gxHWYxrc9ccmcZ1qCp2yZ1IKLMKV zP+whDPKUq9gKzLjRFBZOfclj5EUrOu+WRaun4SXZ18wz8442S0xQw/grhsbWgCwYYZT TYnjC4oT8IDcqtkvt7/Vkj3bJxEQKhgR34U3SrROGgTDYPY76f0TvTgPT/Lzs+TYadLZ VC2g5/VDJTiG3NFh0KyZSjJXGNZy6UsEGntuQ2X+0trgSgTBKJItaqQjtD1F6A+RTwT1 CTOQ== 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=z8ecs4LTwGjkTaIMjFwaDU18rjRNxTTeFlYdhpfOXR8=; b=jr7ithavWhWAufqeE7yWfAPMJc9VKteFRdwYn5Ilrg271HP/Qq9Ngvlh2Vy4fSA0wd 2LqgZKdtoxRuvnSTSdgbGBABvX6R65QjK0I7txgukWjtaSOOfwLpXz81iLIqi2IJHD2X fzfjtzaaagcDc9oVZujie9pM0gAd7fH6vLCtE3WmbWtPBJfynPIB7rqugchDnN6BE9Nx pkVTef2pyH9XFkurwJlmJYC77rvaeLaEYVID/Z+YaeZYJx2u0h2wdKKOKUotNbvuIxMe a9lz7t6wfH8rIuBwSqUgiOsbvvwAnJowRWFexg/wNhJ6trgs92by4u6tgnvRsycZPXsD rRwA== X-Gm-Message-State: AOAM532uY/d1GDtNBC985HCsWvQa3Q+l8loQKWJxH+mVuztIfbNdomtT kvUpzHvtbsxCPyYPxqQ+A4j/1AAx9MvZug== X-Received: by 2002:a05:620a:4586:: with SMTP id bp6mr7149658qkb.470.1635851276207; Tue, 02 Nov 2021 04:07:56 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id bm7sm3568612qkb.86.2021.11.02.04.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 04:07:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 25/60] target/hexagon: Remove hexagon_cpu_tlb_fill Date: Tue, 2 Nov 2021 07:07:05 -0400 Message-Id: <20211102110740.215699-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211102110740.215699-1-richard.henderson@linaro.org> References: <20211102110740.215699-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x72b.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Taylor Simpson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The fallback code in cpu_loop_exit_sigsegv is sufficient for hexagon linux-user. Remove the code from cpu_loop that raises SIGSEGV. Reviewed-by: Taylor Simpson Signed-off-by: Richard Henderson --- linux-user/hexagon/cpu_loop.c | 24 +----------------------- target/hexagon/cpu.c | 23 ----------------------- 2 files changed, 1 insertion(+), 46 deletions(-) -- 2.25.1 diff --git a/linux-user/hexagon/cpu_loop.c b/linux-user/hexagon/cpu_loop.c index bee2a9e4ea..6b24cbaba9 100644 --- a/linux-user/hexagon/cpu_loop.c +++ b/linux-user/hexagon/cpu_loop.c @@ -28,8 +28,7 @@ void cpu_loop(CPUHexagonState *env) { CPUState *cs = env_cpu(env); - int trapnr, signum, sigcode; - target_ulong sigaddr; + int trapnr; target_ulong syscallnum; target_ulong ret; @@ -39,10 +38,6 @@ void cpu_loop(CPUHexagonState *env) cpu_exec_end(cs); process_queued_cpu_work(cs); - signum = 0; - sigcode = 0; - sigaddr = 0; - switch (trapnr) { case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */ @@ -65,12 +60,6 @@ void cpu_loop(CPUHexagonState *env) env->gpr[0] = ret; } break; - case HEX_EXCP_FETCH_NO_UPAGE: - case HEX_EXCP_PRIV_NO_UREAD: - case HEX_EXCP_PRIV_NO_UWRITE: - signum = TARGET_SIGSEGV; - sigcode = TARGET_SEGV_MAPERR; - break; case EXCP_ATOMIC: cpu_exec_step_atomic(cs); break; @@ -79,17 +68,6 @@ void cpu_loop(CPUHexagonState *env) trapnr); exit(EXIT_FAILURE); } - - if (signum) { - target_siginfo_t info = { - .si_signo = signum, - .si_errno = 0, - .si_code = sigcode, - ._sifields._sigfault._addr = sigaddr - }; - queue_signal(env, info.si_signo, QEMU_SI_KILL, &info); - } - process_pending_signals(env); } } diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 3338365c16..160a46a3d5 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -245,34 +245,11 @@ static void hexagon_cpu_init(Object *obj) qdev_property_add_static(DEVICE(obj), &hexagon_lldb_stack_adjust_property); } -static bool hexagon_tlb_fill(CPUState *cs, vaddr address, int size, - MMUAccessType access_type, int mmu_idx, - bool probe, uintptr_t retaddr) -{ -#ifdef CONFIG_USER_ONLY - switch (access_type) { - case MMU_INST_FETCH: - cs->exception_index = HEX_EXCP_FETCH_NO_UPAGE; - break; - case MMU_DATA_LOAD: - cs->exception_index = HEX_EXCP_PRIV_NO_UREAD; - break; - case MMU_DATA_STORE: - cs->exception_index = HEX_EXCP_PRIV_NO_UWRITE; - break; - } - cpu_loop_exit_restore(cs, retaddr); -#else -#error System mode not implemented for Hexagon -#endif -} - #include "hw/core/tcg-cpu-ops.h" static const struct TCGCPUOps hexagon_tcg_ops = { .initialize = hexagon_translate_init, .synchronize_from_tb = hexagon_cpu_synchronize_from_tb, - .tlb_fill = hexagon_tlb_fill, }; static void hexagon_cpu_class_init(ObjectClass *c, void *data)