From patchwork Sun Mar 14 21:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 400127 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2922504jai; Sun, 14 Mar 2021 14:34:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXBtBiDThiy3kJb3bBWxvAMZ96GP8XUwIYOI9TstErOjFiPrK8g3Fu0UDFEBux479cOHyI X-Received: by 2002:a25:cfc5:: with SMTP id f188mr33228130ybg.485.1615757677113; Sun, 14 Mar 2021 14:34:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615757677; cv=none; d=google.com; s=arc-20160816; b=E+VhLfwN0oxebacea3nSoAckLoi1QfJ1aR0OOT8h6HPn84SxiB5lXezDRtg5RFTqwi KZTfG03DTvQcYbavPBT7qWb0qFz0Cq03GUJQxH/rkMRRVMmyadRvb43WS1ZKa8Dbfr6H RsXvL2ELfeAJKUbK3gp6dm8LwwWuaZH0+5DWFiQLbZVZC49PNLrhYdc1GAcExrQU7IcW dj0R7bnC87YYUAe8DIuU4vwPfGR6yEDvVVuT3y+ZCn3SWJwqCoSRQYIfN/n0AYZ0wGiV m7Cz0ARUVXICHt2r316NmiseMAo2CRlIPVUoCD3MocCqx+krxyXK072V+3RtetpcRMlv 6kBA== 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=sT6m1DvpyLSK/jDOR0ljz9XPvbGUXpvhChthbdvn53o=; b=m5u8GlkyIKjcPfweNx4qNokH5hQJvpOgNweYhqEXa5kNZh6VZ/2B7PkYDm1UT6fpf8 VrA3Wa2uBaYnGRGEO5wr7pw9CLEgCOImyz8anz1cMFA9i7PT4RWN0jlf2vynWNazUSgG Z6E1Q5cGcVDjYJGrbSbcaWxV8GLY1NqnlDSZEwHpZrAQ0+y4BTFnXaMXh1Vj84dSeRW/ 6MHLTD4kJwTUp9NY7f+QuyYbd1ykIfXH/ejCs9Ecqv4UTsz9uk+8z5NUSedZZ3gq5gbX o8FgrzkGNdN+1xIUxSFdOO9uOPLN0PnhDmtFesA0iZqxvIWaYXRgRJhiyhM3NlvMckhE HF6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IeOquCAS; 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=fail (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 o139si13201929ybg.199.2021.03.14.14.34.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Mar 2021 14:34:37 -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=fail header.i=@linaro.org header.s=google header.b=IeOquCAS; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLYNg-0004er-Gm for patch@linaro.org; Sun, 14 Mar 2021 17:34:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLYH7-0006Af-8X for qemu-devel@nongnu.org; Sun, 14 Mar 2021 17:27:50 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:44253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLYH4-0008FX-UY for qemu-devel@nongnu.org; Sun, 14 Mar 2021 17:27:48 -0400 Received: by mail-qk1-x72b.google.com with SMTP id 130so29879780qkh.11 for ; Sun, 14 Mar 2021 14:27:46 -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=sT6m1DvpyLSK/jDOR0ljz9XPvbGUXpvhChthbdvn53o=; b=IeOquCASz++uCfIdkVxgpsokUq3b6/XFmUwxxHnNoDlD/Keo8t8Aupy+esjdmvOxPK k1qLAeD9nKE2Udc3HW41gY499a+FF7kKTu89jC1qfcFA6syooUgYg8tXClPWDND+yeQc t3n3sXxb+hwEqyggy9aw6VSth3q7wZpdFOPioZPmsSdSGCLHQX8/GESD7Kty0YC+Ph7x JjngljYuHVyysLmCb2AcPkuxUYhrgZGoa8zLo/zSA9x2UW6c1xgNhKP4p+a4OnmUhEii wj1/+1y6GtUgxkb2rfBuc9OOM7tcV1AXgJsY+7csl4qPuBpluO+YCHqnDShhqx8O2TYC jwwQ== 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:mime-version:content-transfer-encoding; bh=sT6m1DvpyLSK/jDOR0ljz9XPvbGUXpvhChthbdvn53o=; b=nIVrWcOxipi+Mo/H+Fl9z/+dUT+wYyCMTXedb9l34zobkxHQOawEYRd8Ir8uUK7zHf oGM/an0cTwdhX1i7BaGDJKMMrftiI8/q+RYRzDGZY5edipKzFoOVzBh/qYHhOSj01gtq 7U7bdtt+UY66yID1ZLRo+wBDwxAFEW/2nUPeVGtd0dZLHskBpaTrZWxYFDSe308udjUY k4oexXfiISiJ0iJgo0s2LkllT4Qg3bF76Le1tAh7sGg+le0TSTfCWHvAPsIAOSLYDAVP 2Bxt5BMqEmlplw8sqQlZMigwMQf1SEwxXVQppwWpiRDe2qFMIP/vzZ2Z6SXLRW8J0ghH A5uw== X-Gm-Message-State: AOAM531tBWE5SyU+E+iqEMC6RowHqFtAzER1tsoHXW8R6dLlW+3XIM4d F/SOAimX65ECGeFhFE8gnfFzNIwGkum4yZHA X-Received: by 2002:a05:620a:14f:: with SMTP id e15mr22266912qkn.315.1615757265954; Sun, 14 Mar 2021 14:27:45 -0700 (PDT) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id t2sm9337749qtd.13.2021.03.14.14.27.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 14:27:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 17/29] tcg: Rename region.start to region.after_prologue Date: Sun, 14 Mar 2021 15:27:12 -0600 Message-Id: <20210314212724.1917075-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210314212724.1917075-1-richard.henderson@linaro.org> References: <20210314212724.1917075-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: r.bolshakov@yadro.com, j@getutm.app Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Give the field a name reflecting its actual meaning. Signed-off-by: Richard Henderson --- tcg/region.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.25.1 diff --git a/tcg/region.c b/tcg/region.c index 8e4dd0480b..23261561a1 100644 --- a/tcg/region.c +++ b/tcg/region.c @@ -46,8 +46,8 @@ struct tcg_region_state { QemuMutex lock; /* fields set at init time */ - void *start; void *start_aligned; + void *after_prologue; size_t total_size; /* size of entire buffer */ size_t n; size_t size; /* size of one region */ @@ -276,7 +276,7 @@ static void tcg_region_bounds(size_t curr_region, void **pstart, void **pend) end = start + region.size; if (curr_region == 0) { - start = region.start; + start = region.after_prologue; } if (curr_region == region.n - 1) { end = region.start_aligned + region.total_size; @@ -851,7 +851,7 @@ void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus) region.n = n_regions; region.size = region_size - page_size; region.stride = region_size; - region.start = buf; + region.after_prologue = buf; region.start_aligned = aligned; /* page-align the end, since its last page will be a guard page */ end = QEMU_ALIGN_PTR_DOWN(buf + total_size, page_size); @@ -888,15 +888,16 @@ void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus) void tcg_region_prologue_set(TCGContext *s) { /* Deduct the prologue from the first region. */ - g_assert(region.start == s->code_gen_buffer); - region.start = s->code_ptr; + g_assert(region.start_aligned == s->code_gen_buffer); + region.after_prologue = s->code_ptr; /* Recompute boundaries of the first region. */ tcg_region_assign(s, 0); /* Register the balance of the buffer with gdb. */ - tcg_register_jit(tcg_splitwx_to_rx(region.start), - region.start_aligned + region.total_size - region.start); + tcg_register_jit(tcg_splitwx_to_rx(region.after_prologue), + region.start_aligned + region.total_size - + region.after_prologue); } /*