From patchwork Sun May 2 23:18:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 430467 Delivered-To: patch@linaro.org Received: by 2002:a17:907:764d:0:0:0:0 with SMTP id kj13csp1224213ejc; Sun, 2 May 2021 16:24:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnIg2aGm4yPOaxWZQzh5ikj+V2DjyDagQOACkRMQ2ys9nUdfl9CgNmhUCr99Ocj8/lc3V0 X-Received: by 2002:a02:660e:: with SMTP id k14mr15624032jac.9.1619997898140; Sun, 02 May 2021 16:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619997898; cv=none; d=google.com; s=arc-20160816; b=Saq6lzje8w1n8XAKmvMlbH+/OgNWdW9+GRpXFTecqh3oEf+73yEuaBRtdY7wU5LFqc Oueg7vNrJhsxNfYCdta9LMexGALzs23mMfMnfz/jTpswjUyrGRPBw2ky6QwhEjcXhlqm l4+irQT7Q31Z7AV/fbWjNiyJxwd+kYxsKn1+PqwnR/BJANxEQhR3DMRJDWwNRtDNPqhK sYZtbDMBHZDISTnuQ+2Cep6k+tThe2FLoYTp4FgccONbay0xboqMx9BMBx7Dn948yAN1 A+27ByCQ75jdNT9L+1tncshzAzH0kLDfrj3qDWVCVJHKcTIsTH4gHWxYI3SwF0xJ9MO4 kdBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=lnCJFh2Rv+h4NLtp2hQeAPYuSx8EMRNHvOCihIxCdAk=; b=z/9zE/017On4yumHt7+QjzpKXS2y/Ef8dBarJRk+a0NgEtrdHZncMv3pK+fV57bnU4 3hTjiUnDvy8gyIhtCuJzR8sZP1KXrNjjFHvr0aVc2EgkdNUGFc2sVXULLZB2hbDkitsw LzOjAkru8wphCTGjJ8lBcpei1f2W6aQ08Kg+sVFIOWv3SYHhuS8ybyYRoXLGjogDrCVT J4UcmDsn28CXP68Z3bZl8fdArXzFSxw/daRfASSakc8TsHPbVpGtqatrqYperq6yHfpq +p0rB4AZuRuEL1DJoW7VEep86XZEzOtIjJmR7Cnis6mRCP4aIDRU8L+CsD6PPwhQacqk 3GxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DAtFGrlb; 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 u24si11607923iom.67.2021.05.02.16.24.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 May 2021 16:24:58 -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=DAtFGrlb; 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]:47452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldLSL-0006nI-EM for patch@linaro.org; Sun, 02 May 2021 19:24:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldLMc-0008Kn-DF for qemu-devel@nongnu.org; Sun, 02 May 2021 19:19:02 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]:38837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldLMa-0002x4-9u for qemu-devel@nongnu.org; Sun, 02 May 2021 19:19:02 -0400 Received: by mail-pj1-x1031.google.com with SMTP id f11-20020a17090a638bb02901524d3a3d48so4706076pjj.3 for ; Sun, 02 May 2021 16:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lnCJFh2Rv+h4NLtp2hQeAPYuSx8EMRNHvOCihIxCdAk=; b=DAtFGrlbfaE3Np+K1BiL6Sg48aLsyJ1Xe5BHVI8VMhD+CFuBSFk6yXUAVHyFIzvfMD kynXKVNzi79x59sRMwkg4WtUO68vHDnaB11BekZGgLxNczhuNuArbPZKNAdL70RfzaYl 6LAkePXuiELoCrAdOMxf07lmFN0S4cf0yv/AyiO9vdJvjajPVL8CUSgqHhgVEZCRQt6+ dg3BFZqvan/aEBaJNxe5tHqfwgtlQryKDVTkgmW6pQDoE0QWbSvGzECe2yS+qnaq7XRM n89JGqDkJn+nOi98Enn0ZT+J7JUmwa5kWrbQCMEJyM6TWImbMoUYBMPK9tyb6vJBWXMh Y7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lnCJFh2Rv+h4NLtp2hQeAPYuSx8EMRNHvOCihIxCdAk=; b=QsA5MGaFYiK0cjQa81oDHyligKsWFUEvWHwSCCKCXhc8GIkmFsJ1jtenqUgxK0Fi24 PsGUtPe72jyWrKd2jsJ3fpWtfIBtWVoVJR1iKfyBD34RbuT2puAZiC/N+0WF23hWD04x e6Gg7DqCP9n3Kv6/RtHpArflLvjdXGc8msdU9kQG7XjBddWwyE3h6JomQRJRKLZxCm80 dif7C0hZrt5EuWDnkT/VR/FRIk8vITdaWRtH4wBmCINrR/OuRbgbO1FcvN7j9Xz7OP+A /tIYZqQEyFBt8/RekuEcy4G7vQS+8QQ0bjL7ZZiD481UWNnaHtSiz0BahN0x5MqjzZJ4 u14Q== X-Gm-Message-State: AOAM5331imG/oFKYWjhazzwToIB798uSZsPSvqoP0/6nuU4WhJS8xhXr FjZLnJW93jHEroA3pZ2Yx1b2mUKSqwZEKQ== X-Received: by 2002:a17:90a:5885:: with SMTP id j5mr28024033pji.102.1619997538788; Sun, 02 May 2021 16:18:58 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id k17sm7146236pfa.68.2021.05.02.16.18.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 16:18:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 17/28] tcg: Rename region.start to region.after_prologue Date: Sun, 2 May 2021 16:18:33 -0700 Message-Id: <20210502231844.1977630-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210502231844.1977630-1-richard.henderson@linaro.org> References: <20210502231844.1977630-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1031; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1031.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: , 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 Reviewed-by: Alex Bennée Reviewed-by: Luis Pires diff --git a/tcg/region.c b/tcg/region.c index a17f342f38..bd81b35359 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; @@ -850,7 +850,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); @@ -890,15 +890,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); } /*