From nobody Fri May 17 09:01:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696043527; cv=none; d=zohomail.com; s=zohoarc; b=YCKJPuTFXhvcYAzReqBRE3CRk/ho4dwy9jU2i5EJcMRyTKnGWKQFlfANY4hpniWncMqv1TErTZs/fuz5JtBn+zGwLFVjuiFwk6Rp/DqYhWCNCAdlo+GP8dkDXLa2II0Ze1MzWRrGj+CHRyw7ibBa6/H4gUNPR/nrZvXN+h5Dw0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696043527; h=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; bh=CvIZ6W7L03y5eJZB7mtYJeqixddh+4BUTJc0pWynQtU=; b=ZiPDKJcUXdIgEPWa5U3GfglBASFqWiehYxW2gdkonRvtgbMgPq6h/t6fyYheD2IniRsriso3Eb2G0PXRxT2XZzDlArqnbbd7fMQYBvO1htMXujFVQnkbbTfeVNhUjHQgXF65eTRGkFPoEfR5fX716TtZxg06rwhaVRIhJWjaoKs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696043527657718.8601757708965; Fri, 29 Sep 2023 20:12:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmQO2-0001TV-6N; Fri, 29 Sep 2023 23:11:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmQO0-0001RL-DQ for qemu-devel@nongnu.org; Fri, 29 Sep 2023 23:11:20 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmQNy-0000CZ-NN for qemu-devel@nongnu.org; Fri, 29 Sep 2023 23:11:20 -0400 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-279067b9823so3491353a91.1 for ; Fri, 29 Sep 2023 20:11:18 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id gp15-20020a17090adf0f00b002790ded9c6dsm2146821pjb.31.2023.09.29.20.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 20:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696043477; x=1696648277; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CvIZ6W7L03y5eJZB7mtYJeqixddh+4BUTJc0pWynQtU=; b=HuuDBEP+0HD4wpkH9Y8GaESeEuE4NmQYrLhWa7M4aqjelYOFyiV8wJTZXBWvUXDKyQ GiO3vzfaSFPZX08CPw/19jhotlZiveuf43NUV0GSeolHiIDip9gPmPqGlwbCtl88OSj3 AkTQtizx6QgM6xIuNAcLHy5EvqIg7KABAjxXrAnd/40+wqPJEtPLr+1Rm2QQPhvQsXc5 HdGDrPPr0KJbstY7uolnf3j8qm3lmIzmn1DwehYev7PXn0nYZDxrYNUhYQIzB4i5N3Wg pQzFlllxUy9qGuFCElI8mpsIudvJ+iC8AdzCkrjzwRi6LqCL2ydNKXervZfEIAYcHbbf 3aLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696043477; x=1696648277; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CvIZ6W7L03y5eJZB7mtYJeqixddh+4BUTJc0pWynQtU=; b=NB++PsfLRBkvxl6ah0VSZNM9HrljRiqb5O0h4EN/O/r8HKEZLfF4sNODnQ32xQ+Xdk zjqFCBnUJp4L5AgXYXYS/dx5FBXPffWec+Q1PeVcEvFQWUHpTMlFbMXkqbJyfeSaLqis 5AWDgveWeeCV2nccox1XC5ru375o7EXMRxw0umXbzZkgfmebi0iUOFVHocIUlqSCOjuc w2Lu0ZlYxnWSvy1d6MXCdduCMJg4b92iymHJKWfUKooFFJt0V4AG0f9yDXC9Y/szSj/h HtMQ4k1znDmxmpxS2R48mF99rSYDJL5nie+o8AUaTtBRDQk8d86j+N/41VyNOBpPPuGN 2Wog== X-Gm-Message-State: AOJu0Yyl86QXrKqig2D6waKtQN5T6U+epeEOINzgZuQqUiK/XaUmiUNr Lrgv4CB0Xb8tGAC4sfPBy5LorUXXO9yJwUvz7fI= X-Google-Smtp-Source: AGHT+IGvo0AuEJCrilVmS4mPBa5vHk/ZTgXcgjpjURxY0OwyIED4fz/DdupmsOMAkPSUeMM7hkjcKg== X-Received: by 2002:a17:90a:c913:b0:274:8a03:b546 with SMTP id v19-20020a17090ac91300b002748a03b546mr5951722pjt.23.1696043477142; Fri, 29 Sep 2023 20:11:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PATCH v2 1/2] tcg: Remove argument to tcg_prologue_init Date: Fri, 29 Sep 2023 20:11:13 -0700 Message-Id: <20230930031114.1042913-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230930031114.1042913-1-richard.henderson@linaro.org> References: <20230930031114.1042913-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696043528300100005 Content-Type: text/plain; charset="utf-8" We can load tcg_ctx just as easily within the callee. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/tcg/tcg.h | 2 +- accel/tcg/tcg-all.c | 2 +- bsd-user/main.c | 2 +- linux-user/main.c | 2 +- tcg/tcg.c | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index c9c6d770d0..44aced2ddd 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -785,7 +785,7 @@ static inline void *tcg_malloc(int size) =20 void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus); void tcg_register_thread(void); -void tcg_prologue_init(TCGContext *s); +void tcg_prologue_init(void); void tcg_func_start(TCGContext *s); =20 int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start); diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 03dfd67e9e..d9d8dde202 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -121,7 +121,7 @@ static int tcg_init_machine(MachineState *ms) * There's no guest base to take into account, so go ahead and * initialize the prologue now. */ - tcg_prologue_init(tcg_ctx); + tcg_prologue_init(); #endif =20 return 0; diff --git a/bsd-user/main.c b/bsd-user/main.c index f913cb55a7..dcdaf059bc 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -586,7 +586,7 @@ int main(int argc, char **argv) * generating the prologue until now so that the prologue can take * the real value of GUEST_BASE into account. */ - tcg_prologue_init(tcg_ctx); + tcg_prologue_init(); =20 target_cpu_init(env, regs); =20 diff --git a/linux-user/main.c b/linux-user/main.c index 96be354897..66962e1d4a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -994,7 +994,7 @@ int main(int argc, char **argv, char **envp) /* Now that we've loaded the binary, GUEST_BASE is fixed. Delay generating the prologue until now so that the prologue can take the real value of GUEST_BASE into account. */ - tcg_prologue_init(tcg_ctx); + tcg_prologue_init(); =20 target_cpu_copy_regs(env, regs); =20 diff --git a/tcg/tcg.c b/tcg/tcg.c index 604fa9bf3e..4ec4f34b93 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1387,8 +1387,9 @@ TranslationBlock *tcg_tb_alloc(TCGContext *s) return tb; } =20 -void tcg_prologue_init(TCGContext *s) +void tcg_prologue_init(void) { + TCGContext *s =3D tcg_ctx; size_t prologue_size; =20 s->code_ptr =3D s->code_gen_ptr; --=20 2.34.1 From nobody Fri May 17 09:01:45 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1696043543; cv=none; d=zohomail.com; s=zohoarc; b=CwClN/CQjZBydZ7oI9oMh2bUka7XYvRag/lfxucI9tSg7D4oBkqG8xSnfEzJiMmZ/bOlOiXowjNrj6UeApiShsZqytd9CrrmcLgFE9u+NpjIVDJwif9ob/ha8IxAVInecqYJoHqyMkvCNgf+S6xgpoy4uuI6huiTXt2JFJNfGmI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696043543; h=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; bh=46MVV1VKXABFEFLwfHrZWuJeVOzvro/vOEjTS2Ume1E=; b=koB/cWKnHXiGrXYW0dy+4mHYvhsgbZJ2nBbzo1btMeRh2bB2vxGC1+iT3bg8CeAQ6ExiriCtikBLU2zaeHljDGHOmfae3mdk9qQTDH58gqxTH6ms7jweEdPn2eRMJkhPjvHYF1/abXiiLviWbwwJ8wvA+yKm9L2+lxLOCcJiE9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696043543007592.1912355729237; Fri, 29 Sep 2023 20:12:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qmQO3-0001YP-1g; Fri, 29 Sep 2023 23:11:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmQO1-0001RX-8t for qemu-devel@nongnu.org; Fri, 29 Sep 2023 23:11:21 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qmQNz-0000Cy-DZ for qemu-devel@nongnu.org; Fri, 29 Sep 2023 23:11:21 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2774f6943b1so8347097a91.0 for ; Fri, 29 Sep 2023 20:11:19 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id gp15-20020a17090adf0f00b002790ded9c6dsm2146821pjb.31.2023.09.29.20.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 20:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696043478; x=1696648278; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=46MVV1VKXABFEFLwfHrZWuJeVOzvro/vOEjTS2Ume1E=; b=HbGu894bkZsCiXfdp2OE3ZtkT80zFebaglVquh+2VGBT/qz737WVGCT+y7JGTB7WLp q9+FrNxiSpSxPcDoYUnoXZPi9wUFUDGWoe5RiCuo0CuHSVuE0jhdz5dgfcILvEpvAZf2 dyz4bbrm+5P2YhWoWWjZQOY63QisZ2J5Qj+IxpbqklC9fvPj6ZovmozPzRJ+QIQUJbyP 01/U5DtkBv+eDkALxjrbqot5fU6Bwkf4gq0mwyHvtEtW8AYFglUic4Us2j6JVJlWcFFt NUcTHTb3wBD32AQHj0GJl0NceWL7FNhW8EecW4b0Xm4yhETGMVRuBgwKXECMsEBuLSu4 HE+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696043478; x=1696648278; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=46MVV1VKXABFEFLwfHrZWuJeVOzvro/vOEjTS2Ume1E=; b=n/V0ot4dCFi9MacvkodcBMoJgfQaUYBto2Q7564cn3x1Wkz4ziagwpWniAl1bYNLwV f8tUtCBZX9S0OHZOVfZxGEnao+26kqrjTZVPIbA7fh1Tkr8o/wxF0tth1eLJWEH7t0wN wy/OKo1St/8z1dyNPB8h9swc5BhHrnVYrFH4NqmJQKXAm9kIZYd3V10timm57g6DsCV5 vuEV8ZVtFkt6kZV99eItZZoeOBvEyllJwseoILpGkMEDAvTizMMdK7MZ8812wK2DQX2A mqAYe9nxlTmiP5Rja2rCMdCNNAiiQZSJMeMrZ3qlBHNWRJNQ8gh9LciqknCfNRihc05+ zExA== X-Gm-Message-State: AOJu0YwBnl6VSBcNAOXlkcgESLhqLKAbmC2Vus+7T2aJb7sJze741C39 2CNLBWPvjLQbK21TqjLbxY/h1njKOhRy+M9r0UY= X-Google-Smtp-Source: AGHT+IG2AN5e95CwhiKwGAkMbol31Pr7bFcW1QLUgzarOTksZ1ZVCo5Atl05sgG6ZJEvWe3q5V64mA== X-Received: by 2002:a17:90a:688a:b0:268:13c4:b800 with SMTP id a10-20020a17090a688a00b0026813c4b800mr5923533pjd.21.1696043477874; Fri, 29 Sep 2023 20:11:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PATCH v2 2/2] tcg: Split out tcg init functions to tcg/startup.h Date: Fri, 29 Sep 2023 20:11:14 -0700 Message-Id: <20230930031114.1042913-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230930031114.1042913-1-richard.henderson@linaro.org> References: <20230930031114.1042913-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1696043545176100003 Content-Type: text/plain; charset="utf-8" The tcg/tcg.h header is a big bucket, containing stuff related to the translators and the JIT backend. The places that initialize tcg or create new threads do not need all of that, so split out these three functions to a new header. Suggested-by: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/tcg/startup.h | 58 +++++++++++++++++++++++++++++++++ include/tcg/tcg.h | 3 -- accel/tcg/tcg-accel-ops-mttcg.c | 2 +- accel/tcg/tcg-accel-ops-rr.c | 2 +- accel/tcg/tcg-all.c | 2 +- bsd-user/main.c | 2 +- linux-user/main.c | 2 +- linux-user/syscall.c | 2 +- tcg/tcg.c | 1 + 9 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 include/tcg/startup.h diff --git a/include/tcg/startup.h b/include/tcg/startup.h new file mode 100644 index 0000000000..f71305765c --- /dev/null +++ b/include/tcg/startup.h @@ -0,0 +1,58 @@ +/* + * Tiny Code Generator for QEMU: definitions used by runtime startup + * + * Copyright (c) 2008 Fabrice Bellard + * + * Permission is hereby granted, free of charge, to any person obtaining a= copy + * of this software and associated documentation files (the "Software"), t= o deal + * in the Software without restriction, including without limitation the r= ights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included= in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN + * THE SOFTWARE. + */ + +#ifndef TCG_STARTUP_H +#define TCG_STARTUP_H + +/** + * tcg_init: Initialize the TCG runtime + * @tb_size: translation buffer size + * @splitwx: use separate rw and rx mappings + * @max_cpus: number of vcpus in system mode + * + * Allocate and initialize TCG resources, especially the JIT buffer. + * In user-only mode, @max_cpus is unused. + */ +void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus); + +/** + * tcg_register_thread: Register this thread with the TCG runtime + * + * All TCG threads except the parent (i.e. the one that called the TCG + * accelerator's init_machine() method) must register with this + * function before initiating translation. + */ +void tcg_register_thread(void); + +/** + * tcg_prologue_init(): Generate the code for the TCG prologue + * + * In softmmu this is done automatically as part of the TCG + * accelerator's init_machine() method, but for user-mode, the + * user-mode code must call this function after it has loaded + * the guest binary and the value of guest_base is known. + */ +void tcg_prologue_init(void); + +#endif diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 44aced2ddd..3e45ee26fe 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -783,9 +783,6 @@ static inline void *tcg_malloc(int size) } } =20 -void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus); -void tcg_register_thread(void); -void tcg_prologue_init(void); void tcg_func_start(TCGContext *s); =20 int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start); diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttc= g.c index 4b0dfb4be7..aed919d10b 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -32,7 +32,7 @@ #include "qemu/guest-random.h" #include "exec/exec-all.h" #include "hw/boards.h" -#include "tcg/tcg.h" +#include "tcg/startup.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-mttcg.h" =20 diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 2d523289a8..7c530d3cda 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -32,7 +32,7 @@ #include "qemu/notify.h" #include "qemu/guest-random.h" #include "exec/exec-all.h" -#include "tcg/tcg.h" +#include "tcg/startup.h" #include "tcg-accel-ops.h" #include "tcg-accel-ops-rr.h" #include "tcg-accel-ops-icount.h" diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index d9d8dde202..a95c0bfe6d 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -27,7 +27,7 @@ #include "sysemu/tcg.h" #include "exec/replay-core.h" #include "sysemu/cpu-timers.h" -#include "tcg/tcg.h" +#include "tcg/startup.h" #include "tcg/oversized-guest.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/bsd-user/main.c b/bsd-user/main.c index dcdaf059bc..e72beaaa29 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -36,7 +36,7 @@ #include "qemu/help_option.h" #include "qemu/module.h" #include "exec/exec-all.h" -#include "tcg/tcg.h" +#include "tcg/startup.h" #include "qemu/timer.h" #include "qemu/envlist.h" #include "qemu/cutils.h" diff --git a/linux-user/main.c b/linux-user/main.c index 66962e1d4a..b0501996c7 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -41,7 +41,7 @@ #include "exec/exec-all.h" #include "exec/gdbstub.h" #include "gdbstub/user.h" -#include "tcg/tcg.h" +#include "tcg/startup.h" #include "qemu/timer.h" #include "qemu/envlist.h" #include "qemu/guest-random.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3521a2d70b..c6ffadd082 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -23,6 +23,7 @@ #include "qemu/memfd.h" #include "qemu/queue.h" #include "qemu/plugin.h" +#include "tcg/startup.h" #include "target_mman.h" #include #include @@ -141,7 +142,6 @@ #include "special-errno.h" #include "qapi/error.h" #include "fd-trans.h" -#include "tcg/tcg.h" #include "cpu_loop-common.h" =20 #ifndef CLONE_IO diff --git a/tcg/tcg.c b/tcg/tcg.c index 4ec4f34b93..87006496a9 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -36,6 +36,7 @@ #include "qemu/timer.h" #include "exec/translation-block.h" #include "exec/tlb-common.h" +#include "tcg/startup.h" #include "tcg/tcg-op-common.h" =20 #if UINTPTR_MAX =3D=3D UINT32_MAX --=20 2.34.1